Sam Chuparkoff escribió:
> 
> Since you are getting an import error and claim this works under a
> different environment, the salient difference may be sys.path. Your
> problem involves urlconfig, so you should post settings.ROOT_URLCONF
> and your urlconfig, and explain where your urls.py file or files are
> located.
> 
> Admin works so some part of your urlconfig works. But if it contains
> an evil include(), that would explain the import error you are getting
> whenever you try to call reverse(). That test/ directory seems
> suspicious, because there is a python standard module called 'test',
> and in the sys.path you posted your directories are appended.
> 
> That's too much guessing but if you had, say, import('test.urls')
> somewhere that really would explain the whole thing.

Thinking about you said, I had this in my main urlconf

urlpatterns = patterns('',
    url(r'^$', 'app.views.index', name='home'),
    url(r'^app/', include('app.urls')),
    url(r'^accounts/', include('registration.urls')),
    url(r'^projects/', include('projects.urls')),
    url(r'^releases/', include('releases.urls')),
    url(r'^languages/', include('languages.urls')),
    url(r'^contact/', include('contact.urls')),
    url(r'^profile/', include('profile.urls')),
    url(r'^components/', include('components.urls')),
    url(r'^teams/', include('teams.urls')),
    url(r'^files/', include('files.urls')),
    url(r'^man/(.*)', admin.site.root),
)

I changed to:

urlpatterns = patterns('',
    url(r'^$', 'vertaal.app.views.index', name='home'),
    url(r'^app/', include('vertaal.app.urls')),
    url(r'^accounts/', include('vertaal.registration.urls')),
    url(r'^projects/', include('vertaal.projects.urls')),
    url(r'^releases/', include('vertaal.releases.urls')),
    url(r'^languages/', include('vertaal.languages.urls')),
    url(r'^contact/', include('vertaal.contact.urls')),
    url(r'^profile/', include('vertaal.profile.urls')),
    url(r'^components/', include('vertaal.components.urls')),
    url(r'^teams/', include('vertaal.teams.urls')),
    url(r'^files/', include('vertaal.files.urls')),
    url(r'^man/(.*)', admin.site.root),
)

And now it works :-?
A standard url conf should include my project name (vertaal) or not ?


Thanks.
-- 
Kind regards.

--~--~---------~--~----~------------~-------~--~----~
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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to