Skip to content

Instantly share code, notes, and snippets.

@FGtatsuro
Created January 16, 2012 17:17
Show Gist options
  • Save FGtatsuro/1621860 to your computer and use it in GitHub Desktop.
Save FGtatsuro/1621860 to your computer and use it in GitHub Desktop.
Djangoのモジュールをインタープリタで読み込む ref: http://qiita.com/items/1748
In [1]: import django.shortcuts
(...)
ImportError: Settings cannot be imported, because environment variable DJANGO_SETTINGS_MODULE is undefined.
In [2]: import os
In [3]: os.environ['DJANGO_SETTINGS_MODULE'] = 'mokumoku.settings'
In [4]: import django.shortcuts
In [5]: help(django.shortcuts)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment