Install django-extensions!!!
pip install -e git+git://github.com/django-extensions/django-extensions.git#egg=django_extensions
Automatically import your applications models in your python shell
./manage.py shell_plus From 'auth' autoload: Permission, Group, User, Message From 'my_app' autoload: MyModel >>>
Visualize your project
./manage.py graph_models -a -g -o my_project_visualized.png
ForeignKeyAutocompleteAdmin
Instead of having a select box with every FK in the admin, you have an autocomplete text input.
# profile/admin.py
from django.contrib import admin
from django_extensions.admin import ForeignKeyAutocompleteAdmin
from .models import UserProfile
class UserProfileAdmin(ForeignKeyAutocompleteAdmin):
related_search_fields = {
'user': ('username',),
}
admin.site.register(UserProfile, UserProfileAdmin)
Don’t forget to copy the django_extensions media in your static path (for javascript and css helpers).
And more…
Dive into the code, this is just the tip of the iceberg…