{ "info": { "author": "Riccardo Forina", "author_email": "riccardo@forina.me", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Web Environment", "Framework :: Django", "Framework :: Django :: 1.10", "Framework :: Django :: 1.11", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3", "Topic :: Internet :: WWW/HTTP :: Dynamic Content", "Topic :: Software Development", "Topic :: Software Development :: Libraries :: Application Frameworks" ], "description": "django-admin-bootstrapped\n=========================\n\n.. image:: https://travis-ci.org/django-admin-bootstrapped/django-admin-bootstrapped.svg\n :target: https://travis-ci.org/django-admin-bootstrapped/django-admin-bootstrapped\n\n|PyPI version|\n\nA Django admin theme using Bootstrap. It doesn't need any kind\nof modification on your side, just add it to the installed apps.\n\nRequirements\n------------\n\n- Django ``1.10 and 1.11``\n\nWith Django older version of Django, user the original package -> https://github.com/django-admin-bootstrapped/django-admin-bootstrapped\n\nInstallation\n------------\n\n1. Download it from PyPi with ``pip install https://github.com/rubgombar1/django-admin-bootstrapped/archive/master.zip``\n2. Add into the ``INSTALLED_APPS`` **before** ``'django.contrib.admin'``:\n\n::\n\n 'django_admin_bootstrapped',\n\n3. Have fun!\n\nConfiguration\n-------------\n\nFor a full bootstrap3 experience you may want to use a custom renderer for the fields.\nThere's one available in tree that requires the ``django-bootstrap3`` application installed.\nYou have to add to your project settings file:\n::\n\n DAB_FIELD_RENDERER = 'django_admin_bootstrapped.renderers.BootstrapFieldRenderer'\n\n\n`Messages `__ will have ``alert-info`` tag by default, \nso you may want to add Bootstrap 3 tags for different message levels to make them styled appropriately.\nAdd to your project settings file:\n::\n\n from django.contrib import messages\n\n MESSAGE_TAGS = {\n messages.SUCCESS: 'alert-success success',\n messages.WARNING: 'alert-warning warning',\n messages.ERROR: 'alert-danger error'\n }\n\nNow, adding messages like this:\n::\n\n messages.success(request, \"My success message\")\n messages.warning(request, \"My warning message\")\n messages.error(request, \"My error message\")\n\nwill result into this:\n\n.. image:: https://i.imgur.com/SQNMZZE.png\n\nGoodies\n-------\n\nAdd custom html to the change form of any model with a template\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nYou can inject custom html on top of any change form creating a template\nnamed ``admin_model_MODELNAME_change_form.html`` into the application's\ntemplate folder. Eg:\n``myapp/templates/myapp/admin_model_mymodelname_change_form.html`` or\n``project/templates/myapp/admin_model_mymodelname_change_form.html``.\n\nInline sortable\n~~~~~~~~~~~~~~~\n\nYou can add drag&drop sorting capability to any inline with a couple of\nchanges to your code.\n\nFirst, add a ``position`` field in your model (and sort your model\naccordingly), for example:\n\n::\n\n class TestSortable(models.Model):\n that = models.ForeignKey(TestMe)\n position = models.PositiveSmallIntegerField(\"Position\")\n test_char = models.CharField(max_length=5)\n\n class Meta:\n ordering = ('position', )\n\nThen in your admin.py create a class to handle the inline using the\n``django_admin_bootstrapped.admin.models.SortableInline`` mixin, like\nthis:\n\n::\n\n from django_admin_bootstrapped.admin.models import SortableInline\n from models import TestSortable\n\n class TestSortable(admin.StackedInline, SortableInline):\n model = TestSortable\n extra = 0\n\nYou can now use the inline as usual. See the screenshots section to see what the result\nwill look like.\n\nThis feature was brought to you by `Kyle Bock `__. Thank you Kyle!\n\n\nXHTML Compatible\n~~~~~~~~~~~~~~~~\n\nCompatible with both html and xhtml. To enable xhtml for your django app\nadd the following to your settings.py: DEFAULT\\_CONTENT\\_TYPE =\n'application/xhtml+xml'\n\nGeneric lookups in admin\n~~~~~~~~~~~~~~~~~~~~~~~~\n\nAll that needs to be done is change the admin widget with either\nformfield\\_overrides like this:\n\n::\n\n from django_admin_bootstrapped.widgets import GenericContentTypeSelect\n\n class SomeModelAdmin(admin.ModelAdmin):\n formfield_overrides = {\n models.ForeignKey: {'widget': GenericContentTypeSelect},\n }\n\nOr if you want to be more specific:\n\n::\n\n from django_admin_bootstrapped.widgets import GenericContentTypeSelect\n\n class SomeModelAdmin(admin.ModelAdmin):\n def formfield_for_dbfield(self, db_field, **kwargs):\n if db_field.name == 'content_type':\n kwargs['widget'] = GenericContentTypeSelect\n return super(SomeModelAdmin, self).formfield_for_dbfield(db_field, **kwargs)\n\nIf you decide on using ``formfield_overrides`` `you should be aware of\nits limitations with relation\nfields `__.\n\nThis feature (and many more) was brought to you by `Jacob\nMagnusson `__. Thank you Jacob!\n\nContributing\n------------\n\nEvery code, documentation and UX contribution is welcome.\n\nFound an issue? Report it in the bugtracker!\n\nHave some free time? Help fixing an already filed issue, just remember to work on a separate branch please.\n\nScreenshots\n-----------\n\nHomepage\n~~~~~~~~\n\n.. image:: https://cloud.githubusercontent.com/assets/12932/6967318/d7064abe-d95e-11e4-91bc-6de527550557.png\n\nList view with filters in dropdown\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n.. image:: https://cloud.githubusercontent.com/assets/12932/6967319/d71a9c6c-d95e-11e4-86cf-47e8857582c1.png\n\nChange form view\n~~~~~~~~~~~~~~~~\n\n.. image:: https://cloud.githubusercontent.com/assets/12932/6966950/98661ba6-d95c-11e4-8bb3-e4b18759115b.png\n\n.. |PyPI version| image:: https://pypip.in/d/django-admin-bootstrapped/badge.png\n :target: https://pypi.python.org/pypi/django-admin-bootstrapped\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/rubgombar1/django-admin-bootstrapped/", "keywords": "", "license": "BSD License", "maintainer": "Ruben Gomez", "maintainer_email": "rubgomez93@gmail.com", "name": "django-admin-bootstrapped-rubgomez93", "package_url": "https://pypi.org/project/django-admin-bootstrapped-rubgomez93/", "platform": "OS Independent", "project_url": "https://pypi.org/project/django-admin-bootstrapped-rubgomez93/", "project_urls": { "Homepage": "https://github.com/rubgombar1/django-admin-bootstrapped/" }, "release_url": "https://pypi.org/project/django-admin-bootstrapped-rubgomez93/3.0.1/", "requires_dist": [ "setuptools", "Django (>=1.10)" ], "requires_python": "", "summary": "A Bootstrap theme for Django Admin", "version": "3.0.1" }, "last_serial": 3973341, "releases": { "3.0.1": [ { "comment_text": "", "digests": { "md5": "c7b157878987e9477dec30667a760f49", "sha256": "3da00b1916b1e30721dadfa40690d26bb794db9f6df1afb606a1e93a7c8909b5" }, "downloads": -1, "filename": "django_admin_bootstrapped_rubgomez93-3.0.1-py2-none-any.whl", "has_sig": false, "md5_digest": "c7b157878987e9477dec30667a760f49", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 403600, "upload_time": "2018-06-18T12:30:59", "url": "https://files.pythonhosted.org/packages/a7/3f/f949e764e15496bb5080d54b43a88533fd8bde9a79b7d791640bd81aa4b7/django_admin_bootstrapped_rubgomez93-3.0.1-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4f3b65c7e53554e40b73aaa5e8a83901", "sha256": "267b7264e02a407b3e06ef52f2c4ff9d4ebbd15d16e514c7eb5c43032d417cfa" }, "downloads": -1, "filename": "django-admin-bootstrapped-rubgomez93-3.0.1.tar.gz", "has_sig": false, "md5_digest": "4f3b65c7e53554e40b73aaa5e8a83901", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 378529, "upload_time": "2018-06-18T12:31:01", "url": "https://files.pythonhosted.org/packages/d6/b7/d5230307e0814762f39e88600ade1fd844bcf56a9f68235a9433a0e40084/django-admin-bootstrapped-rubgomez93-3.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "c7b157878987e9477dec30667a760f49", "sha256": "3da00b1916b1e30721dadfa40690d26bb794db9f6df1afb606a1e93a7c8909b5" }, "downloads": -1, "filename": "django_admin_bootstrapped_rubgomez93-3.0.1-py2-none-any.whl", "has_sig": false, "md5_digest": "c7b157878987e9477dec30667a760f49", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 403600, "upload_time": "2018-06-18T12:30:59", "url": "https://files.pythonhosted.org/packages/a7/3f/f949e764e15496bb5080d54b43a88533fd8bde9a79b7d791640bd81aa4b7/django_admin_bootstrapped_rubgomez93-3.0.1-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4f3b65c7e53554e40b73aaa5e8a83901", "sha256": "267b7264e02a407b3e06ef52f2c4ff9d4ebbd15d16e514c7eb5c43032d417cfa" }, "downloads": -1, "filename": "django-admin-bootstrapped-rubgomez93-3.0.1.tar.gz", "has_sig": false, "md5_digest": "4f3b65c7e53554e40b73aaa5e8a83901", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 378529, "upload_time": "2018-06-18T12:31:01", "url": "https://files.pythonhosted.org/packages/d6/b7/d5230307e0814762f39e88600ade1fd844bcf56a9f68235a9433a0e40084/django-admin-bootstrapped-rubgomez93-3.0.1.tar.gz" } ] }