Two identical pages but only one works

2012-07-23 Thread twelve_o_clock
I have a page that I want to list all users and another page which I want to use to list all microposts. The user page works fine but the micropost page does not work even though the two look like they are of an identical format. On the micropost page, I just get an empty table. Here is part

CSRF token missing or incorrect

2012-07-23 Thread twelve_o_clock
When I try to submit a form in my django project, I get an error saying, "CSRF token missing or incorrect," even though I put a "{% csrf_token %}" tag inside the form. Here is signup.html: Sign up {% csrf_token %} Name: E-mail address: Password: Here is a part of views.py:

Re: Can't access members in a template

2012-07-23 Thread twelve_o_clock
That worked. Thanks for the help. On Monday, July 23, 2012 9:50:07 AM UTC-7, Dmitry Zimnukhov wrote: > Note, that u1 is not a model instance, but a QuerySet object > To get a model you should call manager's "get" method rather than "filter" > replace: > u1 = User.objects.filter(id=u) > with:

Re: Can't access members in a template

2012-07-23 Thread twelve_o_clock
I tried that and it still did not work. Also, {{u}} and {{i}} without spaces works, but it doesn't work when I try to access the member of something like {{ u.name }}. On Monday, July 23, 2012 9:14:24 AM UTC-7, Kurtis wrote: > Try: {{ u.name }} (with spaces) > > > -- You received this messa

Can't access members in a template

2012-07-23 Thread twelve_o_clock
I am trying to access data in a template in django. I have a variable u with members name, email, id, and date. However when I put {{u.name}} in a template, it doesn't appear in the HTML file even though just {{u}} appears just fine. For reference, here is the template: View user {{ u.id