Last active
December 3, 2015 13:38
-
-
Save mbylstra/385fa8cbf22e58b3aa62 to your computer and use it in GitHub Desktop.
django 1.7+ standalone script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import django | |
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "myapp.settings") | |
django.setup() | |
################################################################################ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I like to keep my standalone scripts out of myapp, but when i try to access script in web browser it gives page not found error. How can i fix it?