On Wed, Mar 14, 2012 at 5:23 PM, coded kid <[email protected]> wrote:
> Hi guys, I want this code to display list of friends of a user, list
> of friends to add, after writing the codes and testing it out, I’m
> getting this error:
>
> TypeError at /userpage/
> user_page() takes exactly 2 arguments (1 given)

Your view function specifies 2 arguments, request and username, but
you are not capturing the username argument from the url you have
routed to it in urls.py.

You need to fix your urls.py so it collects the right argument:

https://docs.djangoproject.com/en/1.3/topics/http/urls/#named-groups

Alternatively, if the second argument is optional, mark it as such in
the view's function definition.

Cheers

Tom

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

  • TypeError coded kid
    • Re: TypeError Tom Evans

Reply via email to