Search - User list
Full Version: Adding to an existing project
Root » The Other » Adding to an existing project
1
Tyrant
Hey guys!
I'm stuck adding djangobb to my existing project.

I downloaded and installed djangobb (and all its dependencies) but now I can't get it to work. I tried adding everything my “project1/settings.py” was missing (compared to basic_project/settings.py) and added a new URL rule:
(r'^forum/', include('djangobb_forum.urls', namespace='djangobb')),
I copied search_sites.py from basic_project to my project, but when I try to open localhost:8000/forum I get the following error:

AttributeError at /forum/

'str' object has no attribute 'is_authenticated'

Request Method: GET
Request URL: http://localhost:8000/forum/
Django Version: 1.4
Exception Type: AttributeError
Exception Value:

'str' object has no attribute 'is_authenticated'

Exception Location: /usr/lib/python2.7/site-packages/djangobb_forum-0.0.1a0-py2.7.egg/djangobb_forum/templatetags/forum_extras.py in set_theme_style, line 272
Python Executable: /usr/bin/python2
Python Version: 2.7.3
Python Path:

['/home/fabian/projects/privat/elolog',
'/usr/lib/python2.7/site-packages/djangobb_forum-0.0.1a0-py2.7.egg',
'/usr/lib/python2.7/site-packages/postmarkup-1.2.0-py2.7.egg',
'/usr/lib/python2.7/site-packages/django_pagination-1.0.7-py2.7.egg',
'/usr/lib/python2.7/site-packages/django_haystack-1.2.7-py2.7.egg',
'/usr/lib/python2.7/site-packages/PIL-1.1.7-py2.7-linux-x86_64.egg',
'/usr/lib/python2.7/site-packages/Whoosh-2.5.0-py2.7.egg',
'/usr/lib/python27.zip',
'/usr/lib/python2.7',
'/usr/lib/python2.7/plat-linux2',
'/usr/lib/python2.7/lib-tk',
'/usr/lib/python2.7/lib-old',
'/usr/lib/python2.7/lib-dynload',
'/usr/lib/python2.7/site-packages',
'/usr/lib/python2.7/site-packages/gtk-2.0',
'/usr/lib/python2.7/site-packages/setuptools-0.6c11.egg-info',
'/opt/elolog/']

Server time: Wed, 30 May 2012 18:35:36 +0200

What did I do wrong?

regards,
Tyrant
slav0nic
traced on user.is_authenticated(), did u used any exotic auth backends?

check user object in template
Tyrant
No, I use the builtin authentication stuff and django-registration but that doesn't fiddle with the user object.

I will try to trace this further, reporting back when I know more.

edit: The way I tried to install and run it is correct, aye?
slav0nic
yes
check projects/basic_project
lehins
I just had the same problem.
make sure you have inside your settings.py
TEMPLATE_CONTEXT_PROCESSORS = (
……
“django.core.context_processors.request”,
……
)
Tyrant
I got it to work now. I think the issue was what lehins describes, I seem to have forgotten the processor.

Sorry about that!
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB