Django error in django's context.py

222 views
Skip to first unread message

zayatzz

unread,
May 26, 2010, 12:13:05 PM5/26/10
to Django users
Hello

I created new project, added bunch of apps (which are required for
django cms 2.0) and when i proceeded to admin, to create first set of
pages i got this error:

http://pastebin.com/ZYKuuz85

I also mentioned it in django cms 2.0 group here :http://
groups.google.com/group/django-cms/browse_thread/thread/
4bb7b51fcdad09f8

Can anyone take a guess how i could fix this?

Alan

Karen Tracey

unread,
May 26, 2010, 3:26:28 PM5/26/10
to django...@googlegroups.com

Please, when you are going to cut and paste a traceback somewhere, first click the link to switch to copy-and-paste view. It's extremely difficult to read the non-copy-and-paste-view version when it's been copy-and-pasted. You don't give many details of what you've done, exactly, but the traceback seems to indicate the admin views have been wrapped in a cache decorator, and that is causing a problem. What have you specified for your admin urlpattern(s), exactly? 

Karen
--
http://tracey.org/kmt/

zayatzz

unread,
May 26, 2010, 4:49:01 PM5/26/10
to Django users

On May 26, 10:26 pm, Karen Tracey <kmtra...@gmail.com> wrote:

i just uncommented the line that already existed in urls.py

Alan

zayatzz

unread,
Jun 6, 2010, 3:40:35 AM6/6/10
to Django users
I have been trying to track down this issue and here is what i found.

I created new project. Its settings are like this:
http://pastebin.com/CyiGv3nk

If the line #"jalka.context.loginform" is commented out, i can
go to admin just fine.

I i comment it in. i get
http://pastebin.com/A1mzRqFG

context of the loginform are:
http://pastebin.com/gShhLeM8

I commented everything out just to check if it changes anything. It
didnt.

Could someone please explain, what am i doing wrong?

Alan

zayatzz

unread,
Jun 6, 2010, 11:47:24 AM6/6/10
to Django users
Ok. just by testing it over and over i figured out what the problem
was.

The problem was, that you could not use 'pass' in context processor.

If i did it like this:
loginform(request):
if request.user.is_authenticated():
return {}
else:
from django.contrib.auth.forms import AuthenticationForm
from jalka.game.forms import UserCreationForm
authform = AuthenticationForm()
regform = UserCreationForm()
return { 'authform':authform, 'regform':regform }

It worked just fine

Alan.

On Jun 6, 10:40 am, zayatzz <alan.kesselm...@gmail.com> wrote:
> I have been trying to track down this issue and here is what i found.
>
> I created new project. Its settings are like this:http://pastebin.com/CyiGv3nk
>
> If the line       #"jalka.context.loginform" is commented out, i can
> go to admin just fine.
>
> I i comment it in. i gethttp://pastebin.com/A1mzRqFG
Reply all
Reply to author
Forward
0 new messages