Last active
June 20, 2018 14:20
-
-
Save nara-l/ec707f8fc699ee23b39533c4413c9ea7 to your computer and use it in GitHub Desktop.
Using Django Model in a python 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 | |
os.environ.setdefault("DJANGO_SETTINGS_MODULE",'project_name.settings') # replace project_name with your project name | |
import django | |
django.setup() | |
from my_app.models import ( | |
Customers, | |
Organizations, | |
Personalization, | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment