From 869f5a8fe9365e1e80e686b993aecb19ba2dbea7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=AD=C3=B0ir=20Valberg=20Gu=C3=B0mundsson?= Date: Fri, 6 May 2016 22:33:59 +0200 Subject: [PATCH] A lot of ticketing stuff. --- bornhack/settings/base.py | 1 + bornhack/templates/base.html | 3 + bornhack/urls.py | 4 + camps/context_processors.py | 5 ++ camps/managers.py | 10 +++ .../migrations/0004_camp_ticket_sale_open.py | 20 +++++ camps/models.py | 14 +++- tickets/admin.py | 2 - tickets/forms.py | 16 ++++ tickets/managers.py | 13 ++++ tickets/migrations/0002_auto_20160506_1602.py | 36 +++++++++ tickets/migrations/0003_auto_20160506_2016.py | 31 ++++++++ tickets/models.py | 34 ++++++--- tickets/templates/tickets/buy.html | 13 ++++ tickets/templates/tickets/detail.html | 7 ++ tickets/templates/tickets/index.html | 73 +++++++++++++++++++ tickets/urls.py | 13 ++++ tickets/views.py | 58 ++++++++++++++- 18 files changed, 338 insertions(+), 15 deletions(-) create mode 100644 camps/context_processors.py create mode 100644 camps/managers.py create mode 100644 camps/migrations/0004_camp_ticket_sale_open.py create mode 100644 tickets/forms.py create mode 100644 tickets/managers.py create mode 100644 tickets/migrations/0002_auto_20160506_1602.py create mode 100644 tickets/migrations/0003_auto_20160506_2016.py create mode 100644 tickets/templates/tickets/buy.html create mode 100644 tickets/templates/tickets/detail.html create mode 100644 tickets/templates/tickets/index.html create mode 100644 tickets/urls.py diff --git a/bornhack/settings/base.py b/bornhack/settings/base.py index db1ebbcc..ae2c5978 100644 --- a/bornhack/settings/base.py +++ b/bornhack/settings/base.py @@ -53,6 +53,7 @@ TEMPLATES = [ 'django.template.context_processors.request', 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages', + 'camps.context_processors.current_camp', ], }, }, diff --git a/bornhack/templates/base.html b/bornhack/templates/base.html index 18062297..04073465 100644 --- a/bornhack/templates/base.html +++ b/bornhack/templates/base.html @@ -37,6 +37,9 @@