diff --git a/django/core/management/commands/runserver.py b/django/core/management/commands/runserver.py
index 21391e8..4c58500 100644
a
|
b
|
class Command(BaseCommand):
|
11 | 11 | help='Tells Django to NOT use the auto-reloader.'), |
12 | 12 | make_option('--adminmedia', dest='admin_media_path', default='', |
13 | 13 | help='Specifies the directory from which to serve admin media.'), |
| 14 | make_option('--nostatic', action="store_false", dest='use_static_handler', default=True, |
| 15 | help='Prevents Django from automatically serving static assets at STATICFILES_URL.') |
14 | 16 | ) |
15 | 17 | help = "Starts a lightweight Web server for development." |
16 | 18 | args = '[optional port number, or ipaddr:port]' |
… |
… |
class Command(BaseCommand):
|
42 | 44 | use_reloader = options.get('use_reloader', True) |
43 | 45 | admin_media_path = options.get('admin_media_path', '') |
44 | 46 | shutdown_message = options.get('shutdown_message', '') |
| 47 | use_static_handler = options.get('use_static_handler', True) |
45 | 48 | quit_command = (sys.platform == 'win32') and 'CTRL-BREAK' or 'CONTROL-C' |
46 | 49 | |
47 | 50 | def inner_run(): |
… |
… |
class Command(BaseCommand):
|
60 | 63 | |
61 | 64 | try: |
62 | 65 | handler = WSGIHandler() |
63 | | handler = StaticFilesHandler(handler) |
| 66 | if use_static_handler: |
| 67 | handler = StaticFilesHandler(handler) |
64 | 68 | # serve admin media like old-school (deprecation pending) |
65 | 69 | handler = AdminMediaHandler(handler, admin_media_path) |
66 | 70 | run(addr, int(port), handler) |