Re: Two {% csrf_token %} processed for _accounts/settings. Is this an issue?

2022-01-11 Thread Robbi Nespu
shows two identical hidden input fields with name="csrfmiddlewaretoken". They seem to be generated by two occurrences of {% csrf_token %}: CSRF middleware is activated by default Should/could the first occurrence above be removed? I'm guessing this would NOT cause any actual bug e

Two {% csrf_token %} processed for _accounts/settings. Is this an issue?

2022-01-09 Thread Al Go
Hello, I'm a complete newbie and discovering the codebase. Inspect element in http://127.0.0.1:8000/_accounts/settings/ (when running the testproject) shows two identical hidden input fields with name="csrfmiddlewaretoken". They seem to be generated by two occurrences of {% csrf_

Re: reagrding "{% csrf_token %}"issue on my web site login module

2019-05-30 Thread Abdul Qoyyuum
When you run the application and test the login, what do you see in the devtool's Network tab? Did you see if csrf_token is null? How about document.cookie? Is that also null? Is the document.cookie being passed to csrf_token in other ways? Lots of ways to complete this in Angular/jQuery

Re: reagrding "{% csrf_token %}"issue on my web site login module

2019-05-28 Thread Abdulrasheed Ibrahim
ly >> >> On Tue, May 28, 2019, 12:32 The Aryas wrote: >> >>> hello guys, i was working on a clone project and got stuck on a problem. &

Re: reagrding "{% csrf_token %}"issue on my web site login module

2019-05-28 Thread Jeyakanth T
dennis wrote: > Did you indent accurately > > On Tue, May 28, 2019, 12:32 The Aryas wrote: > >> hello guys, i was working on a clone project and got stuck on a problem. >> the {% csrf_token %} that i have applied is not verified ...and the error >

Re: reagrding "{% csrf_token %}"issue on my web site login module

2019-05-28 Thread isorae dennis
Did you indent accurately On Tue, May 28, 2019, 12:32 The Aryas wrote: > hello guys, i was working on a clone project and got stuck on a problem. > the {% csrf_token %} that i have applied is not verified ...and the error > login module is

reagrding "{% csrf_token %}"issue on my web site login module

2019-05-28 Thread The Aryas
hello guys, i was working on a clone project and got stuck on a problem. the {% csrf_token %} that i have applied is not verified ...and the error login module is following

Re: Generic CBV DeleteView GET csrf_token

2019-03-14 Thread Chetan Ganji
On Fri, Mar 15, 2019 at 12:34 AM B wrote: >> >>> I'm implementing a DeleteView, and for completion I would like to >>> provide the functionality indicated here: >>> >>> >>> https://docs.djangoproject.com/en/2.1/ref/class-based-views/generic-

Re: Generic CBV DeleteView GET csrf_token

2019-03-14 Thread B
for completion I would like to provide >> the functionality indicated here: >> >> >> https://docs.djangoproject.com/en/2.1/ref/class-based-views/generic-editing/#deleteview >> >> *If this view is fetched via GET, it will display a confirmation page >> that should c

Re: Generic CBV DeleteView GET csrf_token

2019-03-14 Thread Chetan Ganji
re: > > > https://docs.djangoproject.com/en/2.1/ref/class-based-views/generic-editing/#deleteview > > *If this view is fetched via GET, it will display a confirmation page that > should contain a form that POSTs to the same URL.* > > However, by default a GET will not include

Generic CBV DeleteView GET csrf_token

2019-03-14 Thread B
form that POSTs to the same URL.* However, by default a GET will not include the required context to the template for {% csrf_token %}. How do I include the appropriate context information for a plain DeleteView CBV? -- You received this message because you are subscribed to the Google G

Re: {% csrf_token %}

2017-09-27 Thread Chris Wedgwood
lowing code fails because the template tag > ( {% csrf_token %} ) is rendered by the home_page view function but not by > the django.template.loader.render_to_string function (and so the > assertEqual test fails.) > > ...templates/home.html: > ... > >

{% csrf_token %}

