Changeset - 41ba224759b8
[Not reviewed]
0 3 0
Christopher Neugebauer - 7 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
...
 
@@ -11,25 +11,25 @@
 

	
 
{% block lede %}
 
  P-Town. Rivertown. That place where the cows are. No matter that you call Petaluma, we want you to join us here for a great weekend of Python talks and networking. North Bay Python tickets start at $25 for unaffiliated individuals, and $180 for corporate attendees.
 
{% endblock %}
 

	
 

	
 
{% 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>
 

	
 
<p><strong>For company employees, and individuals who can legitimately claim the cost of attending the conference as a business expense or a tax deduction</strong>.</p>
 

	
 
<p>Includes a free t-shirt, and recognition of your affiliation on your conference badge and on the conference supporters list. Group discounts are available for organizations that buy 5 or more tickets.</p>
 

	
 
<h3>Individual Supporter <small>$100 ($80 Early Bird)</small></h3>
 

	
...
 
@@ -92,25 +92,25 @@
 
  <td> No </td><td>Personal projects only</td><td> Yes </td><td>Yes</td></tr>
 
<tr>
 
  <th>Supporter recognition</th>
 
  <td> None </td><td>For you </td><td>For you and your company </td><td>Top billing for you and your company or project</td></tr>
 
<tr>
 
  <th>Sponsor benefits</th>
 
  <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>
 
<p>Two days of high-caliber talks about Python, and meeting new Pythonistas at North Bay Python.</p>
 

	
 
<h3>Lunch</h3>
 
<p>In order to keep ticket costs as low as possible, we won’t be catering lunch this year.</p>
 

	
 
<p>To make up for it, we’ve located our conference right in the middle of Historic Downtown Petaluma’s restaurant district. You can find everything from market delis and barbecue, through to Michelin-rated restaurants, all within 5 minutes walk. You’ll get a better lunch than we’d ever be able to cater, for much less. We'll have a locals' guide to Petaluma to help you find places to eat.</p>
pinaxcon/urls.py
Show inline comments
...
 
@@ -22,24 +22,25 @@ urlpatterns = [
 
    url(r"^about/colophon$", TemplateView.as_view(template_name="static_pages/about/colophon.html"), name="about/colophon"),
 

	
 
    # program
 
    url(r"^program/events$", TemplateView.as_view(template_name="static_pages/program/events.html"), name="program/events"),
 
    url(r"^program/call-for-proposals$", TemplateView.as_view(template_name="static_pages/program/call_for_proposals.html"), name="program/call-for-proposals"),
 
    url(r"^program/selection-process$", TemplateView.as_view(template_name="static_pages/program/selection_process.html"), name="program/selection-process"),
 
    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"),
 
    url(r"^code-of-conduct/harassment-staff-procedures$", TemplateView.as_view(template_name="static_pages/code_of_conduct/harassment_procedure_staff.html"), name="code-of-conduct/harassment-staff-procedures"),
 
    url(r"^terms-and-conditions$", TemplateView.as_view(template_name="static_pages/terms_and_conditions.html"), name="terms-and-conditions"),
 
    url(r"^terms$", RedirectView.as_view(url="terms-and-conditions")),
 

	
 
    # sponsor
 
    url(r"^sponsors/prospectus$", RedirectView.as_view(url=_static("assets/northbaypython_prospectus.pdf")), name="sponsors/prospectus"),
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
 
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)))
 

	
...
 
@@ -19,12 +20,21 @@ 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.')
 

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