Skip to content

Instantly share code, notes, and snippets.

@bslima
Created April 5, 2013 19:26
Show Gist options
  • Save bslima/5321919 to your computer and use it in GitHub Desktop.
Save bslima/5321919 to your computer and use it in GitHub Desktop.
Scrapy django integration
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