{ "info": { "author": "Riccardo Forina", "author_email": "riccardo@forina.me", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Web Environment", "Framework :: Django", "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.11``\n\n\nInstallation\n------------\n\n1. Download it from PyPi with ``pip install tendenci-django-admin-bootstrapped``\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/django-admin-bootstrapped/django-admin-bootstrapped", "keywords": "", "license": "BSD License", "maintainer": "Tendenci", "maintainer_email": "programmers@tendenci.com", "name": "tendenci-django-admin-bootstrapped", "package_url": "https://pypi.org/project/tendenci-django-admin-bootstrapped/", "platform": "OS Independent", "project_url": "https://pypi.org/project/tendenci-django-admin-bootstrapped/", "project_urls": { "Homepage": "https://github.com/django-admin-bootstrapped/django-admin-bootstrapped" }, "release_url": "https://pypi.org/project/tendenci-django-admin-bootstrapped/3.0/", "requires_dist": [ "setuptools", "Django (<2.0,>=1.11)" ], "requires_python": "", "summary": "A Bootstrap theme for Django Admin", "version": "3.0" }, "last_serial": 5908832, "releases": { "3.0": [ { "comment_text": "", "digests": { "md5": "ee5982467b0f337e3a7f0b5d98e7fb52", "sha256": "3b121a1bba1101ad7bd62336d53f324a2f65ca35ec6bcc66071e9cc8fa311ce8" }, "downloads": -1, "filename": "tendenci_django_admin_bootstrapped-3.0-py3-none-any.whl", "has_sig": false, "md5_digest": "ee5982467b0f337e3a7f0b5d98e7fb52", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 403465, "upload_time": "2019-09-30T20:34:00", "url": "https://files.pythonhosted.org/packages/fd/39/563365f2ed77e1631a08b95fd0ed86f5e288c2d06d6d4c5e8f0913c35a3f/tendenci_django_admin_bootstrapped-3.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8ab9dbf0f2ce1efe01677448dbec6670", "sha256": "3980ef6d0cec5e5b3d7d22c83bad9adc6e9479ad7a53837f616ae0a3201be2a6" }, "downloads": -1, "filename": "tendenci-django-admin-bootstrapped-3.0.tar.gz", "has_sig": false, "md5_digest": "8ab9dbf0f2ce1efe01677448dbec6670", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 376054, "upload_time": "2019-09-30T20:34:04", "url": "https://files.pythonhosted.org/packages/ff/59/7ec6e7d0d094c4b9d5e299bac98930e5067276ed5941584f29eeaa077f46/tendenci-django-admin-bootstrapped-3.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "ee5982467b0f337e3a7f0b5d98e7fb52", "sha256": "3b121a1bba1101ad7bd62336d53f324a2f65ca35ec6bcc66071e9cc8fa311ce8" }, "downloads": -1, "filename": "tendenci_django_admin_bootstrapped-3.0-py3-none-any.whl", "has_sig": false, "md5_digest": "ee5982467b0f337e3a7f0b5d98e7fb52", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 403465, "upload_time": "2019-09-30T20:34:00", "url": "https://files.pythonhosted.org/packages/fd/39/563365f2ed77e1631a08b95fd0ed86f5e288c2d06d6d4c5e8f0913c35a3f/tendenci_django_admin_bootstrapped-3.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8ab9dbf0f2ce1efe01677448dbec6670", "sha256": "3980ef6d0cec5e5b3d7d22c83bad9adc6e9479ad7a53837f616ae0a3201be2a6" }, "downloads": -1, "filename": "tendenci-django-admin-bootstrapped-3.0.tar.gz", "has_sig": false, "md5_digest": "8ab9dbf0f2ce1efe01677448dbec6670", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 376054, "upload_time": "2019-09-30T20:34:04", "url": "https://files.pythonhosted.org/packages/ff/59/7ec6e7d0d094c4b9d5e299bac98930e5067276ed5941584f29eeaa077f46/tendenci-django-admin-bootstrapped-3.0.tar.gz" } ] }