Files
@ 0b0b679d1855
Branch filter:
Location: CopyleftConf/copyleftconf-website/pinaxcon/views.py - annotation
0b0b679d1855
1.4 KiB
text/x-python
Remove unwanted dependencies.
This doesn't remove all trace of them but it's enough to avoid installing
them and still be able to see the front page.
This doesn't remove all trace of them but it's enough to avoid installing
them and still be able to see the front page.
a6cf86f82654 41ba224759b8 ce1e8dd6d710 41ba224759b8 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 41ba224759b8 41ba224759b8 41ba224759b8 41ba224759b8 41ba224759b8 41ba224759b8 dd6aaf9b285c dd6aaf9b285c dd6aaf9b285c dd6aaf9b285c dd6aaf9b285c 41ba224759b8 41ba224759b8 | from django.conf import settings
from django.contrib import messages
from django.http import HttpResponseServerError
from django.shortcuts import redirect, 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
def buy_ticket(request):
print(dir(request.user))
if not request.user.is_authenticated():
messages.warning(request,
'''To buy a ticket, either create an account, or log in.
Attendees should fill out their own registration.
You will receive a payment link that you can pass to accounts
staff, if required. ''')
return redirect("/dashboard")
|