Created
March 14, 2018 11:32
-
-
Save aljiwala/41a2f310cb194593c801fc8f1e95dc07 to your computer and use it in GitHub Desktop.
Django Standalone Script
This file contains hidden or 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 sys, os, django | |
sys.path.append("/path/to/store") #here store is root folder(means parent). | |
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "store.settings") | |
django.setup() | |
from store_app.models import MyModel |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment