Hi

I started learning Django by putting all my apps inside the project
directory, and everything works nicely. But I'm going to be building
apps that can be shared across projects (one of the neat ideas in
Django!), so I'm trying to do that with my example project. I followed
some of the posts on the group and moved out my (already existing)
commonapp into an APPS directory like below:

---projecta
---projectb
---APPS
    --commonapp


I put this in each of my projects' settings.py files:

import sys
sys.path.append('/home/tss101/djangoproj/APPS')


and things seem to work up until the point when I try to link to other
pages in my templates. So Django finds the view fine, and the template
too, but it gives a ViewDoesNotExist for an href link in a template
like:

{% url home view_id=myview %}


in my project's urls.py I have the entry:

(r'^commonapp/', include('commonapp.urls')),


and in my commonapp urls.py I have

url(r'^home/(?P<view_id>\d+)/$',
            'commonapp.views.home.index',name='home'),


The actual error is:
Caught an exception while rendering: Could not import
projecta.commonapp.views.home. Error was: No module named
commonapp.views.home

So the impression I'm getting is that somehow it's adding the project
module to the path. Does anyone know why this is happening??

Thanks
Tejas


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to