At first, I have part of the script inside an existing application for loading all models from other applications into admin dynamically. Then, I think it would be convenient for next work if it stays as separate Django application.
So this is its repo in Github: https://github.com/zniper/django-quickadmin
The application is now compatible with Django >= 1.5 (Python >= 2.6) and core functionality is quite simple, with just a few functions:
- Find all the found models within the current Django project
- Filter and register only the models not in exclusion
- Rebuild the admin URLs
To install the application:
1. Install the Python package:
pip install django-quickadmin
2. Put `quickadmin` into INSTALLED_APPS tuple/list in settings module.
INSTALLED_APPS = (
3. Restart the project
Currently it has only 2 configurable options:
QADMIN_EXCLUDES - List of applications or models which will be bypassed/hidden in admin area. In the case below, all undeclared models of my_first_app and the model my_second_app.JustOneModel will be excluded.
QADMIN_EXCLUDES = [
QADMIN_EXCLUDE_STOCK - Option for excluding default/stock applications of Django or not (default = True).
QADMIN_EXCLUDE_STOCK = False # models of applications like: south, contenttypes,.. will be shown
Finally, if you have time and courage, please try the application and let me know if there are further ideas or any issues.