{ "info": { "author": "Janez Kranjc", "author_email": "janez.kranjc@gmail.com", "bugtrack_url": null, "classifiers": [ "Environment :: Web Environment", "Framework :: Django", "Framework :: Django :: 2.2", "Intended Audience :: Developers", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Internet :: WWW/HTTP", "Topic :: Internet :: WWW/HTTP :: Dynamic Content" ], "description": "Django admin autoregister\n=========================\n\nThis is a simple app that automatically registers all the models that have not yet been registered to the Django admin.\n\nIt also does the following:\n\n- Adds all fields except `TextField` to `list_display`.\n- Optimizes the database queries by selecting related fields.\n- Adds fields that have `choices` set to `list_filter`.\n- If a model only has one `DateField` or `DateTimeField` it adds that field to the `date_hierarchy` \n- Sets `raw_id_field` for related fields and `autocomplete_fields` for related fields that have `search_fields` set.\n- Only registers models that you haven't yet registered.\n- Ignores models that you wish to exclude from the admin.\n\nInstallation\n------------\n\n* Install django-admin-autoregister\n\n```bash\npip install django-admin-autoregister\n```\n\nor \n\n```bash\npipenv install django-admin-autoregister\n```\n\n\n* Add `admin_autoregister` to the **bottom** INSTALLED_APPS setting like this:\n```python\nINSTALLED_APPS = [\n # ...\n 'admin_autoregister',\n]\n```\n\nBe extra careful to include it as the last app in the list, otherwise your own admin registrations will raise exceptions.\n\nAll your models should now be registered in the admin.\n\n* You can use the following settings to tweak the admin auto registration:\n\n - `ADMIN_AUTOREGISTER_EXCLUDE` is a list of models to exclude in the admin.\n - Defaults to `['contenttypes.ContentType',\n 'auth.Permission',\n 'session.Session',\n 'admin.LogEntry',]'`\n - `ADMIN_AUTOREGISTER_EXCLUDE_INLINES` is a boolean that determines whether or not to exclude models that are already registered as inlines of other models.\n - Defaults to `True`\n\nMixins\n------\n\nEach of the autoregister features can be used in your registered models by adding them as mixins.\n\nThe available mixins are:\n\n* `admin_autoregister.mixins.ListDisplayAdminMixin` - Populates the `list_display` automatically.\n* `admin_autoregister.mixins.ListFilterAdminMixin` - Populates the `list_filter` attribute automatically.\n* `admin_autoregister.mixins.AutocompleteFieldsAdminMixin` - Populates the `raw_id_fields` and `autocomplete_fields` attributes automatically.\n* `admin_autoregister.mixins.SelectRelatedFieldsAdminMixin` - Automatically selects all related fields with the queryset.\n* `admin_autoregister.mixins.DateHierarchyAdminMixin` - Automatically sets the `date_hierarchy` if there's only one `DateTimeField` or `DateField`\n\nContributing\n------------\n\nContributions are very welcome - submit a PR!\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/janezkranjc/django-admin-autoregister", "keywords": "", "license": "MIT License", "maintainer": "", "maintainer_email": "", "name": "django-admin-autoregister", "package_url": "https://pypi.org/project/django-admin-autoregister/", "platform": "", "project_url": "https://pypi.org/project/django-admin-autoregister/", "project_urls": { "Homepage": "https://github.com/janezkranjc/django-admin-autoregister" }, "release_url": "https://pypi.org/project/django-admin-autoregister/1.0.0/", "requires_dist": null, "requires_python": "", "summary": "A Django app that registers all unregistered models to the admin automatically.", "version": "1.0.0" }, "last_serial": 5427955, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "c6c13fc39df52cb7202495fa0b88bc4e", "sha256": "34a72b2dccccc5cdee47afd013978ac19d0dca0e4a311578e1023441d873fffe" }, "downloads": -1, "filename": "django_admin_autoregister-1.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "c6c13fc39df52cb7202495fa0b88bc4e", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5313, "upload_time": "2019-06-20T22:49:26", "url": "https://files.pythonhosted.org/packages/12/f8/4fb9cd2976b21b718564156e90a10b1b7495a109ef4aefa135a2fa6adcba/django_admin_autoregister-1.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8cc7854dcbf81e6d67e5c039aaa5b44a", "sha256": "dcb3d0e6738e6db37203f60596508070cdbf4b6964b31b792ad11562d986465e" }, "downloads": -1, "filename": "django-admin-autoregister-1.0.0.tar.gz", "has_sig": false, "md5_digest": "8cc7854dcbf81e6d67e5c039aaa5b44a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3431, "upload_time": "2019-06-20T22:49:28", "url": "https://files.pythonhosted.org/packages/08/0d/2cbc614977a1fa3eb8bc6c5eb9782338cff2660acdb9167572d82a27ec57/django-admin-autoregister-1.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "c6c13fc39df52cb7202495fa0b88bc4e", "sha256": "34a72b2dccccc5cdee47afd013978ac19d0dca0e4a311578e1023441d873fffe" }, "downloads": -1, "filename": "django_admin_autoregister-1.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "c6c13fc39df52cb7202495fa0b88bc4e", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5313, "upload_time": "2019-06-20T22:49:26", "url": "https://files.pythonhosted.org/packages/12/f8/4fb9cd2976b21b718564156e90a10b1b7495a109ef4aefa135a2fa6adcba/django_admin_autoregister-1.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8cc7854dcbf81e6d67e5c039aaa5b44a", "sha256": "dcb3d0e6738e6db37203f60596508070cdbf4b6964b31b792ad11562d986465e" }, "downloads": -1, "filename": "django-admin-autoregister-1.0.0.tar.gz", "has_sig": false, "md5_digest": "8cc7854dcbf81e6d67e5c039aaa5b44a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3431, "upload_time": "2019-06-20T22:49:28", "url": "https://files.pythonhosted.org/packages/08/0d/2cbc614977a1fa3eb8bc6c5eb9782338cff2660acdb9167572d82a27ec57/django-admin-autoregister-1.0.0.tar.gz" } ] }