Django-sitegate help please

Associate
Joined
19 Jul 2006
Posts
1,847
Newish to django and python but been working through a tutorial and got something working however I'm trying to improve its functionality.
They have told us to use http://django-sitegate.readthedocs.org/en/latest/ which works well, for getting users to sign in /up with there email and a password. I have 2 issues
1 i cant get redirect to work http://django-sitegate.readthedocs.org/en/latest/utils.html#redirect-signedin
Code:
from django.shortcuts import render
from django.views.generic import TemplateView
from django.views.generic.list import ListView
from django.views.generic.detail import DetailView
from django.views.generic.edit import CreateView, UpdateView
from sitegate.decorators import redirect_signedin, sitegate_view, signup_view
from sitegate.signup_flows.classic import ClassicSignup
import core.models as coremodels
# Create your views here.

class RaceListView(ListView):
	model = coremodels.Race
	template_name = 'race/list.html'
	paginate_by = 5
#other views

@sitegate_view(widget_attrs={'class': 'form-control', 'placeholder': lambda f: f.label}, template='form_bootstrap3') # This also prevents logged in users from accessing our sign in/sign up page.
@redirect_signedin('/race/list.html')
def entrance(request):
    return render(request, 'base/entrance.html', {'title': 'Sign in & Sign up'})

But also I cant get it to change from needing an email address to sign up to just a username (if you try doing it with out a @ sign then it doesnt validate) and I display this 'username' later on I have had a look at the classic view here http://django-sitegate.readthedocs.org/en/latest/signin_custom.html#sign-in-flows but again this doesnt work. I tried all the variables I can of it is there anything that I'm missing
 
Back
Top Bottom