Search - User list
Full Version: Unable to see Sign up and Log in links
Root » The Other » Unable to see Sign up and Log in links
1
husbas
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?
slav0nic
check https://bitbucket.org/slav0nic/djangobb_project [bitbucket.org]
hbeck
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?
slav0nic
redefine some templates, saw djangobb-project
https://bitbucket.org/slav0nic/djangobb_project/src/bfbe9be77354/basic_project/templates/djangobb_forum/header.html
hbeck
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?
slav0nic
yes, create another url
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