diff --git a/django/core/management/commands/runserver.py b/django/core/management/commands/runserver.py
index 12808bc..c5a0b96 100644
a
|
b
|
class Command(BaseCommand):
|
9 | 9 | help='Tells Django to NOT use the auto-reloader.'), |
10 | 10 | make_option('--adminmedia', dest='admin_media_path', default='', |
11 | 11 | help='Specifies the directory from which to serve admin media.'), |
| 12 | make_option('--noadminmedia', action='store_true', dest='disable_admin_media', default=False, |
| 13 | help='Do not serve admin media files directly.'), |
12 | 14 | ) |
13 | 15 | help = "Starts a lightweight Web server for development." |
14 | 16 | args = '[optional port number, or ipaddr:port]' |
… |
… |
class Command(BaseCommand):
|
38 | 40 | |
39 | 41 | use_reloader = options.get('use_reloader', True) |
40 | 42 | admin_media_path = options.get('admin_media_path', '') |
| 43 | disable_admin_media = options.get('disable_admin_media', False) |
41 | 44 | shutdown_message = options.get('shutdown_message', '') |
42 | 45 | quit_command = (sys.platform == 'win32') and 'CTRL-BREAK' or 'CONTROL-C' |
43 | 46 | |
… |
… |
class Command(BaseCommand):
|
50 | 53 | print "Quit the server with %s." % quit_command |
51 | 54 | try: |
52 | 55 | path = admin_media_path or django.__path__[0] + '/contrib/admin/media' |
53 | | handler = AdminMediaHandler(WSGIHandler(), path) |
| 56 | handler = disable_admin_media and WSGIHandler() or AdminMediaHandler(WSGIHandler(), path) |
54 | 57 | run(addr, int(port), handler) |
55 | 58 | except WSGIServerException, e: |
56 | 59 | # Use helpful error messages instead of ugly tracebacks. |