Skip to content

Instantly share code, notes, and snippets.

@lfalanga
Last active December 20, 2019 02:24
Show Gist options
  • Select an option

  • Save lfalanga/5102418 to your computer and use it in GitHub Desktop.

Select an option

Save lfalanga/5102418 to your computer and use it in GitHub Desktop.
import sys, os
sys.path.append('/path/to/your/project') # The directory that contains settings.py
# Set up the Django settings/environment
from django.core.management import setup_environ
from myproject import settings
setup_environ(settings)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment