Changeset - 41ba224759b8
[Not reviewed]
0 3 0
Christopher Neugebauer - 6 years ago 2017-10-02 23:29:40
chrisjrn@gmail.com
Adds special login link for buy_tickets that displays an message
3 files changed with 14 insertions and 3 deletions:
0 comments (0 inline, 0 general)
pinaxcon/templates/static_pages/attend/attend.html
Show inline comments
...
 
@@ -17,13 +17,13 @@
 
{% block content %}
 

	
 
<p>To buy a ticket, <a href="/dashboard">create an account, and go to the dashboard</a>. If you've already bought a ticket, you can check out our information on <a href="/attend/hotels">where to stay</a> if you want to come up for the weekend, and <a href="/attend/travel">how to get here</a>.</p>
 

	
 
<br />
 

	
 
<div class="pull-right"><a class="btn btn-lg btn-primary" href="/dashboard">Buy a Ticket</a></div>
 
<div class="pull-right"><a class="btn btn-lg btn-primary" href="/tickets/buy">Buy a Ticket</a></div>
 
<h2>Which Ticket?</h2>
 

	
 
<p><em>Early Bird discounts are available for the first 100 tickets sold, or until October 20, whichever comes first. T-shirts are only available for tickets bought before November 7.</em></p>
 

	
 
<h3>Corporate <small>$200 ($180 Early Bird)</small></h3>
 

	
...
 
@@ -98,13 +98,13 @@
 
  <td> No </td><td>No</td><td> No </td><td>Yes</td></tr>
 
</table>
 

	
 
<p>If you can’t afford to attend on these prices, please email <a href="mailto:spam@northbaypthon.org">spam@northbaypython.org</a> – we’ll enthusiastically waive ticket fees for people who need it.</em></p>
 

	
 
<div class="btn-group">
 
  <a class="btn btn-lg btn-primary" href="/dashboard">Buy a Ticket</a>
 
  <a class="btn btn-lg btn-primary" href="/tickets/buy">Buy a Ticket</a>
 
</div>
 

	
 

	
 
<h2>Benefits</h2>
 

	
 
<h3>Conference access</h3>
pinaxcon/urls.py
Show inline comments
...
 
@@ -28,12 +28,13 @@ urlpatterns = [
 
    url(r"^proposals$", RedirectView.as_view(url="program/call-for-proposals")),
 
    url(r"^cfp$", RedirectView.as_view(url="program/call-for-proposals")),
 

	
 
    # attend
 
    url(r"^attend$", TemplateView.as_view(template_name="static_pages/attend/attend.html"), name="attend/attend"),
 
    url(r"^tickets$", RedirectView.as_view(url="attend")),
 
    url(r"^tickets/buy$", views.buy_ticket, name="buy_ticket"),
 
    url(r"^attend/business-case$", TemplateView.as_view(template_name="static_pages/attend/business-case.html"), name="attend/business-case"),
 
    url(r"^attend/travel$", TemplateView.as_view(template_name="static_pages/attend/travel.html"), name="attend/travel"),
 
    url(r"^attend/hotels$", TemplateView.as_view(template_name="static_pages/attend/hotels.html"), name="attend/hotels"),
 

	
 
    url(r"^code-of-conduct$", TemplateView.as_view(template_name="static_pages/code_of_conduct/code_of_conduct.html"), name="code-of-conduct"),
 
    url(r"^code-of-conduct/harassment-incidents$", TemplateView.as_view(template_name="static_pages/code_of_conduct/harassment_procedure_attendee.html"), name="code-of-conduct/harassment-incidents"),
pinaxcon/views.py
Show inline comments
 
from django.conf import settings
 
from django.contrib import messages
 
from django.http import HttpResponseServerError
 
from django.shortcuts import render
 
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
...
 
@@ -25,6 +26,15 @@ def account_login(request):
 
    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.')
 

	
 
    return redirect("/dashboard")
0 comments (0 inline, 0 general)