You need to add:

from django.core.context_processors import csrf
at the top of Views.py

and

   c = {}
   c.update(csrf(request))

to each response/view

 since you're using render_to_response

On Thu, Jun 10, 2010 at 8:10 AM, joelklabo <joelkl...@gmail.com> wrote:
> This is my source on GitHub if anyone is interested: 
> http://github.com/joelklabo/Brooski
>
> On Jun 10, 8:00 am, joelklabo <joelkl...@gmail.com> wrote:
>> This is my urls.py:
>>
>>         (r'^site_media/(?P<path>.*)$', 'django.views.static.serve',
>> {'document_root': settings.MEDIA_ROOT}),
>>     (r'^$', feed),
>>     (r'^admin/', include(admin.site.urls)),
>>         (r'^accounts/login/$', '.contrib.auth.views.login', {'template_name':
>> 'base.html'}),
>>         (r'^accounts/logout/$', logout),
>>     (r'^profile/(\w+)', profile),
>>         (r'^brew/(\d+)', brewDetail),
>>         (r'^brewery/(.+)', breweryDetail),
>>         (r'^style/(.+)', styleDetail),
>>
>> I'm not sure how I would turn off CSRF. My form is in base.html as a
>> login form with some logic like {% if not logged in %} display form.
>>
>> On Jun 9, 11:43 pm, Roshan Mathews <rmath...@gmail.com> wrote:
>>
>>
>>
>> > On Thu, Jun 10, 2010 at 11:45,joelklabo<joelkl...@gmail.com> wrote:
>> > > Looks like it did something, I didn't get a 403 but I got this error:
>>
>> > Okay, so it seems, 'django.middleware.csrf.CsrfResponseMiddleware' is
>> > not required.  Please remove that.
>>
>> > Are your forms working without csrf protection turned on?  That stack
>> > trace looks like it couldn't resolve some url, and given that your
>> > form is not posting to the same view it came from, that might be a
>> > source of the problem.  Check your urls.py ...
>>
>> > --http://roshan.mathews.in/
>

-- 
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