File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11#!/usr/bin/env python
2- # Copyright The IETF Trust 2007, All Rights Reserved
3-
4- # Don't complain about these DeprecationWarnings (we still
5- # want to see others, though)
6- import warnings
7- warnings .filterwarnings ("ignore" , message = "the sets module is deprecated" )
8- warnings .filterwarnings ("ignore" , message = "the md5 module is deprecated; use hashlib instead" )
9- warnings .filterwarnings ("ignore" , message = "the sha module is deprecated; use the hashlib module instead" )
10-
112import os
123import sys
134
14- path = os .path .dirname (os .path .dirname (os .path .abspath (__file__ )))
15- if not path in sys .path :
16- sys .path .insert (0 , path )
5+ if __name__ == "__main__" :
6+ os .environ .setdefault ("DJANGO_SETTINGS_MODULE" , "settings" )
177
18- from django .core .management import execute_manager
19- try :
20- import settings # Assumed to be in the same directory.
21- except ImportError :
22- import sys
23- sys .stderr .write ("Error: Cannot find 'settings.py' or 'settings_local.py'.\n Usually these are in the directory containing %r.\n " % __file__ )
24- sys .exit (1 )
8+ from django .core .management import execute_from_command_line
259
26- if __name__ == "__main__" :
27- execute_manager (settings )
10+ execute_from_command_line (sys .argv )
You can’t perform that action at this time.
0 commit comments