Tony Mack | 7130ac3 | 2013-03-22 21:58:00 -0400 | [diff] [blame] | 1 | #!/usr/bin/env python |
| 2 | import os |
| 3 | import sys |
| 4 | |
| 5 | if __name__ == "__main__": |
Siobhan Tully | 30fd429 | 2013-05-10 08:59:56 -0400 | [diff] [blame] | 6 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "planetstack.settings") |
Tony Mack | 7130ac3 | 2013-03-22 21:58:00 -0400 | [diff] [blame] | 7 | |
| 8 | from django.core.management import execute_from_command_line |
| 9 | |
Scott Baker | f342870 | 2014-10-21 15:05:29 -0700 | [diff] [blame] | 10 | if "--nomodelpolicy" in sys.argv: |
| 11 | import model_policy |
| 12 | model_policy.EnableModelPolicy(False) |
| 13 | sys.argv.remove("--nomodelpolicy") |
| 14 | |
Scott Baker | d3a5a2e | 2014-11-19 18:01:13 -0800 | [diff] [blame] | 15 | if "--noobserver" in sys.argv: |
| 16 | import observer |
| 17 | observer.EnableObserver(False) |
| 18 | sys.argv.remove("--noobserver") |
| 19 | |
Tony Mack | 7130ac3 | 2013-03-22 21:58:00 -0400 | [diff] [blame] | 20 | execute_from_command_line(sys.argv) |