Skip to content

Instantly share code, notes, and snippets.

@j4mie
Created November 20, 2010 18:57
Show Gist options
  • Save j4mie/708047 to your computer and use it in GitHub Desktop.
Save j4mie/708047 to your computer and use it in GitHub Desktop.
Run the Django development server programmatically
from django.core.management import setup_environ, call_command
import settings
setup_environ(settings)
call_command('runserver')
# This doesn't work from a Python REPL shell because the auto reloader is multithreaded
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment