summaryrefslogtreecommitdiff
path: root/django/__main__.py
diff options
context:
space:
mode:
authorRyan Hiebert <ryan@ryanhiebert.com>2015-04-30 10:54:45 -0500
committerTim Graham <timograham@gmail.com>2015-09-07 19:54:32 -0400
commit617eff41acc583a3b0f97bb6bcc7efe096dc4891 (patch)
tree8422b047fd36f1318944a6ea32066da1463e8d5b /django/__main__.py
parent1743efbe62968e6bbdb183e9508e7370e61f43cb (diff)
Fixed #24857 -- Added "python -m django" entry point.
Diffstat (limited to 'django/__main__.py')
-rw-r--r--django/__main__.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/django/__main__.py b/django/__main__.py
new file mode 100644
index 0000000000..8b96e91ea8
--- /dev/null
+++ b/django/__main__.py
@@ -0,0 +1,9 @@
+"""
+Invokes django-admin when the django module is run as a script.
+
+Example: python -m django check
+"""
+from django.core import management
+
+if __name__ == "__main__":
+ management.execute_from_command_line()