#13493: ImportError when trying to use models from standalone script. ---------------------------------------------------+------------------------ Reporter: e...@justin.tv | Owner: nobody Status: reopened | Milestone: 1.2 Component: Database layer (models, ORM) | Version: 1.2-beta Resolution: | Keywords: regression Stage: Unreviewed | Has_patch: 0 Needs_docs: 0 | Needs_tests: 0 Needs_better_patch: 0 | ---------------------------------------------------+------------------------ Changes (by e...@justin.tv):
* status: closed => reopened * resolution: invalid => Comment: My script does import and use checkpoint.app.models (which Exam is one of). I would rather not pollute the module namespace of my script with that of my django project if possible. I have attached a reproducible test case. From the django-bug-report directory, "./runpy.sh fail.py" will throw the error if run against 1.2-rc-1, but succeed when run against 1.2-beta-1 Historically, Django hasn't required the project root to be in the Python path to use the models, so long as you can import them. -- Ticket URL: <http://code.djangoproject.com/ticket/13493#comment:3> Django <http://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-upda...@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-updates?hl=en.