google-code-export / django-grappelli

Automatically exported from code.google.com/p/django-grappelli
0 stars 0 forks source link

Invalid block tag: 'csrf_token' #134

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. get the latest version of grappelli2
2. login to the admin area

What is the expected output? What do you see instead?
The admin area should load without an error. Instead im faced with "Invalid 
block tag: 'csrf_token'"

What version of the product are you using? On what operating system?
Grappelli2 django 1.1

Original issue reported on code.google.com by ben...@rawjam.co.uk on 18 Nov 2009 at 5:49

GoogleCodeExporter commented 9 years ago
yes, I know. that tag is there since django 1.2 (resp. the current django 
trunk).
have to check, if there´s a workaround ...

Original comment by sehmaschine on 19 Nov 2009 at 7:05

GoogleCodeExporter commented 9 years ago

Original comment by sehmaschine on 19 Nov 2009 at 7:05

GoogleCodeExporter commented 9 years ago
Thanks. For now i've just removed that code block from the template - 
presumably it wont alter functionality too 
much?

Original comment by ben...@rawjam.co.uk on 19 Nov 2009 at 7:49

GoogleCodeExporter commented 9 years ago
I thought the grappelli policy was to develop against the latest django 
release.  At
least it would be nice if the grappelli release worked against the django 
release;
let's make it easy for people to find this great product and use it.  

Two options occur to me: 1) create a release branch, take out csrf_token, and 
issue a
dot release without it; 2) add a no-op csrf_token tag conditional on django 
version
being lower than 1.2.

Original comment by jsmull...@gmail.com on 19 Nov 2009 at 1:54

GoogleCodeExporter commented 9 years ago
@jsmullyan: you´re absolutely right with the policy. as soon as I have some 
spare
time, I´ll take care about this issue.

Original comment by sehmaschine on 19 Nov 2009 at 4:50

GoogleCodeExporter commented 9 years ago
should be solved with r689 (works with django 1.1.1 and SVN)

Original comment by sehmaschine on 28 Nov 2009 at 10:21

GoogleCodeExporter commented 9 years ago
The issue still exists in change_password.html, delete_confirmation, 
password_change_form, 
password_reset_form, password_reset_confirm and template_validator

Original comment by ben...@rawjam.co.uk on 3 Dec 2009 at 5:32

GoogleCodeExporter commented 9 years ago
Oh and the login page, and probably a few others

Original comment by ben...@rawjam.co.uk on 3 Dec 2009 at 5:35

GoogleCodeExporter commented 9 years ago

Original comment by sehmaschine on 3 Dec 2009 at 7:54

GoogleCodeExporter commented 9 years ago
thanks for the hint. with r692, I hope we´ve got all the templates now ...

Original comment by sehmaschine on 3 Dec 2009 at 8:49

GoogleCodeExporter commented 9 years ago
This is still erroring on some pages. I just found it in 
delete_confirmation.html.

Can you just do a search in the templates folder for {% csrf_token %} and 
you'll find them all?

Original comment by ben...@rawjam.co.uk on 9 Dec 2009 at 4:16

GoogleCodeExporter commented 9 years ago
Argh, its in all of the password change forms as well

Original comment by ben...@rawjam.co.uk on 9 Dec 2009 at 4:19

GoogleCodeExporter commented 9 years ago
are you sure you´re having the newest version? just take a look at the 
source-code
... csrf_token is not there anymore ...

e.g.
http://code.google.com/p/django-grappelli/source/browse/trunk/grappelli/template
s/admin/delete_confirmation.html
... where do you find {% csrf_token %} within this template?

Original comment by sehmaschine on 9 Dec 2009 at 4:30

GoogleCodeExporter commented 9 years ago
Really strange. I've cleared out the repo on my local machine and re-grabbed it 
from svn. I can confirm it is 
version 692, yet the login.html page (for example) still shows the old 
csrf_token tag - though i can see if i 
browse to the repo directly here it has the updated one. Any suggestions?

Original comment by ben...@rawjam.co.uk on 10 Dec 2009 at 10:07

GoogleCodeExporter commented 9 years ago
I'm using Grappelli2, is that the reason its not working? Have you possibly 
just added that functionality to the 
main trunk and not grappelli2 also?

Original comment by ben...@rawjam.co.uk on 10 Dec 2009 at 10:08

GoogleCodeExporter commented 9 years ago
grappelli2 is just a branch - and it´s outdated since we merged that branch 
with the
trunk (see the according updates).
I´m sorry if this wasn´t clear enough ...

Original comment by sehmaschine on 10 Dec 2009 at 10:22

GoogleCodeExporter commented 9 years ago
Ahhhh that would make sense. I wasnt aware the branches had been merged.

Original comment by ben...@rawjam.co.uk on 10 Dec 2009 at 10:29