diff options
author | coderick14 | 2017-05-17 15:40:18 +0530 |
---|---|---|
committer | coderick14 | 2017-05-17 15:41:00 +0530 |
commit | a1e0a5502f04da68b6a9ca8508dda3f9d7e1d055 (patch) | |
tree | 20181e6b1936f50ad48d8e35720d64a37566f558 /lib/python2.7/site-packages/django/contrib/staticfiles/management/commands/runserver.py | |
parent | 6f4a84c1e58ff4d54aab94cbee26e995328b05b8 (diff) | |
download | SBHS-2018-Rpi-a1e0a5502f04da68b6a9ca8508dda3f9d7e1d055.tar.gz SBHS-2018-Rpi-a1e0a5502f04da68b6a9ca8508dda3f9d7e1d055.tar.bz2 SBHS-2018-Rpi-a1e0a5502f04da68b6a9ca8508dda3f9d7e1d055.zip |
Upgrade to Django 1.11
- Database integration yet to be tested
Diffstat (limited to 'lib/python2.7/site-packages/django/contrib/staticfiles/management/commands/runserver.py')
-rw-r--r-- | lib/python2.7/site-packages/django/contrib/staticfiles/management/commands/runserver.py | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/lib/python2.7/site-packages/django/contrib/staticfiles/management/commands/runserver.py b/lib/python2.7/site-packages/django/contrib/staticfiles/management/commands/runserver.py deleted file mode 100644 index 0f9e39f..0000000 --- a/lib/python2.7/site-packages/django/contrib/staticfiles/management/commands/runserver.py +++ /dev/null @@ -1,29 +0,0 @@ -from optparse import make_option - -from django.conf import settings -from django.core.management.commands.runserver import Command as RunserverCommand - -from django.contrib.staticfiles.handlers import StaticFilesHandler - -class Command(RunserverCommand): - option_list = RunserverCommand.option_list + ( - make_option('--nostatic', action="store_false", dest='use_static_handler', default=True, - help='Tells Django to NOT automatically serve static files at STATIC_URL.'), - make_option('--insecure', action="store_true", dest='insecure_serving', default=False, - help='Allows serving static files even if DEBUG is False.'), - ) - help = "Starts a lightweight Web server for development and also serves static files." - - def get_handler(self, *args, **options): - """ - Returns the static files serving handler wrapping the default handler, - if static files should be served. Otherwise just returns the default - handler. - - """ - handler = super(Command, self).get_handler(*args, **options) - use_static_handler = options.get('use_static_handler', True) - insecure_serving = options.get('insecure_serving', False) - if use_static_handler and (settings.DEBUG or insecure_serving): - return StaticFilesHandler(handler) - return handler |