Links

   Quran Explorer - Interactive Audio Recitations & Translations

Tuesday, March 4, 2014

Fixing Django ImportError in production

Hi,

"TemplateSyntaxError: Caught ImportError while rendering: No module named blahblahblah"  

In Development all imports work perfectly untill u move to production....

I 'lost' almost 16 man-hours trying to troubleshoot this. This is almost always a path issue.. There are several options one of them adding the path using os.path but the one that worked for me is to fully qualify the module name.

This means prefixing the project name to the module name such that if your project name was 'my_project' and the missing module/app is 'registration_app' you'll need to use my_project.registration_app EVERYWHERE in your .py files..



1 comment:

  1. This was a problem in when local django is 1.4 and the production version is 1.6 !!

    ReplyDelete

Feel free to leave a comment