DjangoBB

Django based forum engine

  • You are not logged in.

#1 Feb. 20, 2012 12:20:45

husbas
Registered: 2012-02-20
Posts: 1
Reputation: +  0  -
Profile   Send e-mail  

Unable to see Sign up and Log in links

Hi,
I have installed DjangoBB forum. Everything seems to be running fine except that I am unable to see link for sign-up and log in.
Am I missing any settings?

Is having django-registration and/or django-authopenid must to get these links?

Offline

#2 Feb. 21, 2012 10:42:57

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

Unable to see Sign up and Log in links

Offline

#3 April 11, 2012 18:44:11

hbeck
Registered: 2012-04-11
Posts: 6
Reputation: +  0  -
Profile   Send e-mail  

Unable to see Sign up and Log in links

The header (with Sign In/Out and Register links) in the sample project does not work without the django-authopenid app.

I am integrating djangobb with another project (using it as an app) and don't want to use authopenid. Can I just use the basic django-registration hooks? How would I do this?

Offline

#4 April 12, 2012 10:44:29

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

Unable to see Sign up and Log in links

Offline

#5 April 13, 2012 00:29:48

hbeck
Registered: 2012-04-11
Posts: 6
Reputation: +  0  -
Profile   Send e-mail  

Unable to see Sign up and Log in links

slav0nic
redefine some templates, saw djangobb-project
https://bitbucket.org/slav0nic/djangobb_project/src/bfbe9be77354/basic_project/templates/djangobb_forum/header.html

Unfortunately not quite that simple, as I get http://dpaste.com/730854/ as an error if I remove django-authopenid. The error can be produced by hitting the user profile url (/forum/user/test/) when not logged in.

@transaction.commit_on_success
def user(request, username, section='essentials', action=None, template='djangobb_forum/profile/profile_essentials.html', form_class=EssentialsProfil$
user = get_object_or_404(User, username=username)
if request.user.is_authenticated() and user == request.user or request.user.is_superuser:
profile_url = reverse('djangobb:forum_profile_%s' % section, args=[user.username])
form = build_form(form_class, request, instance=user.forum_profile, extra_args={'request': request})
if request.method == 'POST' and form.is_valid():
form.save()
return HttpResponseRedirect(profile_url)
return render(request, template, {'active_menu': section,
'profile': user,
'form': form,
})
else:
topic_count = Topic.objects.filter(user__id=user.id).count()
if user.forum_profile.post_count < forum_settings.POST_USER_SEARCH and not request.user.is_authenticated():
return HttpResponseRedirect(reverse('user_signin') + '?next=%s' % request.path)
return render(request, template, {'profile': user,
'topic_count': topic_count,
})
In the code (views.py) specifically there are 3 instances of this HttpResponseRedirect(reverse('user_signin')… which is hard-tied to having the user_signin named pattern, which does not exist outside of django-authopenid.

What is the best approach here to change that? Should I create another URL conf that maps the user_signin name to the current basic auth URLs? Or should I edit/override these 3 view functions that reference user_signin?

Offline

#6 April 13, 2012 13:53:25

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

Unable to see Sign up and Log in links

yes, create another url

Offline

Board footer

Moderator control

Powered by DjangoBB

Lo-Fi Version