Created
January 17, 2013 20:08
-
-
Save chris-ramon/4559263 to your computer and use it in GitHub Desktop.
import django.
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
#! /usr/bin/env python | |
#coding:utf-8 | |
import sys | |
import os | |
sys.path.insert(0, os.path.expanduser('/home/chris/Projects/royalpioneers')) | |
os.environ['DJANGO_SETTINGS_MODULE'] = 'royal.settings' | |
from django.contrib.contenttypes.models import ContentType | |
from django.contrib.auth.models import User | |
from django.db.models.loading import get_models | |
for m in get_models(): | |
exec "from %s import %s" % (m.__module__, m.__name__) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment