Using Django models in external Python scripts

Using Django models in external Python scripts

Since Django 1.4 the syntax to import you models in external scripts has changed. The setup_environ method has been deprecated for a while and it no longer exists in Django 1.6. Assuming you’re using a virtualenv and your script is one directory outside the main...