2017-09-26 Thread Alex Kleider
I'm using test driven development (going through Harry J.W. Percival's book) and have found that the following code fails because the template tag ( {% csrf_token %} ) is rendered by the home_page view function but not by the django.template.loader.render_to_string function (

Re: csrf_token during registration is giving me problems

2017-08-01 Thread pieceofkayk2718
fml. Thank you. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@goo

Re: csrf_token during registration is giving me problems

2017-08-01 Thread pieceofkayk2718
fml. Thank you. On Tuesday, August 1, 2017 at 12:55:10 PM UTC-6, Dylan Reinhold wrote: > > You have a quoting miss-match in your enctype, that might be messing with > the csrf_token > >enctype='multipart/form-data"> > > On Tue, Aug 1, 2017 at 9:57 AM, >

Re: csrf_token during registration is giving me problems

2017-08-01 Thread Dylan Reinhold
You have a quoting miss-match in your enctype, that might be messing with the csrf_token I keep getting the following error: > > > Forbidden (403) >> >> CSRF verification failed. Request aborted. >> Help >> >> Reason given for failure: >> >&g

csrf_token during registration is giving me problems

2017-08-01 Thread pieceofkayk2718
sed > correctly. For POST forms, you need to ensure: > >- Your browser is accepting cookies. >- The view function passes a request to the template's render > > <https://docs.djangoproject.com/en/dev/topics/templates/#django.template.backends.base.Template.render> >

Re: csrf_token is not being set when using Jinja2

2014-01-18 Thread Chen Xu
That gives me : Encountered unknown tag 'csrf_token'. Thanks On Sat, Jan 18, 2014 at 8:57 PM, Mario Gudelj wrote: > Try {% csrf_token %} by itself > On 19/01/2014 12:12 pm, "Chen Xu" wrote: > >> Hi everyone, >> I am using Jinja2 instead of D

Re: csrf_token is not being set when using Jinja2

2014-01-18 Thread Mario Gudelj
Try {% csrf_token %} by itself On 19/01/2014 12:12 pm, "Chen Xu" wrote: > Hi everyone, > I am using Jinja2 instead of Django's own template engine, however I am > having an issue where csrf_token is empty, I included the following line in > my form: > > > &g

csrf_token is not being set when using Jinja2

2014-01-18 Thread Chen Xu
Hi everyone, I am using Jinja2 instead of Django's own template engine, however I am having an issue where csrf_token is empty, I included the following line in my form: But csrf_token has no value. Can someone help? Thanks in advance -- ⚡ Chen Xu ⚡ -- You received this message be

Re: UserWarning: A {% csrf_token %} was used in a template, but the context did not provide the value.

2013-11-19 Thread huw_at1
Hi, Many thanks. There is another form in the page which does contain this {% csrf_token %} tag. Removing this does remove the warning so this is indeed the issue. I just need to write the other form out of the template. Thanks for the answer :) On Tuesday, 19 November 2013 13:51:55 UTC

Re: UserWarning: A {% csrf_token %} was used in a template, but the context did not provide the value.

2013-11-19 Thread huw_at1
Calacoci wrote: > > Il 19/11/2013 13:45, huw_at1 ha scritto: > > {% csrf_token %} > > If you are using the ajax metod, you don't need this tag in the form > template. > > According with the documentation, you set the csrf token using javascript > in the bef

Re: UserWarning: A {% csrf_token %} was used in a template, but the context did not provide the value.

2013-11-19 Thread Giulio Calacoci
Il 19/11/2013 13:45, huw_at1 ha scritto: {% csrf_token %} If you are using the ajax metod, you don't need this tag in the form template. According with the documentation, you set the csrf token using javascript in the beforeSend part of the javascript code. Hope I've correctly

UserWarning: A {% csrf_token %} was used in a template, but the context did not provide the value.

2013-11-19 Thread huw_at1
Hi there, I'm trying to get to the bottom of this warning that I am getting: /usr/local/lib/python2.7/site-packages/django/template/defaulttags.py:59: UserWarning: A {% csrf_token %} was used in a template, but the context did not provide the value. This is usually caused by not

Re: How to insert a csrf_token when entering datas through a bot ?

2011-04-13 Thread dave b
On 12 April 2011 22:09, JustinMarsan wrote: > Hello, > > What would be the best way to allow some bots to POST some content to > a website. Without crsf_token, the bot will get a 403, and I would > prefer not to remove this behavior but rather find a way to make the > bot send a token. How could I

