Re: CSRF verification failed. Request aborted.

2015-01-24 Thread Stephen J. Butler
Have you checked the rendered HTML in the browser? Is the CSRF element present? Is there any JavaScript that could be doing pre-processing on the form? Did you open up the browser's inspector and verify that the POST request actually included the CSRF key/value? Is it the correct value? On Sat, Ja

Re: CSRF verification failed. Request aborted.

2015-01-24 Thread Cornelio Royer Climent
Yes I have MIDDLEWARE_CLASSES = ( 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.auth.middleware.Session

Re: CSRF verification failed. Request aborted.

2015-01-24 Thread Larry Martell
On Sat, Jan 24, 2015 at 2:51 PM, Cornelio Royer Climent wrote: > HI. SOMEBODY COULD YOU HELP WITH THIS ERROR? > > I THINEK THAT I SAW EVERYTHING, BUT I DON'T FIND THE ERROR . > > > > > {{ words.english }} > > > {% if error_message %}{{ error_message }}{% endif %} > > > > {% csrf_token %} > > >

Re: CSRF verification failed. Request aborted.

2012-07-11 Thread JJ Zolper
Thanks so much for the tip! I had part of the solution there from our other friend but I will add that extra protection when I can! Are you familiar with CSRF? And your solution what the issue you fix is? Any other insight into the reason for the code would be great! Thanks again, JJ On Wedn

Re: CSRF verification failed. Request aborted.

2012-07-11 Thread JJ Zolper
1. I don't think I set my id field just name title bio and website. 2. I don't set those two values. 3. not sure.. 4. not sure... I believe you corrected yourself as this post doesn't seem relevant. Not a problem! On Wednesday, July 11, 2012 8:11:46 AM UTC-4, Sergey Fursov wrote: > > Some notes

Re: CSRF verification failed. Request aborted.

2012-07-11 Thread JJ Zolper
Yep it's a problem with my views.py and my template or html page. My html page needed the csrf token tag: {% csrf_token %} and my view needed: return render_to_response('about.html', context_instance=RequestContext(request)) so thanks for the help!!! On Wednesday, July 11, 2012 7:58:5

Re: CSRF verification failed. Request aborted.

2012-07-11 Thread JJ Zolper
I apologize for not responding sooner! This line: return render_to_response('about.html', context_instance=RequestContext(request)) helped immensely! so in order for the render response method to work it has to have some sort of data/context of data passed along with it? I'm still tr

Re: CSRF verification failed. Request aborted.

2012-07-11 Thread Sergiy Khohlov
problem in view also : def about(request): if request.method == 'POST': return HttpResponseRedirect('/about/') elif request.method == 'GET': return render_to_response('about.html', context_instance=RequestContext(request)) else: raise Http404() this one should

Re: CSRF verification failed. Request aborted.

2012-07-11 Thread Сергей Фурсов
oops) 2012/7/11 Сергей Фурсов > Some notes about your models: > 1. why do you create id field manually? Django will do it for you ;) > 2. why do you explicitly set db_table and db_column? Do you have some > legacy database? If not, django will do it for you ;) > 3. move your vision from tables t

Re: CSRF verification failed. Request aborted.

2012-07-11 Thread Сергей Фурсов
Some notes about your models: 1. why do you create id field manually? Django will do it for you ;) 2. why do you explicitly set db_table and db_column? Do you have some legacy database? If not, django will do it for you ;) 3. move your vision from tables to objects 4. call your models in CamelCase

Re: CSRF verification failed. Request aborted.

2012-07-11 Thread Сергей Фурсов
Ok, I tried your code, just added in models.py fake owners model to correct foreign key class Owners(models.Model): num = models.IntegerField() def __unicode__(self): return unicode(self.num) and create views.py with three lines of code: def page(request): form = Webrequests

Re: CSRF verification failed. Request aborted.

2012-07-09 Thread Сергей Фурсов
as described in error message your view function have to use RequestContext for the template, instead of Context. your view should looks like def about(request): if request.method == 'POST': re

Re: CSRF verification failed. Request aborted.

2012-05-18 Thread doniyor
as Kurtis said, you need {% csrf_token %} and your rendering response should be something like this: return render_to_response('index.html', {'your_key': your_value},context_instance=RequestContext(request)) and those your value will be rendered thru youe_key tag. here is how your form sh

Re: CSRF verification failed. Request aborted.

2011-10-23 Thread ch3ka
On Sat, 22 Oct 2011 20:32:02 +0100 Kayode Odeyemi wrote: > On Sat, Oct 22, 2011 at 9:40 PM, wrote: > > Drupal cannot know about the CSRF token it has to send. > > > > You'd need to disable the CSRF-Check for that view. > > You can use the csrf_exempt decorator for example, found in the > > django

Re: CSRF verification failed. Request aborted.

2011-10-22 Thread Kayode Odeyemi
On Sat, Oct 22, 2011 at 9:40 PM, wrote: > On Sat, 22 Oct 2011 19:21:59 +0100 > Kayode Odeyemi wrote: > > > I am accessing my view from a Drupal application that sends in data > > via POST. I'm not using any REST API such as > > piston, django-tastypie. > > > > A few days ago, I'm smiling and hap

Re: CSRF verification failed. Request aborted.

2011-10-22 Thread web2 . 0+google
On Sat, 22 Oct 2011 19:21:59 +0100 Kayode Odeyemi wrote: > I am accessing my view from a Drupal application that sends in data > via POST. I'm not using any REST API such as > piston, django-tastypie. > > A few days ago, I'm smiling and happy that it all worked. Today, it's > a different story.

Re: CSRF verification failed. Request aborted.

2011-02-24 Thread Tom Evans
On Thu, Feb 24, 2011 at 10:00 AM, Ankit Rai wrote: > There is the problem "django1.2.5"  has some more security updates beacuse > of which your old code may break . Citation? > > Your code will start working after you add @csrf_exempt in all your views > .And cross check your settings.py middlew

Re: CSRF verification failed. Request aborted.

2011-02-24 Thread Kenneth Gonsalves
On Thu, 2011-02-24 at 15:30 +0530, Ankit Rai wrote: > Your code will start working after you add @csrf_exempt in all your > views why should he exempt all his views from csrf checking? -- regards KG http://lawgon.livejournal.com Coimbatore LUG rox http://ilugcbe.techstud.org/ -- You received th

Re: CSRF verification failed. Request aborted.

2011-02-24 Thread Ankit Rai
There is the problem "django1.2.5" has some more security updates beacuse of which your old code may break . Your code will start working after you add @csrf_exempt in all your views .And cross check your settings.py middleware classes ('django.middleware.common.CommonMiddleware', 'django.contr

Re: CSRF verification failed. Request aborted.

2011-02-24 Thread Kenneth Gonsalves
On Thu, 2011-02-24 at 01:55 -0800, luca72 wrote: > (1, 2, 5, 'final', 0) and one more thing - how are you deploying? -- regards KG http://lawgon.livejournal.com Coimbatore LUG rox http://ilugcbe.techstud.org/ -- You received this message because you are subscribed to the Google Groups "Django

Re: CSRF verification failed. Request aborted.

2011-02-24 Thread luca72
(1, 2, 5, 'final', 0) Thanks Luca On 24 Feb, 10:50, Ankit Rai wrote: > after removing add @csrf_exempt, it will work retsart the server. > > Which version of django are you using > to know version > type follwoing cmd > python > import django > django.VERSION > > On Thu, Feb 24, 2011 at 3:18 PM

Re: CSRF verification failed. Request aborted.

2011-02-24 Thread Ankit Rai
after removing add @csrf_exempt, it will work retsart the server. Which version of django are you using to know version type follwoing cmd python import django django.VERSION On Thu, Feb 24, 2011 at 3:18 PM, luca72 wrote: > removing @crsf_protect i get the same error > > On 24 Feb, 10:34, Kenn

Re: CSRF verification failed. Request aborted.

2011-02-24 Thread luca72
removing @crsf_protect i get the same error On 24 Feb, 10:34, Kenneth Gonsalves wrote: > On Thu, 2011-02-24 at 01:20 -0800, luca72 wrote: > > @csrf_protect > > try removing this > -- > regards > KGhttp://lawgon.livejournal.com > Coimbatore LUG roxhttp://ilugcbe.techstud.org/ -- You received thi

Re: CSRF verification failed. Request aborted.

2011-02-24 Thread Kenneth Gonsalves
On Thu, 2011-02-24 at 01:20 -0800, luca72 wrote: > @csrf_protect try removing this -- regards KG http://lawgon.livejournal.com Coimbatore LUG rox http://ilugcbe.techstud.org/ -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this grou

Re: CSRF verification failed. Request aborted.

2011-02-24 Thread Kenneth Gonsalves
On Thu, 2011-02-24 at 00:54 -0800, luca72 wrote: > I get CSRF verification failed. Request aborted. after the submit you have to use RequestContext if you are using csrf - also make sure csrf middleware is loaded. -- regards KG http://lawgon.livejournal.com Coimbatore LUG rox http://ilugcbe.techs

Re: CSRF verification failed. Request aborted.

2010-12-22 Thread Harbhag Singh Sohal
> What you're doing should be fine, in terms of whether it works or not. > However, I'd strongly recommend against passing locals(). While it may seem > to violate DRY to do anything else, experience has shown me that it makes > maintaining the code a lot harder in the long run, as it's not imme

Re: CSRF verification failed. Request aborted.

2010-12-22 Thread Dan Fairs
> from django.template import RequestContext > return render_to_response('abook_view.html', > locals(),context_instance=RequestContext(request)) What you're doing should be fine, in terms of whether it works or not. However, I'd strongly recommend against passing locals(). While it may seem to vi

Re: CSRF verification failed. Request aborted.

2010-12-22 Thread Harbhag Singh Sohal
from django.template import RequestContext return render_to_response('abook_view.html', locals(),context_instance=RequestContext(request)) this is what I am using. Is it ok ? -- Harbhag Singh Sohal http://harbhag.wordpress.com -- You received this message because you are subscribed to the Goog

Re: CSRF verification failed. Request aborted.

2010-12-22 Thread robos85
Do You pass *RequestContext* to your template during rendering it in view? Example from manual: def my_view(request): c = {} # ... return render_to_response("a_template.html", c, context_instance=RequestContext(request)) -- You received this message bec

Re: CSRF verification failed. Request aborted.

2010-12-22 Thread Harbhag Singh Sohal
I am also using {% csrf_token %}, even then I am getting error. -- 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+unsub