DjangoBB

Django based forum engine

  • You are not logged in.

#1 May 30, 2012 19:38:22

Tyrant
Registered: 2012-05-30
Posts: 3
Reputation: +  0  -
Profile   Send e-mail  

Adding to an existing project

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

Offline

#2 June 1, 2012 12:23:04

slav0nic
DjangoBB Developer
From: Ukraine
Registered: 2009-10-25
Posts: 382
Reputation: +  5  -
Profile   Send e-mail  

Adding to an existing project

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

check user object in template

Edited slav0nic (June 1, 2012 12:23:32)

Offline

#3 June 2, 2012 20:42:21

Tyrant
Registered: 2012-05-30
Posts: 3
Reputation: +  0  -
Profile   Send e-mail  

Adding to an existing project

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?

Edited Tyrant (June 2, 2012 20:42:49)

Offline

#4 June 2, 2012 21:25:44

slav0nic
DjangoBB Developer
From: Ukraine
Registered: 2009-10-25
Posts: 382
Reputation: +  5  -
Profile   Send e-mail  

Adding to an existing project

yes
check projects/basic_project

Offline

#5 June 6, 2012 01:59:47

lehins
Registered: 2012-06-06
Posts: 1
Reputation: +  0  -
Profile   Send e-mail  

Adding to an existing project

I just had the same problem.
make sure you have inside your settings.py
TEMPLATE_CONTEXT_PROCESSORS = (
……
“django.core.context_processors.request”,
……
)

Offline

#6 June 10, 2012 02:05:29

Tyrant
Registered: 2012-05-30
Posts: 3
Reputation: +  0  -
Profile   Send e-mail  

Adding to an existing project

I got it to work now. I think the issue was what lehins describes, I seem to have forgotten the processor.

Sorry about that!

Offline

Board footer

Moderator control

Powered by DjangoBB

Lo-Fi Version