How to insert a csrf_token when entering datas through a bot ?

2011-04-12 Thread JustinMarsan
Hello, What would be the best way to allow some bots to POST some content to a website. Without crsf_token, the bot will get a 403, and I would prefer not to remove this behavior but rather find a way to make the bot send a token. How could I do that ? I was thinking of making sure the bot is aut

Re: csrf_token not enclosed in hidden element

2010-11-04 Thread Erik Cederstrand
Ah, I see. Thanks! Erik Den 04/11/2010 kl. 11.17 skrev Menno Luiten: > That's because you have to use {% csrf_token %} instead of {{ ... }} in your > template code. Confusing, perhaps, but have encountered it several times > myself. > > Regards, > Menno > >

Re: csrf_token not enclosed in hidden element

2010-11-04 Thread Menno Luiten
That's because you have to use {% csrf_token %} instead of {{ ... }} in your template code. Confusing, perhaps, but have encountered it several times myself. Regards, Menno On 11/04/2010 11:10 AM, Erik Cederstrand wrote: Hi, I have a view that creates a login page. I use the @csrf_pr

csrf_token not enclosed in hidden element

2010-11-04 Thread Erik Cederstrand
Hi, I have a view that creates a login page. I use the @csrf_protect decorator on my view and {{csrf_token}} tag in the template, and the generated response contains the csrf token. The problem is that the token is printed as-is instead of being enclosed i a hidden element, as I understand

Re: {% csrf_token %} template tag not outputting the hidden field

2010-09-01 Thread Jonas Geiregat
)) Regards, Jonas. Op 30-aug-2010, om 20:46 heeft Erik het volgende geschreven: > Hi Django Users- > I'm having trouble with the {% csrf_token %} tag. > On my site I have a regular login view / page / url, which uses > the django contrib registration app. I include the

Re: {% csrf_token %} template tag not outputting the hidden field

2010-08-31 Thread Erik
w to write template tags. thanks, Erik On Aug 30, 4:16 pm, Daniel Lathrop wrote: > I may misunderstand how csrf_token works, but I think it needs to be used in > conjunction with the forms system, which would require you to pass a form to > your template. Are you doing that? > &

Re: {% csrf_token %} template tag not outputting the hidden field

2010-08-30 Thread Daniel Lathrop
I may misunderstand how csrf_token works, but I think it needs to be used in conjunction with the forms system, which would require you to pass a form to your template. Are you doing that? Daniel Lathrop News Applications Editor The Dallas Morning News --- Daniel Lathrop

{% csrf_token %} template tag not outputting the hidden field

2010-08-30 Thread Erik
Hi Django Users- I'm having trouble with the {% csrf_token %} tag. On my site I have a regular login view / page / url, which uses the django contrib registration app. I include the CSRF token in my login template and it works fine. I'd also like a little login box in the

Re: Stuck with csrf_token in the tutorial

2009-12-13 Thread Mookie
> > > Running django 1.1.1 > > > > I'm going through the tutorial and have run into trouble implementing > > > a form, I get: > > >    TemplateSyntaxError at /polls/1/ > > >    Invalid block tag: 'csrf_token' > > > csrf_token d

Re: Stuck with csrf_token in the tutorial

2009-11-09 Thread wietse
On Nov 9, 3:38 pm, Karen Tracey wrote: > On Mon, Nov 9, 2009 at 9:35 AM, wietse wrote: > > Running django 1.1.1 > > > I'm going through the tutorial and have run into trouble implementing > > a form, I get: > >    TemplateSyntaxError at /polls/1/ &g

Re: Stuck with csrf_token in the tutorial

2009-11-09 Thread Karen Tracey
On Mon, Nov 9, 2009 at 9:35 AM, wietse wrote: > > Hello, > > Running django 1.1.1 > > I'm going through the tutorial and have run into trouble implementing > a form, I get: >TemplateSyntaxError at /polls/1/ > Invalid block tag: 'csrf_token' > &

Stuck with csrf_token in the tutorial

2009-11-09 Thread wietse
Hello, Running django 1.1.1 I'm going through the tutorial and have run into trouble implementing a form, I get: TemplateSyntaxError at /polls/1/ Invalid block tag: 'csrf_token' I've searched around but find it hard to grok what I need to do. I