Created
April 5, 2013 19:26
-
-
Save bslima/5321919 to your computer and use it in GitHub Desktop.
Scrapy django integration
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
def setup_django_env(path): | |
import imp, os | |
from django.core.management import setup_environ | |
f, filename, desc = imp.find_module('settings', [path]) | |
project = imp.load_module('settings', f, filename, desc) | |
setup_environ(project) | |
setup_django_env('../django/viajala/') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment