On Mon, Feb 8, 2010 at 6:24 PM, adambossy <adambo...@gmail.com> wrote:

> I'm trying to install the django-invitation app on bitbucket, but I'm
> running into an error I've been seeing repeatedly with urls. I've
> googled this and various permutations have occurred to various people,
> but not this one in particular. The general problem occurs when I try
> to include a url configuration:
>
> ...
> urlpatterns += patterns('',
>        (r'^accounts/',
>
> include('invitation.urls')),
> )
> ...
>
> This is the included urls file, located in /myproject/invitation:
>
> http://dpaste.com/156349/
>
> And the error I receive is a NoReverseMatch in my template:
>
> http://dpaste.com/156350/
>
>
This does not appear to have anything to do with including url patterns,
it's a straightforward mismatch of the pattern and provided arguments.

The {% url %} tag in the template is:

{% url invitation_invited invitation_key=invitation_key.key %}

The pattern for invitation_invited is:

url(r'^invited/(?P<invitation_key>\w+)/

The NoReverseMatch exception states:

NoReverseMatch: Reverse for 'djroot.invitation_invited' with arguments '()'
and keyword arguments '{'invitation_key': ''}' not found.

The invitation_key value is shown as an empty string. This is not allowed by
the pattern, which requires one or more alphanumeric characters (\w is
alphanumeric, + is one or more) in invitation_key. Therefore no reverse
match is found.

Are you sure invitation_key.key is the correct value for invitation_key in
the {% url %} tag?

Karen

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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