Merge branch 'chrisjrn/ticket-launch'
This commit is contained in:
commit
ebb50e3da2
20 changed files with 962 additions and 100 deletions
|
@ -7,7 +7,3 @@ from django.utils.translation import ugettext_lazy as _
|
||||||
class UserProfileAdmin(admin.ModelAdmin):
|
class UserProfileAdmin(admin.ModelAdmin):
|
||||||
model = models.AttendeeProfile
|
model = models.AttendeeProfile
|
||||||
list_display = ("name", "company", "name_per_invoice")
|
list_display = ("name", "company", "name_per_invoice")
|
||||||
|
|
||||||
@admin.register(models.DynamicValues)
|
|
||||||
class DynamicValuesAdmin(admin.ModelAdmin):
|
|
||||||
pass
|
|
||||||
|
|
0
pinaxcon/registrasion/management/__init__.py
Normal file
0
pinaxcon/registrasion/management/__init__.py
Normal file
0
pinaxcon/registrasion/management/commands/__init__.py
Normal file
0
pinaxcon/registrasion/management/commands/__init__.py
Normal file
417
pinaxcon/registrasion/management/commands/populate_inventory.py
Normal file
417
pinaxcon/registrasion/management/commands/populate_inventory.py
Normal file
|
@ -0,0 +1,417 @@
|
||||||
|
from collections import namedtuple
|
||||||
|
from datetime import datetime
|
||||||
|
from datetime import timedelta
|
||||||
|
from decimal import Decimal
|
||||||
|
from django.contrib.auth.models import Group
|
||||||
|
from django.core.exceptions import ObjectDoesNotExist
|
||||||
|
from django.core.management.base import BaseCommand, CommandError
|
||||||
|
|
||||||
|
from registrasion.models import inventory as inv
|
||||||
|
from registrasion.models import conditions as cond
|
||||||
|
from symposion import proposals
|
||||||
|
|
||||||
|
class Command(BaseCommand):
|
||||||
|
help = 'Populates the inventory with the NBPy2017 inventory model'
|
||||||
|
|
||||||
|
def add_arguments(self, parser):
|
||||||
|
pass
|
||||||
|
|
||||||
|
def handle(self, *args, **options):
|
||||||
|
|
||||||
|
kinds = []
|
||||||
|
for i in ("talk", ):
|
||||||
|
kinds.append(proposals.models.ProposalKind.objects.get(name=i))
|
||||||
|
self.main_conference_proposals = kinds
|
||||||
|
|
||||||
|
self.populate_groups()
|
||||||
|
self.populate_inventory()
|
||||||
|
self.populate_restrictions()
|
||||||
|
self.populate_discounts()
|
||||||
|
|
||||||
|
def populate_groups(self):
|
||||||
|
self.group_team = self.find_or_make(
|
||||||
|
Group,
|
||||||
|
("name", ),
|
||||||
|
name="Conference organisers",
|
||||||
|
)
|
||||||
|
self.group_volunteers = self.find_or_make(
|
||||||
|
Group,
|
||||||
|
("name", ),
|
||||||
|
name="Conference volunteers",
|
||||||
|
)
|
||||||
|
self.group_unpublish = self.find_or_make(
|
||||||
|
Group,
|
||||||
|
("name", ),
|
||||||
|
name="Can see unpublished products",
|
||||||
|
)
|
||||||
|
|
||||||
|
def populate_inventory(self):
|
||||||
|
# Categories
|
||||||
|
|
||||||
|
self.ticket = self.find_or_make(
|
||||||
|
inv.Category,
|
||||||
|
("name",),
|
||||||
|
name="Ticket",
|
||||||
|
description="Each type of ticket has different included products. "
|
||||||
|
"For details of what products are included, see our "
|
||||||
|
"<a href='/attend'>ticket sales page</a>.",
|
||||||
|
required = True,
|
||||||
|
render_type=inv.Category.RENDER_TYPE_RADIO,
|
||||||
|
limit_per_user=1,
|
||||||
|
order=1,
|
||||||
|
)
|
||||||
|
self.t_shirt = self.find_or_make(
|
||||||
|
inv.Category,
|
||||||
|
("name",),
|
||||||
|
name="T-Shirt",
|
||||||
|
description="Commemorative conference t-shirts, featuring secret "
|
||||||
|
"North Bay Python 2017 artwork. Details of sizing and "
|
||||||
|
"manufacturer are on our <a href='/attend/tshirts'>"
|
||||||
|
"t-shirts page</a>",
|
||||||
|
required = False,
|
||||||
|
render_type=inv.Category.RENDER_TYPE_ITEM_QUANTITY,
|
||||||
|
order=40,
|
||||||
|
)
|
||||||
|
self.extras = self.find_or_make(
|
||||||
|
inv.Category,
|
||||||
|
("name",),
|
||||||
|
name="Extras",
|
||||||
|
description="Other items that can improve your conference "
|
||||||
|
"experience.",
|
||||||
|
required = False,
|
||||||
|
render_type=inv.Category.RENDER_TYPE_QUANTITY,
|
||||||
|
order=60,
|
||||||
|
)
|
||||||
|
|
||||||
|
# Tickets
|
||||||
|
|
||||||
|
self.ticket_ind_sponsor = self.find_or_make(
|
||||||
|
inv.Product,
|
||||||
|
("name", "category",),
|
||||||
|
category=self.ticket,
|
||||||
|
name="Individual Sponsor",
|
||||||
|
price=Decimal("500.00"),
|
||||||
|
reservation_duration=hours(24),
|
||||||
|
order=1,
|
||||||
|
)
|
||||||
|
self.ticket_corporate = self.find_or_make(
|
||||||
|
inv.Product,
|
||||||
|
("name", "category",),
|
||||||
|
category=self.ticket,
|
||||||
|
name="Corporate",
|
||||||
|
price=Decimal("200.00"),
|
||||||
|
reservation_duration=hours(24),
|
||||||
|
order=10,
|
||||||
|
)
|
||||||
|
self.ticket_supporter = self.find_or_make(
|
||||||
|
inv.Product,
|
||||||
|
("name", "category",),
|
||||||
|
category=self.ticket,
|
||||||
|
name="Individual Supporter",
|
||||||
|
price=Decimal("100.00"),
|
||||||
|
reservation_duration=hours(24),
|
||||||
|
order=20,
|
||||||
|
)
|
||||||
|
self.ticket_unaffiliated = self.find_or_make(
|
||||||
|
inv.Product,
|
||||||
|
("name", "category",),
|
||||||
|
category=self.ticket,
|
||||||
|
name="Unaffiliated Individual",
|
||||||
|
price=Decimal("50.00"),
|
||||||
|
reservation_duration=hours(24),
|
||||||
|
order=30,
|
||||||
|
)
|
||||||
|
self.ticket_speaker = self.find_or_make(
|
||||||
|
inv.Product,
|
||||||
|
("name", "category",),
|
||||||
|
category=self.ticket,
|
||||||
|
name="Speaker",
|
||||||
|
price=Decimal("00.00"),
|
||||||
|
reservation_duration=hours(24),
|
||||||
|
order=50,
|
||||||
|
)
|
||||||
|
self.ticket_media = self.find_or_make(
|
||||||
|
inv.Product,
|
||||||
|
("name", "category",),
|
||||||
|
category=self.ticket,
|
||||||
|
name="Media",
|
||||||
|
price=Decimal("00.00"),
|
||||||
|
reservation_duration=hours(24),
|
||||||
|
order=60,
|
||||||
|
)
|
||||||
|
self.ticket_sponsor = self.find_or_make(
|
||||||
|
inv.Product,
|
||||||
|
("name", "category",),
|
||||||
|
category=self.ticket,
|
||||||
|
name="Sponsor",
|
||||||
|
price=Decimal("00.00"),
|
||||||
|
reservation_duration=hours(24),
|
||||||
|
order=70,
|
||||||
|
)
|
||||||
|
self.ticket_team = self.find_or_make(
|
||||||
|
inv.Product,
|
||||||
|
("name", "category",),
|
||||||
|
category=self.ticket,
|
||||||
|
name="Conference Organiser",
|
||||||
|
price=Decimal("00.00"),
|
||||||
|
reservation_duration=hours(24),
|
||||||
|
order=80,
|
||||||
|
)
|
||||||
|
self.ticket_volunteer = self.find_or_make(
|
||||||
|
inv.Product,
|
||||||
|
("name", "category",),
|
||||||
|
category=self.ticket,
|
||||||
|
name="Conference Volunteer",
|
||||||
|
price=Decimal("00.00"),
|
||||||
|
reservation_duration=hours(24),
|
||||||
|
order=90,
|
||||||
|
)
|
||||||
|
|
||||||
|
# Shirts
|
||||||
|
ShirtGroup = namedtuple("ShirtGroup", ("prefix", "sizes"))
|
||||||
|
shirt_names = {
|
||||||
|
"mens": ShirtGroup(
|
||||||
|
"Men's/Straight Cut Size",
|
||||||
|
("S", "M", "L", "XL", "2XL", "3XL", "5XL"),
|
||||||
|
),
|
||||||
|
"womens_classic": ShirtGroup(
|
||||||
|
"Women's Classic Fit",
|
||||||
|
("XS", "S", "M", "L", "XL", "2XL", "3XL"),
|
||||||
|
),
|
||||||
|
"womens_semi": ShirtGroup(
|
||||||
|
"Women's Semi-Fitted",
|
||||||
|
("S", "M", "L", "XL", "2XL", "3XL"),
|
||||||
|
),
|
||||||
|
}
|
||||||
|
|
||||||
|
self.shirts = {}
|
||||||
|
order = 0
|
||||||
|
for name, group in shirt_names.items():
|
||||||
|
self.shirts[name] = {}
|
||||||
|
prefix = group.prefix
|
||||||
|
for size in group.sizes:
|
||||||
|
product_name = "%s %s" % (prefix, size)
|
||||||
|
order += 10
|
||||||
|
self.shirts[name][size] = self.find_or_make(
|
||||||
|
inv.Product,
|
||||||
|
("name", "category",),
|
||||||
|
name=product_name,
|
||||||
|
category=self.t_shirt,
|
||||||
|
price=Decimal("30.00"),
|
||||||
|
reservation_duration=hours(1),
|
||||||
|
order=order,
|
||||||
|
)
|
||||||
|
|
||||||
|
def populate_restrictions(self):
|
||||||
|
|
||||||
|
# Hide the products that will eventually need a voucher
|
||||||
|
hide_voucher_products = self.find_or_make(
|
||||||
|
cond.GroupMemberFlag,
|
||||||
|
("description", ),
|
||||||
|
description="Can see hidden products",
|
||||||
|
condition=cond.FlagBase.ENABLE_IF_TRUE,
|
||||||
|
)
|
||||||
|
hide_voucher_products.group.set([self.group_unpublish])
|
||||||
|
hide_voucher_products.products.set([
|
||||||
|
self.ticket_media,
|
||||||
|
self.ticket_sponsor,
|
||||||
|
])
|
||||||
|
|
||||||
|
# Set limits.
|
||||||
|
public_ticket_cap = self.find_or_make(
|
||||||
|
cond.TimeOrStockLimitFlag,
|
||||||
|
("description", ),
|
||||||
|
description="Public ticket cap",
|
||||||
|
condition=cond.FlagBase.DISABLE_IF_FALSE,
|
||||||
|
limit=350,
|
||||||
|
)
|
||||||
|
public_ticket_cap.products.set([
|
||||||
|
self.ticket_ind_sponsor,
|
||||||
|
self.ticket_corporate,
|
||||||
|
self.ticket_supporter,
|
||||||
|
self.ticket_unaffiliated,
|
||||||
|
])
|
||||||
|
|
||||||
|
non_public_ticket_cap = self.find_or_make(
|
||||||
|
cond.TimeOrStockLimitFlag,
|
||||||
|
("description", ),
|
||||||
|
description="Non-public ticket cap",
|
||||||
|
condition=cond.FlagBase.DISABLE_IF_FALSE,
|
||||||
|
limit=200,
|
||||||
|
)
|
||||||
|
non_public_ticket_cap.products.set([
|
||||||
|
self.ticket_speaker,
|
||||||
|
self.ticket_sponsor,
|
||||||
|
self.ticket_media,
|
||||||
|
self.ticket_team,
|
||||||
|
self.ticket_volunteer,
|
||||||
|
])
|
||||||
|
|
||||||
|
# Volunteer tickets are for volunteers only
|
||||||
|
volunteers = self.find_or_make(
|
||||||
|
cond.GroupMemberFlag,
|
||||||
|
("description", ),
|
||||||
|
description="Volunteer tickets",
|
||||||
|
condition=cond.FlagBase.ENABLE_IF_TRUE,
|
||||||
|
)
|
||||||
|
volunteers.group.set([self.group_volunteers])
|
||||||
|
volunteers.products.set([
|
||||||
|
self.ticket_volunteer,
|
||||||
|
])
|
||||||
|
|
||||||
|
# Team tickets are for team members only
|
||||||
|
team = self.find_or_make(
|
||||||
|
cond.GroupMemberFlag,
|
||||||
|
("description", ),
|
||||||
|
description="Team tickets",
|
||||||
|
condition=cond.FlagBase.ENABLE_IF_TRUE,
|
||||||
|
)
|
||||||
|
team.group.set([self.group_team])
|
||||||
|
team.products.set([
|
||||||
|
self.ticket_team,
|
||||||
|
])
|
||||||
|
|
||||||
|
# Speaker tickets are for primary speakers only
|
||||||
|
speaker_tickets = self.find_or_make(
|
||||||
|
cond.SpeakerFlag,
|
||||||
|
("description", ),
|
||||||
|
description="Speaker tickets",
|
||||||
|
condition=cond.FlagBase.ENABLE_IF_TRUE,
|
||||||
|
is_presenter=True,
|
||||||
|
is_copresenter=False,
|
||||||
|
)
|
||||||
|
speaker_tickets.proposal_kind.set(self.main_conference_proposals)
|
||||||
|
speaker_tickets.products.set([self.ticket_speaker, ])
|
||||||
|
|
||||||
|
def populate_discounts(self):
|
||||||
|
|
||||||
|
def add_early_birds(discount):
|
||||||
|
self.find_or_make(
|
||||||
|
cond.DiscountForProduct,
|
||||||
|
("discount", "product"),
|
||||||
|
discount=discount,
|
||||||
|
product=self.ticket_ind_sponsor,
|
||||||
|
price=Decimal("50.00"),
|
||||||
|
quantity=1, # Per user
|
||||||
|
)
|
||||||
|
self.find_or_make(
|
||||||
|
cond.DiscountForProduct,
|
||||||
|
("discount", "product"),
|
||||||
|
discount=discount,
|
||||||
|
product=self.ticket_corporate,
|
||||||
|
price=Decimal("20.00"),
|
||||||
|
quantity=1, # Per user
|
||||||
|
)
|
||||||
|
self.find_or_make(
|
||||||
|
cond.DiscountForProduct,
|
||||||
|
("discount", "product"),
|
||||||
|
discount=discount,
|
||||||
|
product=self.ticket_supporter,
|
||||||
|
price=Decimal("20.00"),
|
||||||
|
quantity=1, # Per user
|
||||||
|
)
|
||||||
|
self.find_or_make(
|
||||||
|
cond.DiscountForProduct,
|
||||||
|
("discount", "product"),
|
||||||
|
discount=discount,
|
||||||
|
product=self.ticket_unaffiliated,
|
||||||
|
price=Decimal("25.00"),
|
||||||
|
quantity=1, # Per user
|
||||||
|
)
|
||||||
|
|
||||||
|
def free_category(parent_discount, category, quantity=1):
|
||||||
|
self.find_or_make(
|
||||||
|
cond.DiscountForCategory,
|
||||||
|
("discount", "category",),
|
||||||
|
discount=parent_discount,
|
||||||
|
category=category,
|
||||||
|
percentage=Decimal("100.00"),
|
||||||
|
quantity=quantity,
|
||||||
|
)
|
||||||
|
|
||||||
|
# Early Bird Discount (general public)
|
||||||
|
early_bird = self.find_or_make(
|
||||||
|
cond.TimeOrStockLimitDiscount,
|
||||||
|
("description", ),
|
||||||
|
description="Early Bird",
|
||||||
|
end_time=datetime(year=2017, month=10, day=20),
|
||||||
|
limit=100, # Across all users
|
||||||
|
)
|
||||||
|
add_early_birds(early_bird)
|
||||||
|
|
||||||
|
# Early bird rates for speakers
|
||||||
|
speaker_ticket_discounts = self.find_or_make(
|
||||||
|
cond.SpeakerDiscount,
|
||||||
|
("description", ),
|
||||||
|
description="Speaker Ticket Discount",
|
||||||
|
is_presenter=True,
|
||||||
|
is_copresenter=True,
|
||||||
|
)
|
||||||
|
speaker_ticket_discounts.proposal_kind.set(
|
||||||
|
self.main_conference_proposals,
|
||||||
|
)
|
||||||
|
add_early_birds(speaker_ticket_discounts)
|
||||||
|
|
||||||
|
# Professional-Like ticket inclusions
|
||||||
|
ticket_prolike_inclusions = self.find_or_make(
|
||||||
|
cond.IncludedProductDiscount,
|
||||||
|
("description", ),
|
||||||
|
description="Complimentary for ticket holder (Supporter-level and above)",
|
||||||
|
)
|
||||||
|
ticket_prolike_inclusions.enabling_products.set([
|
||||||
|
self.ticket_ind_sponsor,
|
||||||
|
self.ticket_corporate,
|
||||||
|
self.ticket_supporter,
|
||||||
|
self.ticket_sponsor,
|
||||||
|
self.ticket_speaker,
|
||||||
|
])
|
||||||
|
free_category(ticket_prolike_inclusions, self.t_shirt)
|
||||||
|
|
||||||
|
# Team & volunteer ticket inclusions
|
||||||
|
ticket_staff_inclusions = self.find_or_make(
|
||||||
|
cond.IncludedProductDiscount,
|
||||||
|
("description", ),
|
||||||
|
description="Complimentary for ticket holder (staff/volunteer)",
|
||||||
|
)
|
||||||
|
ticket_staff_inclusions.enabling_products.set([
|
||||||
|
self.ticket_team,
|
||||||
|
self.ticket_volunteer,
|
||||||
|
])
|
||||||
|
|
||||||
|
# Team & volunteer t-shirts, regardless of ticket type
|
||||||
|
staff_t_shirts = self.find_or_make(
|
||||||
|
cond.GroupMemberDiscount,
|
||||||
|
("description", ),
|
||||||
|
description="T-shirts complimentary for staff and volunteers",
|
||||||
|
)
|
||||||
|
staff_t_shirts.group.set([
|
||||||
|
self.group_team,
|
||||||
|
self.group_volunteers,
|
||||||
|
])
|
||||||
|
free_category(staff_t_shirts, self.t_shirt, quantity=2)
|
||||||
|
|
||||||
|
def find_or_make(self, model, search_keys, **k):
|
||||||
|
''' Either makes or finds an object of type _model_, with the given
|
||||||
|
kwargs.
|
||||||
|
|
||||||
|
Arguments:
|
||||||
|
search_keys ([str, ...]): A sequence of keys that are used to search
|
||||||
|
for an existing version in the database. The remaining arguments are
|
||||||
|
only used when creating a new object.
|
||||||
|
'''
|
||||||
|
|
||||||
|
try:
|
||||||
|
keys = dict((key, k[key]) for key in search_keys)
|
||||||
|
a = model.objects.get(**keys)
|
||||||
|
self.stdout.write("FOUND : " + str(keys))
|
||||||
|
model.objects.filter(id=a.id).update(**k)
|
||||||
|
a.refresh_from_db()
|
||||||
|
return a
|
||||||
|
except ObjectDoesNotExist:
|
||||||
|
a = model.objects.create(**k)
|
||||||
|
self.stdout.write("CREATED: " + str(k))
|
||||||
|
return a
|
||||||
|
|
||||||
|
|
||||||
|
def hours(n):
|
||||||
|
return timedelta(hours=n)
|
103
pinaxcon/registrasion/migrations/0003_auto_20171002_1719.py
Normal file
103
pinaxcon/registrasion/migrations/0003_auto_20171002_1719.py
Normal file
|
@ -0,0 +1,103 @@
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# Generated by Django 1.11.5 on 2017-10-03 00:19
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
import django_countries.fields
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('pinaxcon_registrasion', '0002_auto_20161005_1823'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.RemoveField(
|
||||||
|
model_name='attendeeprofile',
|
||||||
|
name='db_defined_values',
|
||||||
|
),
|
||||||
|
migrations.RemoveField(
|
||||||
|
model_name='attendeeprofile',
|
||||||
|
name='dietary_requirements',
|
||||||
|
),
|
||||||
|
migrations.RemoveField(
|
||||||
|
model_name='attendeeprofile',
|
||||||
|
name='free_text_1',
|
||||||
|
),
|
||||||
|
migrations.RemoveField(
|
||||||
|
model_name='attendeeprofile',
|
||||||
|
name='free_text_2',
|
||||||
|
),
|
||||||
|
migrations.RemoveField(
|
||||||
|
model_name='attendeeprofile',
|
||||||
|
name='of_legal_age',
|
||||||
|
),
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='attendeeprofile',
|
||||||
|
name='address_line_1',
|
||||||
|
field=models.CharField(blank=True, help_text=b'This address, if provided, will appear on your receipt.', max_length=1024, verbose_name=b'Address line 1'),
|
||||||
|
),
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='attendeeprofile',
|
||||||
|
name='address_line_2',
|
||||||
|
field=models.CharField(blank=True, max_length=1024, verbose_name=b'Address line 2'),
|
||||||
|
),
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='attendeeprofile',
|
||||||
|
name='address_postcode',
|
||||||
|
field=models.CharField(blank=True, max_length=1024, verbose_name=b'Postal/Zip code'),
|
||||||
|
),
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='attendeeprofile',
|
||||||
|
name='address_suburb',
|
||||||
|
field=models.CharField(blank=True, max_length=1024, verbose_name=b'City/Town/Suburb'),
|
||||||
|
),
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='attendeeprofile',
|
||||||
|
name='country',
|
||||||
|
field=django_countries.fields.CountryField(default=b'US', max_length=2),
|
||||||
|
),
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='attendeeprofile',
|
||||||
|
name='dietary_restrictions',
|
||||||
|
field=models.CharField(blank=True, max_length=256, verbose_name=b'Food allergies, intolerances, or dietary restrictions'),
|
||||||
|
),
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='attendeeprofile',
|
||||||
|
name='newsletter',
|
||||||
|
field=models.BooleanField(default=False, help_text=b'Select to be subscribed to the low-volume North Bay Python announcements newsletter', verbose_name=b'Subscribe to North Bay Python newsletter'),
|
||||||
|
preserve_default=False,
|
||||||
|
),
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='attendeeprofile',
|
||||||
|
name='state',
|
||||||
|
field=models.CharField(blank=True, max_length=256, verbose_name=b'State/Territory/Province'),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='attendeeprofile',
|
||||||
|
name='accessibility_requirements',
|
||||||
|
field=models.CharField(blank=True, max_length=256, verbose_name=b'Accessibility-related requirements'),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='attendeeprofile',
|
||||||
|
name='company',
|
||||||
|
field=models.CharField(blank=True, help_text=b"The name of your company, as you'd like it on your badge and receipt", max_length=64),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='attendeeprofile',
|
||||||
|
name='gender',
|
||||||
|
field=models.CharField(blank=True, help_text=b'Gender data will only be used for demographic purposes.', max_length=64),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='attendeeprofile',
|
||||||
|
name='name_per_invoice',
|
||||||
|
field=models.CharField(blank=True, help_text=b"If your legal name is different to the name on your badge, fill this in, and we'll put it on your receipt. Otherwise, leave it blank.", max_length=256, verbose_name=b'Your legal name (for your receipt)'),
|
||||||
|
),
|
||||||
|
migrations.DeleteModel(
|
||||||
|
name='DemoPayment',
|
||||||
|
),
|
||||||
|
migrations.DeleteModel(
|
||||||
|
name='DynamicValues',
|
||||||
|
),
|
||||||
|
]
|
|
@ -1,18 +1,10 @@
|
||||||
|
from django.core.exceptions import ValidationError
|
||||||
from django.db import models
|
from django.db import models
|
||||||
from django.utils.encoding import python_2_unicode_compatible
|
from django.utils.encoding import python_2_unicode_compatible
|
||||||
|
from django_countries.fields import CountryField
|
||||||
from registrasion import models as rego
|
from registrasion import models as rego
|
||||||
|
|
||||||
|
|
||||||
@python_2_unicode_compatible
|
|
||||||
class DynamicValues(models.Model):
|
|
||||||
|
|
||||||
name = models.CharField(max_length=64)
|
|
||||||
value = models.IntegerField()
|
|
||||||
|
|
||||||
def __str__(self):
|
|
||||||
return "%s - %d" % (self.name, self.value)
|
|
||||||
|
|
||||||
|
|
||||||
class AttendeeProfile(rego.AttendeeProfileBase):
|
class AttendeeProfile(rego.AttendeeProfileBase):
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
|
@ -22,11 +14,49 @@ class AttendeeProfile(rego.AttendeeProfileBase):
|
||||||
return "name"
|
return "name"
|
||||||
|
|
||||||
def invoice_recipient(self):
|
def invoice_recipient(self):
|
||||||
|
|
||||||
|
lines = [
|
||||||
|
self.name_per_invoice,
|
||||||
|
]
|
||||||
|
|
||||||
if self.company:
|
if self.company:
|
||||||
base = "\n%(company)s\nAttention: %(name_per_invoice)s"
|
lines.append("C/- " + self.company)
|
||||||
else:
|
|
||||||
base = "%(name_per_invoice)s"
|
if self.address_line_1:
|
||||||
return base % self.__dict__
|
lines.append(self.address_line_1)
|
||||||
|
|
||||||
|
if self.address_line_2:
|
||||||
|
lines.append(self.address_line_2)
|
||||||
|
|
||||||
|
if self.address_suburb or self.address_postcode:
|
||||||
|
lines.append("%s %s" % (
|
||||||
|
self.address_suburb or "",
|
||||||
|
self.address_postcode or "",
|
||||||
|
))
|
||||||
|
|
||||||
|
if self.state:
|
||||||
|
lines.append(self.state)
|
||||||
|
|
||||||
|
if self.country:
|
||||||
|
lines.append(self.country.name)
|
||||||
|
|
||||||
|
return "\n".join(unicode(line) for line in lines)
|
||||||
|
|
||||||
|
def clean(self):
|
||||||
|
errors = []
|
||||||
|
if self.country == "US" and not self.state:
|
||||||
|
errors.append(
|
||||||
|
("state", "US-based attendees must list their state"),
|
||||||
|
)
|
||||||
|
|
||||||
|
if self.address_line_2 and not self.address_line_1:
|
||||||
|
errors.append((
|
||||||
|
"address_line_1",
|
||||||
|
"Please fill in line 1 before filling line 2",
|
||||||
|
))
|
||||||
|
|
||||||
|
if errors:
|
||||||
|
raise ValidationError(dict(errors))
|
||||||
|
|
||||||
def save(self):
|
def save(self):
|
||||||
if not self.name_per_invoice:
|
if not self.name_per_invoice:
|
||||||
|
@ -42,56 +72,68 @@ class AttendeeProfile(rego.AttendeeProfileBase):
|
||||||
|
|
||||||
company = models.CharField(
|
company = models.CharField(
|
||||||
max_length=64,
|
max_length=64,
|
||||||
help_text="The name of your company, as you'd like it on your badge",
|
help_text="The name of your company, as you'd like it on your badge and receipt",
|
||||||
blank=True,
|
|
||||||
)
|
|
||||||
free_text_1 = models.CharField(
|
|
||||||
max_length=64,
|
|
||||||
verbose_name="Free text line 1",
|
|
||||||
help_text="A line of free text that will appear on your badge. Use "
|
|
||||||
"this for your Twitter handle, IRC nick, your preferred "
|
|
||||||
"pronouns or anything else you'd like people to see on "
|
|
||||||
"your badge.",
|
|
||||||
blank=True,
|
|
||||||
)
|
|
||||||
free_text_2 = models.CharField(
|
|
||||||
max_length=64,
|
|
||||||
verbose_name="Free text line 2",
|
|
||||||
blank=True,
|
blank=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
# Other important Information
|
|
||||||
name_per_invoice = models.CharField(
|
name_per_invoice = models.CharField(
|
||||||
verbose_name="Your legal name (for invoicing purposes)",
|
verbose_name="Your legal name (for your receipt)",
|
||||||
max_length=64,
|
max_length=256,
|
||||||
help_text="If your legal name is different to the name on your badge, "
|
help_text="If your legal name is different to the name on your badge, "
|
||||||
"fill this in, and we'll put it on your invoice. Otherwise, "
|
"fill this in, and we'll put it on your receipt. Otherwise, "
|
||||||
"leave it blank.",
|
"leave it blank.",
|
||||||
blank=True,
|
blank=True,
|
||||||
)
|
)
|
||||||
of_legal_age = models.BooleanField(
|
|
||||||
default=False,
|
address_line_1 = models.CharField(
|
||||||
verbose_name="18+?",
|
verbose_name="Address line 1",
|
||||||
|
help_text="This address, if provided, will appear on your receipt.",
|
||||||
|
max_length=1024,
|
||||||
blank=True,
|
blank=True,
|
||||||
)
|
)
|
||||||
dietary_requirements = models.CharField(
|
address_line_2 = models.CharField(
|
||||||
|
verbose_name="Address line 2",
|
||||||
|
max_length=1024,
|
||||||
|
blank=True,
|
||||||
|
)
|
||||||
|
address_suburb = models.CharField(
|
||||||
|
verbose_name="City/Town/Suburb",
|
||||||
|
max_length=1024,
|
||||||
|
blank=True,
|
||||||
|
)
|
||||||
|
address_postcode = models.CharField(
|
||||||
|
verbose_name="Postal/Zip code",
|
||||||
|
max_length=1024,
|
||||||
|
blank=True,
|
||||||
|
)
|
||||||
|
country = CountryField(
|
||||||
|
default="US",
|
||||||
|
)
|
||||||
|
state = models.CharField(
|
||||||
|
max_length=256,
|
||||||
|
verbose_name="State/Territory/Province",
|
||||||
|
blank=True,
|
||||||
|
)
|
||||||
|
|
||||||
|
dietary_restrictions = models.CharField(
|
||||||
|
verbose_name="Food allergies, intolerances, or dietary restrictions",
|
||||||
max_length=256,
|
max_length=256,
|
||||||
blank=True,
|
blank=True,
|
||||||
)
|
)
|
||||||
accessibility_requirements = models.CharField(
|
accessibility_requirements = models.CharField(
|
||||||
|
verbose_name="Accessibility-related requirements",
|
||||||
max_length=256,
|
max_length=256,
|
||||||
blank=True,
|
blank=True,
|
||||||
)
|
)
|
||||||
gender = models.CharField(
|
gender = models.CharField(
|
||||||
|
help_text="Gender data will only be used for demographic purposes.",
|
||||||
max_length=64,
|
max_length=64,
|
||||||
blank=True,
|
blank=True,
|
||||||
)
|
)
|
||||||
db_defined_values = models.ManyToManyField(
|
|
||||||
DynamicValues
|
newsletter = models.BooleanField(
|
||||||
|
verbose_name="Subscribe to North Bay Python newsletter",
|
||||||
|
help_text="Select to be subscribed to the low-volume North Bay Python "
|
||||||
|
"announcements newsletter",
|
||||||
|
blank=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
class DemoPayment(rego.PaymentBase):
|
|
||||||
''' A subclass of PaymentBase for use in our demo payments function. '''
|
|
||||||
|
|
||||||
pass # No custom features here, but yours could be here.
|
|
||||||
|
|
|
@ -289,6 +289,7 @@ PINAX_BOXES_HOOKSET = "pinaxcon.hooks.PinaxBoxesHookSet"
|
||||||
|
|
||||||
PINAX_STRIPE_PUBLIC_KEY = os.environ.get("STRIPE_PUBLIC_KEY", "your test public key")
|
PINAX_STRIPE_PUBLIC_KEY = os.environ.get("STRIPE_PUBLIC_KEY", "your test public key")
|
||||||
PINAX_STRIPE_SECRET_KEY = os.environ.get("STRIPE_SECRET_KEY", "your test secret key")
|
PINAX_STRIPE_SECRET_KEY = os.environ.get("STRIPE_SECRET_KEY", "your test secret key")
|
||||||
|
TUOKCEHC_BASE_URL = os.environ.get("TUOKCEHC_BASE_URL", None)
|
||||||
PINAX_STRIPE_SEND_EMAIL_RECEIPTS = False
|
PINAX_STRIPE_SEND_EMAIL_RECEIPTS = False
|
||||||
|
|
||||||
SYMPOSION_SPEAKER_MODEL = "pinaxcon.proposals.models.ConferenceSpeaker"
|
SYMPOSION_SPEAKER_MODEL = "pinaxcon.proposals.models.ConferenceSpeaker"
|
||||||
|
@ -305,7 +306,7 @@ ATTENDEE_PROFILE_MODEL = "pinaxcon.registrasion.models.AttendeeProfile"
|
||||||
TICKET_PRODUCT_CATEGORY = 1
|
TICKET_PRODUCT_CATEGORY = 1
|
||||||
|
|
||||||
|
|
||||||
INVOICE_CURRENCY = "AUD"
|
INVOICE_CURRENCY = "USD"
|
||||||
|
|
||||||
# Use nose to run all tests
|
# Use nose to run all tests
|
||||||
TEST_RUNNER = 'django_nose.NoseTestSuiteRunner'
|
TEST_RUNNER = 'django_nose.NoseTestSuiteRunner'
|
||||||
|
@ -320,5 +321,8 @@ NOSE_ARGS = [
|
||||||
MARKDOWN_DEUX_STYLES = {
|
MARKDOWN_DEUX_STYLES = {
|
||||||
"default": {
|
"default": {
|
||||||
"safe_mode": False,
|
"safe_mode": False,
|
||||||
|
"extras": {
|
||||||
|
"tables": 1,
|
||||||
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,6 +30,8 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{% include "registrasion/dashboard_widget.html" %}
|
||||||
|
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
<div class="panel-heading">
|
<div class="panel-heading">
|
||||||
<div class="pull-right">
|
<div class="pull-right">
|
||||||
|
|
29
pinaxcon/templates/registrasion/dashboard_widget.html
Normal file
29
pinaxcon/templates/registrasion/dashboard_widget.html
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
{% extends "registrasion/dashboard_widget_.html" %}
|
||||||
|
|
||||||
|
{% comment %}
|
||||||
|
Blocks that you can override:
|
||||||
|
|
||||||
|
- heading_actions
|
||||||
|
- heading
|
||||||
|
- panel_content
|
||||||
|
- available_credit
|
||||||
|
- invoices_heading
|
||||||
|
- invoice_item_prefix
|
||||||
|
|
||||||
|
{% endcomment %}
|
||||||
|
|
||||||
|
{% block heading %}
|
||||||
|
Tickets
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block invoices_heading %}
|
||||||
|
Statements & Receipts
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block invoice_item_prefix %}
|
||||||
|
{% if invoice.is_paid %}
|
||||||
|
Receipt
|
||||||
|
{% else %}
|
||||||
|
Statement
|
||||||
|
{% endif %}
|
||||||
|
{% endblock %}
|
|
@ -0,0 +1 @@
|
||||||
|
{% load i18n %}Pending Registration {{ invoice.id }}
|
|
@ -0,0 +1 @@
|
||||||
|
{% load i18n %}{{ invoice.get_status_display }} -- Registration {{ invoice.id }}
|
|
@ -1,6 +1,5 @@
|
||||||
{% extends "registrasion/invoice_.html" %}
|
{% extends "registrasion/invoice_.html" %}
|
||||||
|
|
||||||
{% block payment_actions %}
|
{% block payment_actions %}
|
||||||
<a class="btn btn-default" href="{% url "demopay" invoice.id invoice.user.attendee.access_code %}">Pay this invoice (dummy)</a>
|
|
||||||
{{ block.super }}
|
{{ block.super }}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
48
pinaxcon/templates/registrasion/invoice/details.html
Normal file
48
pinaxcon/templates/registrasion/invoice/details.html
Normal file
|
@ -0,0 +1,48 @@
|
||||||
|
{% extends "registrasion/invoice/details_.html" %}
|
||||||
|
{% comment %}
|
||||||
|
Blocks that you can override:
|
||||||
|
|
||||||
|
- heading
|
||||||
|
- subheading
|
||||||
|
- invoice_intro
|
||||||
|
- extra_line_items
|
||||||
|
- contact_info
|
||||||
|
|
||||||
|
{% endcomment %}
|
||||||
|
|
||||||
|
{% block heading %}
|
||||||
|
{% if invoice.is_paid or invoice.is_refunded %}
|
||||||
|
Registration Receipt
|
||||||
|
{% else %}
|
||||||
|
Pending Registration
|
||||||
|
{% endif %}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block subheading %}
|
||||||
|
North Bay Python. December 2 & 3 2017. Petaluma, California.
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block invoice_intro %}
|
||||||
|
{% if invoice.is_unpaid %}
|
||||||
|
This is a registration summary for North Bay Python 2017. It is not confirmed until paid in full.
|
||||||
|
{% elif invoice.is_void %}
|
||||||
|
This is a void registration summary for North Bay Python 2017. It is provided for informational purposes only.
|
||||||
|
{% elif invoice.is_refunded %}
|
||||||
|
This is a refunded registration summary for North Bay Python 2017. It is provided for informational purposes only.
|
||||||
|
{% elif invoice.is_paid %}
|
||||||
|
This is a confirmed registration summary for North Bay Python 2017.
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block contact_info %}
|
||||||
|
<p>Direct inquiries to <a href="mailto:spam@northbaypython.org">spam@northbaypython.org</a></p>
|
||||||
|
<p>North Bay Python is run by North Bay and Bay Area locals, as a member project of <a href="https://sfconservancy.org">Software Freedom Conservancy</a>, a 501(c)(3) public charity registered in New York.</p>
|
||||||
|
|
||||||
|
<strong>Mailing Address</strong>
|
||||||
|
<address>
|
||||||
|
Software Freedom Conservancy, Inc.<br>
|
||||||
|
137 MONTAGUE ST STE 380<br>
|
||||||
|
Brooklyn, NY 11201-3548<br>
|
||||||
|
</address>
|
||||||
|
{% endblock %}
|
11
pinaxcon/templates/registrasion/invoice/unpaid_notice.html
Normal file
11
pinaxcon/templates/registrasion/invoice/unpaid_notice.html
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
<p><strong>NOTICE:</strong> The below statement is automatically generated, and will be voided if you amend your registration before payment, or if discounts or products contained in the statement become unavailable. The items and discounts are only reserved until the invoice due time.</p>
|
||||||
|
|
||||||
|
{% url "invoice_access" invoice.user.attendee.access_code as access_url %}
|
||||||
|
{% url "invoice" invoice.id invoice.user.attendee.access_code as invoice_url %}
|
||||||
|
|
||||||
|
<p>You can send the following links to your accounts department to pay for your registration:</p>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<li>{{ current_host|add:access_url|urlize }} – your most recent statement or receipt</li>
|
||||||
|
<li>{{ current_host|add:invoice_url|urlize }} – this statement, even if it becomes void.</li>
|
||||||
|
</ul>
|
|
@ -1,20 +1,138 @@
|
||||||
{% extends "page_with_title_and_lede.html" %}
|
{% extends "page_with_title_and_lede.html" %}
|
||||||
|
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
|
{% load markdown_deux_tags %}
|
||||||
|
|
||||||
{% block head_title %}Attend{% endblock %}
|
{% block head_title %}Attend{% endblock %}
|
||||||
|
|
||||||
{% block heading %}Attend{% endblock %}
|
{% block heading %}Come to North Bay Python!{% endblock %}
|
||||||
|
|
||||||
{% block body_class %}attend{% endblock %}
|
{% block body_class %}attend{% endblock %}
|
||||||
|
|
||||||
{% block lede %}
|
{% block lede %}
|
||||||
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 %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
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="/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>
|
||||||
|
|
||||||
|
<p><strong>For individuals who want to financially contribute to the success of the conference.</strong></p>
|
||||||
|
|
||||||
|
<p>This ticket includes a free t-shirt, and recognition of your Free and Open Source Software, hobby, or nonprofit project on your conference badge.</p>
|
||||||
|
|
||||||
|
<h3>Unaffiliated Individual <small>$50 ($25 Early Bird)</small></h3>
|
||||||
|
|
||||||
|
<p><strong>For students, hobbyists, and unemployed/underemployed people who are coming to North Bay Python at their own expense.</strong></p>
|
||||||
|
|
||||||
|
<p>The cheapest ticket we can offer. You can add a t-shirt for $30.</p>
|
||||||
|
|
||||||
|
|
||||||
|
<h3>Special Tickets</h3>
|
||||||
|
|
||||||
|
<h4>Individual Sponsor <small>$500 ($450 Early Bird)</small></h4>
|
||||||
|
|
||||||
|
<p>This ticket includes all of the benefits of a Corporate ticket, but we’ll also give the ticket holder special thanks during our conference plenary sessions. You can also provide us with a promotional item to put in each attendee’s swag bag.</p>
|
||||||
|
|
||||||
|
<p>This ticket is for individuals who want to sponsor the conference. For company-level sponsorships, please see our <a href="/sponsors/become-a-sponsor">sponsorships page</a>.</p>
|
||||||
|
|
||||||
|
|
||||||
|
<h4>Group Discount Corporate <small>$180 for 5+ tickets</small></h4>
|
||||||
|
|
||||||
|
<p>For companies sending multiple attendees, you can get a 10% discount off the regular price on purchases of 5 tickets or more.</p>
|
||||||
|
|
||||||
|
<p>To claim, buy your first four tickets, and send us an email with the names and receipt numbers for those attendees. We’ll send you vouchers for a discount on further tickets.</p>
|
||||||
|
|
||||||
|
|
||||||
|
<h2>Ticket Types and Inclusions</h2>
|
||||||
|
|
||||||
|
<table class="table table-striped">
|
||||||
|
<tr>
|
||||||
|
<th></th>
|
||||||
|
<th>Unaffiliated Individual</th><th>Individual Supporter</th><th> Corporate </th><th> Individual Sponsor </th></tr>
|
||||||
|
<tr>
|
||||||
|
<th>Regular Price</th>
|
||||||
|
<td> $50 </td><td>$100</td><td> $200</td><td> $500
|
||||||
|
<tr>
|
||||||
|
<th>Early Bird</th>
|
||||||
|
<td> $25</td><td> $80 </td><td>$180</td><td> $450</td></tr>
|
||||||
|
<tr>
|
||||||
|
<th>Group Discount</th>
|
||||||
|
<td> - </td><td>- </td><td>$180/ticket for 5+ tickets</td><td> -</td></tr>
|
||||||
|
<tr>
|
||||||
|
<th>Conference access</th>
|
||||||
|
<td> Yes </td><td> Yes </td><td> Yes </td><td> Yes </td></tr>
|
||||||
|
<tr>
|
||||||
|
<th>Morning refreshments</th>
|
||||||
|
<td> TBA </td><td> TBA </td><td> TBA </td><td> TBA </td></tr>
|
||||||
|
<tr>
|
||||||
|
<th>Free Lunch</th>
|
||||||
|
<td> No </td><td> No </td><td> No </td><td> No </td></tr>
|
||||||
|
<tr>
|
||||||
|
<th>T-Shirt</th>
|
||||||
|
<td>$30 each</td><td>1 free</br>Extras $30 each</td><td>1 free</br>Extras $30 each</td><td>1 free</br>Extras $30 each</td></tr>
|
||||||
|
<tr>
|
||||||
|
<th>Affiliation on your badge</th>
|
||||||
|
<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="/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>
|
||||||
|
|
||||||
|
<h3>Morning Refreshments (TBA)</h3>
|
||||||
|
<p>If budget permits, or if we find a sponsor, we’ll provide coffee, tea, hot chocolate, and some light snacks in the morning before proceedings kick off on both days.</p>
|
||||||
|
|
||||||
|
<h3>T-Shirt</h3>
|
||||||
|
<p>We’ll be designing a collectible North Bay Python t-shirt for you to pick up at the conference, and they’ll be available in a variety of cuts and colors. Each t-shirt costs $30, and for supporter, corporate, and sponsor ticket holders, you’ll get your first t-shirt free!</p>
|
||||||
|
|
||||||
|
<p>T-shirts are available only for tickets purchased by Tuesday 7 November.</p>
|
||||||
|
|
||||||
|
|
||||||
|
<h3>Affiliation</h3>
|
||||||
|
<p>Every attendee gets their very own lanyard and a badge with their name on it. As a paying ticket holder, you’ll get your project’s name (supporter and above) or company name (corporate or sponsor levels only) on your badge, just below your name.</p>
|
||||||
|
|
||||||
|
<h3>Supporter Recognition</h3>
|
||||||
|
<p>On our website, we’ll have a list of our conference supporters. You can choose to have your name on that list.</p>
|
||||||
|
|
||||||
|
<p>For our corporate and sponsor ticket holders, we’ll also include your company name as part of those thanks.</p>
|
||||||
|
|
||||||
|
<h3>Sponsor Benefits</h3>
|
||||||
|
<p>Sponsor tickets come with sponsor benefits. To find out more, see our <a href="/sponsors/become-a-sponsor">Sponsors page</a>.</p>
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -9,54 +9,110 @@
|
||||||
{% block body_class %}attend{% endblock %}
|
{% block body_class %}attend{% endblock %}
|
||||||
|
|
||||||
{% block lede %}
|
{% block lede %}
|
||||||
Lede
|
If you're coming from out of town, we'd love you to stay the night! We've made arrangements with the best hotels in Petaluma, with exclusive rates for North Bay Python attendees.
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
Content
|
<h2>Official Hotels</h2>
|
||||||
|
|
||||||
<!--
|
<p>We've made arrangements with three local accommodation providers to suit different budget options.</p>
|
||||||
|
|
||||||
<h3>Staying Here</h3>
|
<h3>Hotel Petaluma</h3>
|
||||||
|
|
||||||
<p>Petaluma also has hotels! We're arranging deals with some of the best local hotels in the area – the closest is just one block away. We'll share details with you when conference tickets go on sale.</p>
|
<div class="row">
|
||||||
|
<div class="col-md-7">
|
||||||
|
<dl class="dl-horizontal">
|
||||||
|
<dt>Where</dt><dd><a href="https://www.google.com/maps/dir/Mystic+Theatre,+Petaluma+Boulevard+North,+Petaluma,+CA/Hotel+Petaluma,+205+Kentucky+St,+Petaluma,+CA+94952">205 Kentucky St (0.2mi from venue)</a></dd>
|
||||||
|
<dt>Price</dt><dd>$117-$153/night + tax</dd>
|
||||||
|
<dt>Style</dt><dd>Limited-Service Hotel</dd>
|
||||||
|
<dt>Book by</dt><dd>November 1st</dd>
|
||||||
|
</dl>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-2">
|
||||||
|
<a class="btn btn-lg btn-primary" href="https://www.choicehotels.com/reservations/groups/GH6NY6">Book Hotel Petaluma</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
# Confirmed and co-operating:
|
<p>The only hotel in Downtown Petaluma is a recently renovated boutique hotel in a 1920s-era building. It's a short walk from North Bay Python's venue, and is close to Petaluma's best places to eat and drink.</p>
|
||||||
|
|
||||||
- Hotel Petaluma: Two blocks away. Exclusive rate, starts at $117+tax.
|
<p>Hotel Petaluma has offered all of their available rooms to North Bay Python attendees, so if you want to stay as close as possible to the venue, book through our exclusive link by November 1st.</p>
|
||||||
- Sheraton: 1.7mi away, on the river. Exclusive rate, starts at $129+tax
|
|
||||||
- Quality Inn: 3.7mi away, on the freeway. Discount rate (15% off the
|
<h3>Sheraton Petaluma</h3>
|
||||||
public rate), currently starts at $81+tax
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-7">
|
||||||
|
<dl class="dl-horizontal">
|
||||||
|
<dt>Where</dt><dd>Petaluma Marina, <a href="https://www.google.com/maps/dir/Mystic+Theatre,+23+Petaluma+Blvd+N,+Petaluma,+CA+94952/Sheraton+Sonoma+County+-+Petaluma,+Baywood+Drive,+Petaluma,+CA">745 Baywood Dr (1.7mi from venue)</a></dd>
|
||||||
|
<dt>Price</dt><dd>$129/night + tax</dd>
|
||||||
|
<dt>Style</dt><dd>Full-Service Hotel</dd>
|
||||||
|
<dt>Book by</dt><dd>November 17th</dd>
|
||||||
|
</dl>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-2">
|
||||||
|
<a class="btn btn-lg btn-primary" href="https://www.starwoodmeeting.com/Book/NorthBayPython">Book Sheraton Petaluma</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<p>The only full-service hotel in Petaluma operated by a major chain. The Sheraton sits on the riverfront at the Petaluma Marina, and is a short drive from the venue. Our exclusive rate of $129/night is available until November 17th.</p>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# In progress + likely:
|
<h3>Quality Inn Petaluma</h3>
|
||||||
|
|
||||||
- America's Best Value Inn: 3.7mi away, on the freeway. Working on an
|
<div class="row">
|
||||||
exclusive rate, with some rooms held (they want a credit card to hold
|
<div class="col-md-7">
|
||||||
rooms). Currently starts at $70+tax.
|
<dl class="dl-horizontal">
|
||||||
|
<dt>Where</dt><dd><a href="https://www.google.com/maps/dir/Mystic+Theatre,+23+Petaluma+Blvd+N,+Petaluma,+CA+94952/Quality+Inn+Petaluma+-+Sonoma,+Montero+Way,+Petaluma,+CA">5100 Montero Way (3.7mi from venue)</a></dd>
|
||||||
|
<dt>Price</dt><dd>from $81/night + tax</dd>
|
||||||
|
<dt>Style</dt><dd>Motor Inn</dd>
|
||||||
|
<dt>Book</dt><dd>while rooms last</dd>
|
||||||
|
</dl>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-2">
|
||||||
|
<a class="btn btn-lg btn-primary" href="https://www.choicehotels.com/california/petaluma/quality-inn-hotels/ca056/rates?adults=2&checkInDate=2017-12-01&checkOutDate=2017-12-04&ratePlanCode=LEVNT">Book Quality Inn Petaluma</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<p>A modern, comfortable motel at the northern end of the city is a great option for attendees looking to save money. North Bay Python attendees get 15% off the best published rate at the time of booking by using our exclusive booking link.</p>
|
||||||
|
|
||||||
|
|
||||||
# In progress + questionable
|
<h2>Other options</h2>
|
||||||
|
|
||||||
- Best Western: 1.5mi away, on the freeway. They offer 10% off for
|
<h3>In Petaluma</h3>
|
||||||
people who sign up for their mailing list, or AAA members. Currently
|
|
||||||
starts at $75+tax.
|
<p>There are other options for staying in Petaluma, that cater to a variety of budgets. We don't have an official relationship with these vendors, and provide these links for informational purposes only.</p>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<strong><a href="http://www.metrolodging.com/">Metro Hotel</a></strong>. Boutique Hotel,
|
||||||
|
<a href="https://www.google.com/maps/dir/Mystic+Theatre,+Petaluma+Boulevard+North,+Petaluma,+CA/Metro+Hotel+%26+Cafe,+508+Petaluma+Blvd+S,+Petaluma,+CA+94952">508 Petaluma Blvd S (0.4mi from venue)</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<strong><a href="http://bestwesterncalifornia.com/hotels/best-western-petaluma-inn">Best Western Petaluma Inn</a></strong>. Motor Inn,
|
||||||
|
<a href="https://www.google.com/maps/dir/Mystic+Theatre,+23+Petaluma+Blvd+N,+Petaluma,+CA+94952/Best+Western+Petaluma+Inn,+South+McDowell+Boulevard,+Petaluma,+CA">200 S McDowell Blvd (1.5mi from venue)</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<strong><a href="http://www.petalumavalleyinn.com/">America's Best Value Inn & Suites</a></strong>. Motor Inn,
|
||||||
|
<a href="https://www.google.com/maps/dir/Americas+Best+Value+Inn+%26+Suites+Petaluma,+Montero+Way,+Petaluma,+CA/Mystic+Theatre,+23+Petaluma+Blvd+N,+Petaluma,+CA+94952">5135 Montero Way (3.7mi from venue)</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<strong><a href="https://www.motel6.com/en/motels.ca.petaluma.1369.html">Motel 6</a></strong>. Motel,
|
||||||
|
<a href="https://www.google.com/maps/dir/Motel+6+Petaluma,+North+McDowell+Boulevard,+Petaluma,+CA/Mystic+Theatre,+23+Petaluma+Blvd+N,+Petaluma,+CA+94952">1368 N McDowell Blvd (3.8mi from venue)</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<strong><a href="https://koa.com/campgrounds/san-francisco/">KOA San Francisco North/Petaluma</a></strong>. Campground with self-contained cabins,
|
||||||
|
<a href="https://www.google.com/maps/dir/San+Francisco+North+%2F+Petaluma+KOA,+Rainsville+Road,+Petaluma,+CA/Mystic+Theatre,+23+Petaluma+Blvd+N,+Petaluma,+CA+94952">20 Rainsville Rd (3.8mi from venue)</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
# Not yet contacted:
|
<h3>Further Afield</h3>
|
||||||
|
|
||||||
- Motel 6: 3.7mi away, near the freeway. Opposite Lagunitas. Currently
|
<p>If you can't find something you're looking for in Petaluma, the nearby freeway town of Rohnert Park is 15 minutes drive away and has plenty of accommodation next to the freeway. People looking to spend obscene amounts of money may also be interested in the resort town of Sonoma, which is 20 minutes drive away.</p>
|
||||||
starts at $70+tax.
|
|
||||||
|
|
||||||
|
<p>Reasonable chain hotel and motel options also exist in Novato, however, we don't recommend staying there as traffic between there and Petaluma can be unpredictable.</p>
|
||||||
|
|
||||||
Won't contact, but will advertise:
|
|
||||||
|
|
||||||
KOA camping+cabins: 3.7mi away, near the freeway. Have 3-bed cabins
|
|
||||||
with bathrooms for $99, and 6-bed cabins with bathrooms for $149.
|
|
||||||
|
|
||||||
-->
|
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -9,25 +9,49 @@
|
||||||
{% block body_class %}attend{% endblock %}
|
{% block body_class %}attend{% endblock %}
|
||||||
|
|
||||||
{% block lede %}
|
{% block lede %}
|
||||||
Lede
|
Chances are you're probably not in Petaluma, so if you want to come to North Bay Python, then you'll need to get here somehow. The good news is that it's reasonably easy to get here, whether you're coming from Sonoma County, elsewhere in the Bay Area, or from further out of town.
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
<h3>Getting Here</h3>
|
<h2>By Car</h2>
|
||||||
|
|
||||||
<h4>By Car</h4>
|
<p>If you're driving up, Downtown Petaluma is at exit 472A on Highway 101, 35 miles north of the Golden Gate Bridge.</p>
|
||||||
|
|
||||||
<p>If you're driving up, Downtown Petaluma is at exit 472A on Highway 101, 35 miles north of the Golden Gate Bridge. All parking is free in Petaluma, including in the undercover garages at Keller St and Theatre Square. Both garages are in short walking distance of the Mystic.</p>
|
<p>All parking is free in Petaluma, however near the Mystic, street-level parking is time-limited. All-day parking is available at street level west of 5th St (towards 6th St), and at the the undercover garages at <a href="https://www.google.com/maps/place/Keller+Street+Parking+Garage">Keller St</a> and at Theatre Square. Both garages are in short walking distance of the Mystic.</p>
|
||||||
|
|
||||||
<h4>By Bus</h4>
|
|
||||||
|
|
||||||
<p>Public transit to Petaluma is not great. You can take the 101 bus operated by Golden Gate Transit from downtown San Francisco, or south from Santa Rosa. Depending on sponsorship, we hope to run a free shuttle with BART and Caltrain connections for people from further out of town.</p>
|
<h2>By Public Transit</h2>
|
||||||
|
|
||||||
<h4>By Plane</h4>
|
<p>Public transit to Petaluma is currently not great.</p>
|
||||||
|
|
||||||
<p>If you're coming from out of the area, you may want to consider Sonoma County Airport (STS). STS is 30 minutes out of Petaluma, and has nonstop flights to most major west coast cities. If you can't make it to STS, you can also try San Francisco (SFO) or Oakland (OAK) international airports.</p>
|
<p>You can take the <a href="http://goldengatetransit.org/schedules/current/route_101.php">101 bus operated by Golden Gate Transit</a> from downtown San Francisco, or south from Santa Rosa. Depending on sponsorship, we hope to run a free shuttle with BART and Caltrain connections for people from further out of town.</p>
|
||||||
|
|
||||||
|
<p><a href="https://sonomamarintrain.org">SMART</a>, the new train service that runs along the 101 corridor, recently started operations. SMART is not suitable for getting to North Bay Python if you travel on weekends, as the first train leaves after proceedings start. SMART may be a better option than taking the bus between San Rafael and Petaluma if you travel up on weekdays.</p>
|
||||||
|
|
||||||
|
|
||||||
|
<h2>By Plane</h2>
|
||||||
|
|
||||||
|
<p>Petaluma is within driving distance of all Bay Area Airports, and each airport has varying levels of public transit links to Petaluma.</p>
|
||||||
|
|
||||||
|
<h4>Sonoma County Airport (STS) <small>25mi from venue</small></h4>
|
||||||
|
|
||||||
|
<p>STS is 30 minutes out of Petaluma, and has nonstop flights to most major west coast cities on Alaska, United, and American.</p>
|
||||||
|
|
||||||
|
<p>On weekdays and weekend afternoons, <a href="https://sonomamarintrain.org">SMART train</a> runs from STS to Downtown Petaluma Station, 1/4mi away from the North Bay Python venue. STS is also serviced by the <a href="http://airportexpressinc.com/schedule.php">Sonoma County Airport Express</a> bus.</p>
|
||||||
|
|
||||||
|
<h4>San Francisco International (SFO)/Oakland International (OAK) <small>50mi from venue</small></h4>
|
||||||
|
|
||||||
|
<p>If you can't make it to STS, you can also try San Francisco (SFO) or Oakland (OAK) international airports. These have many more flights than STS, but are twice the distance away, and are subject to more highway traffic between the airport and Petaluma.</p>
|
||||||
|
|
||||||
|
<p>Transfers to Petaluma are available through the <a href="http://airportexpressinc.com/schedule.php">Sonoma County Airport Express</a>.</p>
|
||||||
|
|
||||||
|
<h4>San Jose International (SJC)/Sacramento (SMF) <small>85mi from venue</small></h4>
|
||||||
|
|
||||||
|
<p>If you're planning on renting a car, San Jose (SJC) or Sacramento (SMF) are both two hours drive away.</p>
|
||||||
|
|
||||||
|
<h4>Petaluma Municipal <small>3mi from venue</small></h4>
|
||||||
|
|
||||||
<p>If you happen to have an aircraft of your own, Petaluma Municipal Airport is 3 miles down the road.</p>
|
<p>If you happen to have an aircraft of your own, Petaluma Municipal Airport is 3 miles down the road.</p>
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
|
|
||||||
<h4>
|
<h4>
|
||||||
December 2 & 3, 2017<br/>
|
December 2 & 3, 2017<br/>
|
||||||
Talk submissions close September 29
|
Tickets on sale from $25
|
||||||
</h4>
|
</h4>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-4 col-md-offset-2 email-signup-panel">
|
<div class="col-md-4 col-md-offset-2 email-signup-panel">
|
||||||
|
@ -64,7 +64,7 @@
|
||||||
|
|
||||||
<div class="container homepage-block-footer">
|
<div class="container homepage-block-footer">
|
||||||
<div>
|
<div>
|
||||||
<a class="btn btn-primary btn-lg" href="/dashboard">Submit a Proposal</a>
|
<a class="btn btn-primary btn-lg" href="/attend">Buy a ticket!</a>
|
||||||
<a class="btn btn-default btn-lg " href="https://twitter.com/northbaypython">Twitter</a>
|
<a class="btn btn-default btn-lg " href="https://twitter.com/northbaypython">Twitter</a>
|
||||||
<a class="btn btn-default btn-lg" href="https://facebook.com/northbaypython">Facebook</a>
|
<a class="btn btn-default btn-lg" href="https://facebook.com/northbaypython">Facebook</a>
|
||||||
</div>
|
</div>
|
||||||
|
@ -81,17 +81,19 @@
|
||||||
<ul>
|
<ul>
|
||||||
<li>An historic venue with countless restaurants and coffee shops in walking distance</li>
|
<li>An historic venue with countless restaurants and coffee shops in walking distance</li>
|
||||||
<li>World-famous craft food and drink producers on your doorstep</li>
|
<li>World-famous craft food and drink producers on your doorstep</li>
|
||||||
<li>Charming small-town hotels, as close as one block away</li>
|
<li>Charming <a href="/attend/hotels">small-town hotels</a>, as close as one block away</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<p>… and it's only an hour away from San Francisco (on a good day).</p>
|
<p>… and it's <a href="/attend/travel">only an hour away from San Francisco</a> (on a good day).</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="homepage-block-footer full-width">
|
<div class="homepage-block-footer full-width">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="btn-group col-md-4">
|
<div class="col-md-4">
|
||||||
<a class="btn btn-lg btn-primary btn-shadow" href="/about/north-bay-python">Learn More</a>
|
<a class="btn btn-lg btn-primary btn-shadow" href="/about/north-bay-python">Learn More</a>
|
||||||
|
<a class="btn btn-lg btn-info" href="/attend/hotels">Hotels</a>
|
||||||
|
<a class="btn btn-lg btn-info" href="/attend/travel">Travel</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-8 text-right photo-attribution">
|
<div class="col-md-8 text-right photo-attribution">
|
||||||
|
|
|
@ -31,9 +31,11 @@ urlpatterns = [
|
||||||
# attend
|
# attend
|
||||||
url(r"^attend$", TemplateView.as_view(template_name="static_pages/attend/attend.html"), name="attend/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$", 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/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/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"^attend/hotels$", TemplateView.as_view(template_name="static_pages/attend/hotels.html"), name="attend/hotels"),
|
||||||
|
url(r"^attend/tshirts$", TemplateView.as_view(template_name="static_pages/attend/tshirts.html"), name="attend/tshirts"),
|
||||||
|
|
||||||
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$", 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-incidents$", TemplateView.as_view(template_name="static_pages/code_of_conduct/harassment_procedure_attendee.html"), name="code-of-conduct/harassment-incidents"),
|
||||||
|
@ -72,13 +74,10 @@ urlpatterns = [
|
||||||
url(r"^teams/", include("symposion.teams.urls")),
|
url(r"^teams/", include("symposion.teams.urls")),
|
||||||
|
|
||||||
# Demo payment gateway and related features
|
# Demo payment gateway and related features
|
||||||
url(r"^register/pinaxcon/", include("pinaxcon.registrasion.urls")),
|
url(r"^tickets/payments/", include("registripe.urls")),
|
||||||
|
|
||||||
# Demo payment gateway and related features
|
|
||||||
url(r"^register/payments/", include("registripe.urls")),
|
|
||||||
|
|
||||||
# Required by registrasion
|
# Required by registrasion
|
||||||
url(r'^register/', include('registrasion.urls')),
|
url(r'^tickets/', include('registrasion.urls')),
|
||||||
url(r'^nested_admin/', include('nested_admin.urls')),
|
url(r'^nested_admin/', include('nested_admin.urls')),
|
||||||
|
|
||||||
# Catch-all MUST go last.
|
# Catch-all MUST go last.
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
|
from django.contrib import messages
|
||||||
from django.http import HttpResponseServerError
|
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 RequestContext
|
||||||
from django.template import Template
|
from django.template import Template
|
||||||
from django.template.loader import get_template
|
from django.template.loader import get_template
|
||||||
|
@ -28,3 +29,12 @@ def account_login(request):
|
||||||
|
|
||||||
class EmailLoginView(LoginView):
|
class EmailLoginView(LoginView):
|
||||||
form_class = LoginEmailForm
|
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")
|
||||||
|
|
Loading…
Reference in a new issue