A Bootstrap theme for Django Admin
Project description
A Django admin theme using Twitter Bootstrap. It doesn’t need any kind of modification on your side, just add it to the installed apps.
## Screenshots
<img src=”http://www.codingnot.es/static/screens/django_admin_bootstrapped_screen_0.png”> <img src=”http://www.codingnot.es/static/screens/django_admin_bootstrapped_screen_1.png”> <img src=”http://www.codingnot.es/static/screens/django_admin_bootstrapped_screen_2.png”>
## Requirements
Django 1.4.x.
## Installation
Download it from PyPi with pip install django-admin-bootstrapped
Add ‘django_admin_bootstrapped’ into the INSTALLED_APPS list __before__ ‘django.contrib.admin’
Have fun!
## Goodies
### Inline sortable
You can add drag&drop sorting capability to any inline with a couple of changes to your code.
First, add a position field in your model (and sort your model accordingly), for example:
- class TestSortable(models.Model):
that = models.ForeignKey(TestMe) position = models.PositiveSmallIntegerField(“Position”) test_char = models.CharField(max_length=5)
- class Meta:
ordering = (‘position’, )
Then in your admin.py create a class to handle the inline using the django_admin_bootstrapped.admin.models.SortableInline mixin, like this:
from django_admin_bootstrapped.admin.models import SortableInline from models import TestSortable
- class TestSortable(admin.StackedInline, SortableInline):
model = TestSortable extra = 0
You can now use the inline as usual. The result will look like this:
<img src=”http://www.codingnot.es/static/screens/django_admin_bootstrapped_screen_inlines.png”>
This feature was brought to you by [Kyle Bock](https://github.com/kwbock). Thank you Kyle!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Hashes for django-admin-bootstrapped-0.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | e09a0f9388bd447c1c4dca378928dd03144265ceac5387483c4e7a3075644857 |
|
MD5 | 7eddccc933a18ee05c4365764abc15d6 |
|
BLAKE2b-256 | 44c7847e6e546c651381708f0688a0187744b8ad22b0ac80b93e9ac08aedb037 |