Admin app to override and extend the default Django admin
- Install syferadmin
pip install -e git+ssh://[email protected]/sfroth/django-syferadmin.git#egg=syferadmin
- Make sure the following items are in your INSTALLED_APPS. syferadmin must come before django.contrib.admin
- django.contrib.auth
- django.contrib.contenttypes
- django.contrib.sessions
- django.contrib.sites
- django.contrib.messages
- django.contrib.staticfiles
- mptt
- syferadmin
- django.contrib.admin
- Set the auth model in settings.py
AUTH_USER_MODEL = 'syferadmin.User'
- Sync the database with
python manage.py migrate syferadmin
- Add the following to urls.py in your project
import syferadmin
syferadmin.autodiscover()
Above the urlpatternsurl(r'^admin/', include('syferadmin.urls')),
in urlpatternsurl(r'^admin/', include(syferadmin.site.urls)),
in urlpatterns
- Add the tmp dir for uploads in your repo root
mkdir tmp/uploads
- Add the following context processors before django request
- syferadmin.context_processors.settings
- syferadmin.context_processors.sections
- Add the following middleware
- syferadmin.middleware.threadlocal.ThreadLocalMiddleware
- Add the following to settings.py
IMAGEKIT_SPEC_CACHEFILE_NAMER = 'syferadmin.utils.source_name_as_path'