Hi there,

I've just followed the instructions to deploy patchwork and everything
seemed to work fine but when I went to /admin on my browser I got the
following error:

  TemplateSyntaxError: Caught ImportError while rendering: No module named 
patchwork

Which seems to happen because templates reference the patchwork module
directly (e.g. 'patchwork.views.') but in patchwork.wsgi only the
basedir is added to sys.path, so you'd in fact have to reference that
using 'apps.patchwork.views', so I was wondering if the patch below
would make sense?

Cheers,

--- a/lib/apache2/patchwork.wsgi
+++ b/lib/apache2/patchwork.wsgi
@@ -11,6 +11,7 @@ import sys
 
 basedir = os.path.dirname(__file__)
 sys.path.append(basedir)
+sys.path.append(os.path.join(basedir, 'apps'))
 
 os.environ['DJANGO_SETTINGS_MODULE'] = 'apps.settings'
 import django.core.handlers.wsgi


-- 
Guilherme Salgado <https://launchpad.net/~salgado>

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
Patchwork mailing list
[email protected]
https://lists.ozlabs.org/listinfo/patchwork

Reply via email to