runserver option for disabling admin static files serving
|Reported by:||jakub_vysoky||Owned by:||nobody|
|Severity:||Keywords:||admin media runserver|
|Cc:||Triage Stage:||Design decision needed|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
Okay, it's handy not to worry about admin media files static serving, when running simple dev server..
But if you want to do something special with admin media files, like not touching the original ones in
django.contrib.admin and add some of your own, like we do with very simple static serving view (serve from one dir and fallback to another), you must set
ADMIN_MEDIA_PREFIX = 'http://localhost:8000', which is not very portable solution, or symlink files from various dirs and let runserver serve admin static files from there.
If people have in their urls.py something for static media serving when
DEBUG == True - why not to have there the same for admin?
I'll attach patch that adds an option for runserver management command which gives you the chance just to disable builtin magical serving.
Change History (9)
comment:1 Changed 8 years ago by
|Component:||Uncategorized → django-admin.py runserver|
|Patch needs improvement:||unset|
|Triage Stage:||Unreviewed → Design decision needed|