From 5409d4974aedf5d01e50d72770eb53746b5029ad Mon Sep 17 00:00:00 2001
From: James Polley
Date: Wed, 27 Sep 2017 23:46:13 +1000
Subject: [PATCH] The 2018ificiation
I think this removes most references to "hobart", "pycon", and "2017"
There are still some references to some images that we don't have a
replacement for.
---
pinaxcon/registrasion/admin.py | 5 +
.../management/commands/populate_inventory.py | 4 +-
.../migrations/0006_auto_20170927_2301.py | 26 +++++
pinaxcon/registrasion/models.py | 13 ++-
pinaxcon/templates/_form_snippet.html | 2 +-
pinaxcon/templates/content_page.html | 2 +-
pinaxcon/templates/dashboard.html | 4 +-
.../registrasion/_invoice_details.html | 4 +-
.../registrasion/guided_registration.html | 2 +-
pinaxcon/templates/registrasion/invoice.html | 10 +-
.../registrasion/product_category.html | 2 +-
.../templates/registrasion/profile_form.html | 2 +-
pinaxcon/templates/registrasion/review.html | 4 +-
.../stripe/credit_card_payment.html | 2 +-
.../symposion/proposals/_proposal_fields.html | 2 +-
.../templates/symposion/schedule/_grid.html | 2 +-
.../schedule/presentation_detail.html | 4 +-
.../symposion/schedule/public_base.html | 2 +-
.../schedule/schedule_conference.html | 16 +--
.../symposion/schedule/schedule_detail.html | 2 +-
.../symposion/schedule/schedule_list.html | 2 +-
.../symposion/speakers/speaker_profile.html | 2 +-
.../symposion/sponsorship/_sponsor_link.html | 2 +-
.../templates/symposion/sponsorship/list.html | 2 +-
.../{lca2017_tags.py => lca2018_tags.py} | 4 +-
pinaxcon/templatetags/pyconau2017_tags.py | 100 ------------------
26 files changed, 80 insertions(+), 142 deletions(-)
create mode 100644 pinaxcon/registrasion/admin.py
create mode 100644 pinaxcon/registrasion/migrations/0006_auto_20170927_2301.py
rename pinaxcon/templatetags/{lca2017_tags.py => lca2018_tags.py} (93%)
delete mode 100644 pinaxcon/templatetags/pyconau2017_tags.py
diff --git a/pinaxcon/registrasion/admin.py b/pinaxcon/registrasion/admin.py
new file mode 100644
index 00000000..09679267
--- /dev/null
+++ b/pinaxcon/registrasion/admin.py
@@ -0,0 +1,5 @@
+from django.contrib import admin
+
+from .models import PastEvent
+
+admin.site.register(PastEvent)
diff --git a/pinaxcon/registrasion/management/commands/populate_inventory.py b/pinaxcon/registrasion/management/commands/populate_inventory.py
index ae2a09e6..eb0011e0 100644
--- a/pinaxcon/registrasion/management/commands/populate_inventory.py
+++ b/pinaxcon/registrasion/management/commands/populate_inventory.py
@@ -13,7 +13,7 @@ from symposion import proposals
class Command(BaseCommand):
- help = 'Populates the inventory with the LCA2017 inventory model'
+ help = 'Populates the inventory with the LCA2018 inventory model'
def add_arguments(self, parser):
pass
@@ -111,7 +111,7 @@ class Command(BaseCommand):
inv.Category,
("name",),
name="T-Shirt",
- description="Commemorative conference t-shirts, featuring the"
+ description="Commemorative conference t-shirts, featuring the "
"linux.conf.au 2018 artwork.",
required=False,
render_type=inv.Category.RENDER_TYPE_ITEM_QUANTITY,
diff --git a/pinaxcon/registrasion/migrations/0006_auto_20170927_2301.py b/pinaxcon/registrasion/migrations/0006_auto_20170927_2301.py
new file mode 100644
index 00000000..98330ac6
--- /dev/null
+++ b/pinaxcon/registrasion/migrations/0006_auto_20170927_2301.py
@@ -0,0 +1,26 @@
+# -*- coding: utf-8 -*-
+# Generated by Django 1.11.5 on 2017-09-27 13:01
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('pinaxcon_registrasion', '0005_auto_20170702_2233'),
+ ]
+
+ operations = [
+ migrations.AddField(
+ model_name='attendeeprofile',
+ name='future_conference',
+ field=models.BooleanField(default=False, help_text='Select to have your login details made available to future Linux Australia conferences who share the same Single Sign On system.', verbose_name='Reuse my login for future Linux Australia conferences?'),
+ preserve_default=False,
+ ),
+ migrations.AlterField(
+ model_name='attendeeprofile',
+ name='lca_chat',
+ field=models.BooleanField(help_text='lca2018-chat is a high-traffic mailing list used by attendees during the week of the conference for general discussion.', verbose_name='Subscribe to the lca2018-chat list'),
+ ),
+ ]
diff --git a/pinaxcon/registrasion/models.py b/pinaxcon/registrasion/models.py
index f30af712..d341738d 100644
--- a/pinaxcon/registrasion/models.py
+++ b/pinaxcon/registrasion/models.py
@@ -179,13 +179,22 @@ class AttendeeProfile(rego.AttendeeProfileBase):
)
lca_chat = models.BooleanField(
- verbose_name="Subscribe to the lca2017-chat list",
- help_text="lca2017-chat is a high-traffic mailing list used by "
+ verbose_name="Subscribe to the lca2018-chat list",
+ help_text="lca2018-chat is a high-traffic mailing list used by "
"attendees during the week of the conference for general "
"discussion.",
blank=True,
)
+ future_conference = models.BooleanField(
+ verbose_name = "Reuse my login for future Linux Australia conferences?",
+ help_text="Select to have your login details made available to future "
+ "Linux Australia conferences who share the same Single Sign "
+ "On system.",
+ blank=True,
+ )
+
+
past_lca = models.ManyToManyField(
PastEvent,
verbose_name="Which past linux.conf.au events have you attended?",
diff --git a/pinaxcon/templates/_form_snippet.html b/pinaxcon/templates/_form_snippet.html
index 7d64b937..1e5193a3 100644
--- a/pinaxcon/templates/_form_snippet.html
+++ b/pinaxcon/templates/_form_snippet.html
@@ -1,4 +1,4 @@
-{% load pyconau2017_tags %}
+{% load lca2018_tags %}
{% load bootstrap %}
{% if form.non_field_errors %}
diff --git a/pinaxcon/templates/content_page.html b/pinaxcon/templates/content_page.html
index 1b87f005..7fb76a8e 100644
--- a/pinaxcon/templates/content_page.html
+++ b/pinaxcon/templates/content_page.html
@@ -1,7 +1,7 @@
{% extends "site_base.html" %}
{% load staticfiles %}
-{% load pyconau2017_tags %}
+{% load lca2018_tags %}
{% load i18n %}
diff --git a/pinaxcon/templates/dashboard.html b/pinaxcon/templates/dashboard.html
index 70d0084b..eab991c5 100644
--- a/pinaxcon/templates/dashboard.html
+++ b/pinaxcon/templates/dashboard.html
@@ -5,7 +5,7 @@
{% load review_tags %}
{% load teams_tags %}
{% load registrasion_tags %}
-{% load pyconau2017_tags %}
+{% load lca2018_tags %}
{% load staticfiles %}
@@ -127,7 +127,7 @@
{% endfor %}
- Show void invoices
+
diff --git a/pinaxcon/templates/registrasion/_invoice_details.html b/pinaxcon/templates/registrasion/_invoice_details.html
index 12142037..0eba3c02 100644
--- a/pinaxcon/templates/registrasion/_invoice_details.html
+++ b/pinaxcon/templates/registrasion/_invoice_details.html
@@ -1,12 +1,12 @@
{% load registrasion_tags %}
-{% load pyconau2017_tags %}
+{% load lca2018_tags %}
Tax Invoice/Statement
Linux Australia
ABN 56 987 117 479
- Enquiries: please e-mail team@hobart.pyconau2017.org
+ Enquiries: please e-mail team@lca2018.org
diff --git a/pinaxcon/templates/registrasion/guided_registration.html b/pinaxcon/templates/registrasion/guided_registration.html
index 71af3298..01927a6b 100644
--- a/pinaxcon/templates/registrasion/guided_registration.html
+++ b/pinaxcon/templates/registrasion/guided_registration.html
@@ -1,5 +1,5 @@
{% extends "registrasion/base.html" %}
-{% load pyconau2017_tags %}
+{% load lca2018_tags %}
{% block header_title %}Buy Your Ticket{% endblock %}
{% block header_paragraph %}Step {{ current_step }} of {{ total_steps|add:1 }} – {{ title }} {% endblock %}
diff --git a/pinaxcon/templates/registrasion/invoice.html b/pinaxcon/templates/registrasion/invoice.html
index ebfadd9a..6e8a0812 100644
--- a/pinaxcon/templates/registrasion/invoice.html
+++ b/pinaxcon/templates/registrasion/invoice.html
@@ -1,15 +1,15 @@
{% extends "registrasion/base.html" %}
{% load registrasion_tags %}
-{% load pyconau2017_tags %}
+{% load lca2018_tags %}
{% load staticfiles %}
{% block header_title %}{% conference_name %}{% endblock %}
{% block header_paragraph %}
- Monday 16 January–Friday 20 January 2017.
- Wrest Point Convention Centre, Hobart, Tasmania, Australia.
+ Monday 22 January–Friday 26 January 2018.
+ University of Technology Sydney, New South Wales, Australia.
{% endblock %}
{% block header_inset_image %}{% illustration "tuz.svg" %}{% endblock %}
-{% block header_background_image %}{% static "pyconau2017/images/wp_bg_optimised.jpg" %}{% endblock %}
+{% block header_background_image %}{% static "lca2018/images/wp_bg_optimised.jpg" %}{% endblock %}
{% block content %}
@@ -25,7 +25,7 @@
{% url "invoice_access" invoice.user.attendee.access_code as access_url %}
Your most recent unpaid invoice will be available at
{{ request.scheme }}://{{ request.get_host }}{{ access_url }}
- You can give this URL to your accounts department to pay for this invoice.
+ You can print that page for your records, or give this URL to your accounts department to pay for this invoice
Pay this invoice by card
diff --git a/pinaxcon/templates/registrasion/product_category.html b/pinaxcon/templates/registrasion/product_category.html
index 0cbd23ce..fa2e518a 100644
--- a/pinaxcon/templates/registrasion/product_category.html
+++ b/pinaxcon/templates/registrasion/product_category.html
@@ -1,6 +1,6 @@
{% extends "registrasion/base.html" %}
{% load registrasion_tags %}
-{% load pyconau2017_tags %}
+{% load lca2018_tags %}
{% block header_title %}Product Category: {{ category.name }}{% endblock %}
{% block header_inset_image %}{% illustration "lavender.svg" %}{% endblock %}
diff --git a/pinaxcon/templates/registrasion/profile_form.html b/pinaxcon/templates/registrasion/profile_form.html
index 5911874d..fe3fdc36 100644
--- a/pinaxcon/templates/registrasion/profile_form.html
+++ b/pinaxcon/templates/registrasion/profile_form.html
@@ -1,5 +1,5 @@
{% extends "registrasion/base.html" %}
-{% load pyconau2017_tags %}
+{% load lca2018_tags %}
{% block header_title %}Your profile{% endblock %}
{% block header_paragraph %}
diff --git a/pinaxcon/templates/registrasion/review.html b/pinaxcon/templates/registrasion/review.html
index f582673b..9a9ef144 100644
--- a/pinaxcon/templates/registrasion/review.html
+++ b/pinaxcon/templates/registrasion/review.html
@@ -1,6 +1,6 @@
{% extends "registrasion/base.html" %}
{% load registrasion_tags %}
-{% load pyconau2017_tags %}
+{% load lca2018_tags %}
{% block header_title %}Review your selection{% endblock %}
{% block header_inset_image %}{% illustration "wineglass.svg" %}{% endblock %}
@@ -58,7 +58,7 @@
the dashboard.
-
+
Check out and pay
Return to dashboard
diff --git a/pinaxcon/templates/registrasion/stripe/credit_card_payment.html b/pinaxcon/templates/registrasion/stripe/credit_card_payment.html
index 33b1a9e0..c35b96bf 100644
--- a/pinaxcon/templates/registrasion/stripe/credit_card_payment.html
+++ b/pinaxcon/templates/registrasion/stripe/credit_card_payment.html
@@ -1,6 +1,6 @@
{% extends "registrasion/base.html" %}
{% load registrasion_tags %}
-{% load pyconau2017_tags %}
+{% load lca2018_tags %}
{% block scripts %}
diff --git a/pinaxcon/templates/symposion/proposals/_proposal_fields.html b/pinaxcon/templates/symposion/proposals/_proposal_fields.html
index 86940b0b..dd9f4925 100644
--- a/pinaxcon/templates/symposion/proposals/_proposal_fields.html
+++ b/pinaxcon/templates/symposion/proposals/_proposal_fields.html
@@ -1,5 +1,5 @@
{% load i18n %}
-{% load pyconau2017_tags %}
+{% load lca2018_tags %}
diff --git a/pinaxcon/templates/symposion/schedule/_grid.html b/pinaxcon/templates/symposion/schedule/_grid.html
index f5899cd5..eee236b7 100644
--- a/pinaxcon/templates/symposion/schedule/_grid.html
+++ b/pinaxcon/templates/symposion/schedule/_grid.html
@@ -1,4 +1,4 @@
-{% load pyconau2017_tags %}
+{% load lca2018_tags %}
diff --git a/pinaxcon/templates/symposion/schedule/presentation_detail.html b/pinaxcon/templates/symposion/schedule/presentation_detail.html
index cd19cb40..16626ab8 100644
--- a/pinaxcon/templates/symposion/schedule/presentation_detail.html
+++ b/pinaxcon/templates/symposion/schedule/presentation_detail.html
@@ -1,6 +1,6 @@
{% extends "symposion/schedule/public_base.html" %}
-{% load pyconau2017_tags %}
+{% load lca2018_tags %}
{% load sitetree %}
{% load staticfiles %}
{% load thumbnail %}
@@ -11,7 +11,7 @@
{% block header_inset_image %}{% with audience=presentation.proposal.get_target_audience_display %}{% if audience == "Business" %}{% illustration "falls.svg" %}{% elif audience == "Community" %}{% illustration "bridge.svg" %}{% elif audience == "Developer"%}{% illustration "hobart.svg" %}{% elif audience == "User" %}{% illustration "antarctica.svg" %}{% else %}{% illustration "casino.svg" %}{% endif %}{% endwith %}{% endblock %}
-{% block header_background_image %}{% presentation_bg_number presentation 4 as bg_number %}{% if bg_number == 0 %}{% static "pyconau2017/images/mt_anne_bg_optimised.jpg" %}{% elif bg_number == 1 %}{% static "pyconau2017/images/the_neck_bg_optimised.jpg" %}{% elif bg_number == 2 %}{% static "pyconau2017/images/snug_falls_bg_optimised.jpg" %}{% elif bg_number == 3 %}{% static "pyconau2017/images/sleepy_bay_bg_optimised.jpg" %}{% endif %}{% endblock %}
+{% block header_background_image %}{% presentation_bg_number presentation 4 as bg_number %}{% if bg_number == 0 %}{% static "lca2018/images/mt_anne_bg_optimised.jpg" %}{% elif bg_number == 1 %}{% static "lca2018/images/the_neck_bg_optimised.jpg" %}{% elif bg_number == 2 %}{% static "lca2018/images/snug_falls_bg_optimised.jpg" %}{% elif bg_number == 3 %}{% static "lca2018/images/sleepy_bay_bg_optimised.jpg" %}{% endif %}{% endblock %}
{% block header_title %}{{ presentation.title }}{% endblock %}
diff --git a/pinaxcon/templates/symposion/schedule/public_base.html b/pinaxcon/templates/symposion/schedule/public_base.html
index 1de13708..e2b6668b 100644
--- a/pinaxcon/templates/symposion/schedule/public_base.html
+++ b/pinaxcon/templates/symposion/schedule/public_base.html
@@ -3,5 +3,5 @@
{% load staticfiles %}
{% comment %}
-{% block header_background_image %}{% static "pyconau2017/images/hobart_bg_optimised.jpg" %}{% endblock %}
+{% block header_background_image %}{% static "lca2018/images/hobart_bg_optimised.jpg" %}{% endblock %}
{% endcomment %}
diff --git a/pinaxcon/templates/symposion/schedule/schedule_conference.html b/pinaxcon/templates/symposion/schedule/schedule_conference.html
index ee075e76..7b8d92bf 100644
--- a/pinaxcon/templates/symposion/schedule/schedule_conference.html
+++ b/pinaxcon/templates/symposion/schedule/schedule_conference.html
@@ -2,7 +2,7 @@
{% load i18n %}
{% load cache %}
-{% load pyconau2017_tags %}
+{% load lca2018_tags %}
{% block head_title %}Conference Schedule{% endblock %}
{% block header_title %}Conference Schedule{% endblock %}
@@ -57,16 +57,16 @@
fragment = window.location.hash.toLowerCase().substring(1);
if (!fragment) {
- OFFSET = -11 * (60 * 60 * 1000); // Hobart is 11 hours ahead of UTC in Jan.
+ OFFSET = -11 * (60 * 60 * 1000); // Sydney is 11 hours ahead of UTC in Jan.
JAN = 0; // because January is 0, not 1
fragments = [
- {"day": "monday", "time": Date.UTC(2017, JAN, 16)},
- {"day": "tuesday", "time": Date.UTC(2017, JAN, 17)},
- {"day": "wednesday", "time": Date.UTC(2017, JAN, 18)},
- {"day": "thursday", "time": Date.UTC(2017, JAN, 19)},
- {"day": "friday", "time": Date.UTC(2017, JAN, 20)},
- {"day": "saturday", "time": Date.UTC(2017, JAN, 21)},
+ {"day": "monday", "time": Date.UTC(2018, JAN, 22)},
+ {"day": "tuesday", "time": Date.UTC(2018, JAN, 23)},
+ {"day": "wednesday", "time": Date.UTC(2018, JAN, 24)},
+ {"day": "thursday", "time": Date.UTC(2018, JAN, 25)},
+ {"day": "friday", "time": Date.UTC(2018, JAN, 26)},
+ {"day": "saturday", "time": Date.UTC(2018, JAN, 27)},
];
now = new Date().getTime();
diff --git a/pinaxcon/templates/symposion/schedule/schedule_detail.html b/pinaxcon/templates/symposion/schedule/schedule_detail.html
index 0b83d66e..abb2b776 100644
--- a/pinaxcon/templates/symposion/schedule/schedule_detail.html
+++ b/pinaxcon/templates/symposion/schedule/schedule_detail.html
@@ -2,7 +2,7 @@
{% load i18n %}
{% load cache %}
-{% load pyconau2017_tags %}
+{% load lca2018_tags %}
{% load sitetree %}
{% block head_title %}{{ schedule.section }} Schedule{% endblock %}
diff --git a/pinaxcon/templates/symposion/schedule/schedule_list.html b/pinaxcon/templates/symposion/schedule/schedule_list.html
index 565a8ff0..f2ac9364 100644
--- a/pinaxcon/templates/symposion/schedule/schedule_list.html
+++ b/pinaxcon/templates/symposion/schedule/schedule_list.html
@@ -2,7 +2,7 @@
{% load i18n %}
{% load cache %}
-{% load pyconau2017_tags %}
+{% load lca2018_tags %}
{% load sitetree %}
{% block head_title %}Presentation Listing{% endblock %}
diff --git a/pinaxcon/templates/symposion/speakers/speaker_profile.html b/pinaxcon/templates/symposion/speakers/speaker_profile.html
index f1221e59..ee3b49ed 100644
--- a/pinaxcon/templates/symposion/speakers/speaker_profile.html
+++ b/pinaxcon/templates/symposion/speakers/speaker_profile.html
@@ -1,7 +1,7 @@
{% extends "symposion/schedule/public_base.html" %}
{% load i18n %}
-{% load pyconau2017_tags %}
+{% load lca2018_tags %}
{% load thumbnail %}
{% if speaker.photo %}
diff --git a/pinaxcon/templates/symposion/sponsorship/_sponsor_link.html b/pinaxcon/templates/symposion/sponsorship/_sponsor_link.html
index 0b9bcd8d..2859683d 100644
--- a/pinaxcon/templates/symposion/sponsorship/_sponsor_link.html
+++ b/pinaxcon/templates/symposion/sponsorship/_sponsor_link.html
@@ -1,4 +1,4 @@
-{% load pyconau2017_tags %}
+{% load lca2018_tags %}
{% spaceless %}
diff --git a/pinaxcon/templates/symposion/sponsorship/list.html b/pinaxcon/templates/symposion/sponsorship/list.html
index cb5d1c5a..6b5c285a 100644
--- a/pinaxcon/templates/symposion/sponsorship/list.html
+++ b/pinaxcon/templates/symposion/sponsorship/list.html
@@ -1,7 +1,7 @@
{% extends "site_base.html" %}
{% load sponsorship_tags %}
-{% load pyconau2017_tags %}
+{% load lca2018_tags %}
{% load i18n %}
{% block head_title %}{% trans "About Our Sponsors" %}{% endblock %}
diff --git a/pinaxcon/templatetags/lca2017_tags.py b/pinaxcon/templatetags/lca2018_tags.py
similarity index 93%
rename from pinaxcon/templatetags/lca2017_tags.py
rename to pinaxcon/templatetags/lca2018_tags.py
index 4e142983..02b624a7 100644
--- a/pinaxcon/templatetags/lca2017_tags.py
+++ b/pinaxcon/templatetags/lca2018_tags.py
@@ -34,11 +34,9 @@ def proposal_permission(context, permname, proposal):
return context.request.user.has_perm(perm)
-# {% load statictags %}{% static 'pyconau2017/images/svgs/illustrations/' %}{{ illustration }}
-
@register.simple_tag(takes_context=False)
def illustration(name):
- return staticfiles.static('pyconau2017/images/svgs/illustrations/') + name
+ return staticfiles.static('lca2018/images/svgs/illustrations/') + name
@register.simple_tag(takes_context=True)
diff --git a/pinaxcon/templatetags/pyconau2017_tags.py b/pinaxcon/templatetags/pyconau2017_tags.py
deleted file mode 100644
index 894b077f..00000000
--- a/pinaxcon/templatetags/pyconau2017_tags.py
+++ /dev/null
@@ -1,100 +0,0 @@
-import hashlib
-
-import os
-
-from decimal import Decimal
-from django import template
-from django.conf import settings
-from django.contrib.staticfiles.templatetags import staticfiles
-from easy_thumbnails.files import get_thumbnailer
-from symposion.conference import models as conference_models
-from symposion.schedule.models import Track
-
-CONFERENCE_ID = settings.CONFERENCE_ID
-
-register = template.Library()
-
-
-@register.assignment_tag()
-def classname(ob):
- return ob.__class__.__name__
-
-
-@register.simple_tag(takes_context=True)
-def can_manage(context, proposal):
- return proposal_permission(context, "manage", proposal)
-
-
-@register.simple_tag(takes_context=True)
-def can_review(context, proposal):
- return proposal_permission(context, "review", proposal)
-
-
-def proposal_permission(context, permname, proposal):
- slug = proposal.kind.section.slug
- perm = "reviews.can_%s_%s" % (permname, slug)
- return context.request.user.has_perm(perm)
-
-
-# {% load statictags %}{% static 'pyconau2017/images/svgs/illustrations/' %}{{ illustration }}
-
-@register.simple_tag(takes_context=False)
-def illustration(name):
- return staticfiles.static('pyconau2017/images/svgs/illustrations/') + name
-
-
-@register.simple_tag(takes_context=True)
-def speaker_photo(context, speaker, size):
- ''' Provides the speaker profile, or else fall back to libravatar or gravatar. '''
-
- if speaker.photo:
- thumbnailer = get_thumbnailer(speaker.photo)
- thumbnail_options = {'crop': True, 'size': (size, size)}
- thumbnail = thumbnailer.get_thumbnail(thumbnail_options)
- return thumbnail.url
- else:
- email = speaker.user.email.encode("utf-8")
- md5sum = hashlib.md5(email.strip().lower()).hexdigest()
- fallback_image = ("https://2017.pycon-au.org/site_media/static"
- "/pyconau23017/images/speaker-fallback-devil.jpg")
- url = "https://secure.gravatar.com/avatar/%s?s=%d&d=%s" % (md5sum, size, fallback_image)
-
- return url
-
-
-@register.simple_tag()
-def define(value):
- return value
-
-
-@register.simple_tag()
-def presentation_bg_number(presentation, count):
- return sum(ord(i) for i in presentation.title) % count
-
-
-@register.filter()
-def gst(amount):
- two_places = Decimal(10) ** -2
- return Decimal(amount / 11).quantize(two_places)
-
-
-@register.simple_tag()
-def conference_name():
- return conference_models.Conference.objects.get(id=CONFERENCE_ID).title
-
-
-@register.filter()
-def trackname(room, day):
- try:
- track_name = room.track_set.get(day=day).name
- except Track.DoesNotExist:
- track_name = None
- return track_name
-
-
-@register.simple_tag()
-def sponsor_thumbnail(sponsor_logo):
- if sponsor_logo is not None:
- if sponsor_logo.upload:
- return sponsor_logo.upload.url
- return ""