Files
@ 348a397abab1
Branch filter:
Location: CopyleftConf/copyleftconf-website/pinaxcon/views.py - annotation
348a397abab1
963 B
text/x-python
First stab at a "pitch your boss" page.
No idea if this is the direction we want to go in but have a look.
No idea if this is the direction we want to go in but have a look.
a6cf86f82654 ce1e8dd6d710 a6cf86f82654 ce1e8dd6d710 ce1e8dd6d710 ce1e8dd6d710 ce1e8dd6d710 ce1e8dd6d710 a6cf86f82654 0487525f5c26 a6cf86f82654 ce1e8dd6d710 ce1e8dd6d710 ce1e8dd6d710 a6cf86f82654 a6cf86f82654 a6cf86f82654 a6cf86f82654 a6cf86f82654 0487525f5c26 a6cf86f82654 a6cf86f82654 a6cf86f82654 a6cf86f82654 a6cf86f82654 a6cf86f82654 0487525f5c26 0487525f5c26 0487525f5c26 0487525f5c26 | from django.conf import settings
from django.http import HttpResponseServerError
from django.shortcuts import render
from django.template import RequestContext
from django.template import Template
from django.template.loader import get_template
from django.views import defaults
from account.forms import LoginEmailForm, LoginUsernameForm, SignupForm
from account.views import LoginView
def server_error(request, template_name=defaults.ERROR_500_TEMPLATE_NAME):
t = Template("{%% include '%s' %%}" % template_name)
return HttpResponseServerError(t.render(RequestContext(request)))
def account_login(request):
d = {
"login_form": LoginEmailForm(),
"signup_form": SignupForm(),
"signup_open": getattr(settings, "ACCOUNT_OPEN_SIGNUP", True),
}
print d["signup_open"], settings.ACCOUNT_OPEN_SIGNUP
return render(request, "account_login.html", d)
class EmailLoginView(LoginView):
form_class = LoginEmailForm
|