diff --git a/pinaxcon/templates/registrasion/badge.svg b/pinaxcon/templates/registrasion/badge.svg
index 499ac6d..162e096 100644
--- a/pinaxcon/templates/registrasion/badge.svg
+++ b/pinaxcon/templates/registrasion/badge.svg
@@ -1,158 +1,13 @@
-
-
+{% spaceless %}
-
+{% load nbpy_tags %}
+{% name_split user.attendee.attendeeprofilebase.attendeeprofile.name as split_name %}
+{% ticket_type as ticket %}
+{% affiliation ticket user as aff %}
+{% company_split aff as split_affiliation %}
-
+{% with name1=split_name.first name2=split_name.last affiliation1=split_affiliation.first affiliation2=split_affiliation.last %}
+ {% include "registrasion/badge_outer.svg" %}
+{% endwith %}
+
+{% endspaceless %}
diff --git a/pinaxcon/templates/registrasion/badge_outer.svg b/pinaxcon/templates/registrasion/badge_outer.svg
new file mode 100644
index 0000000..2f2d3c2
--- /dev/null
+++ b/pinaxcon/templates/registrasion/badge_outer.svg
@@ -0,0 +1,368 @@
+
+
diff --git a/pinaxcon/templatetags/nbpy_tags.py b/pinaxcon/templatetags/nbpy_tags.py
index e3f51d8..9228dab 100644
--- a/pinaxcon/templatetags/nbpy_tags.py
+++ b/pinaxcon/templatetags/nbpy_tags.py
@@ -48,16 +48,48 @@ def donation_income(context, invoice):
# TODO: include van/de/van der/de la/etc etc etc
@register.simple_tag
-def name_split(name):
+def name_split(name, split_characters=None):
tokens = name.split()
- even_split = int((len(tokens) + 1) / 2) # Round up.
+ if split_characters is None or len(name) > split_characters:
+ even_split = int((len(tokens) + 1) / 2) # Round up.
+ else:
+ even_split = len(tokens)
return {
"first" : " ".join(tokens[:even_split]),
"last" : " ".join(tokens[even_split:]),
}
+@register.simple_tag
+def company_split(name):
+ f = name_split(name, 18)
+ print f
+ return f
+
+
+
+CLEARED = set([
+ "BeeWare Project",
+ "Project Jupyter",
+ "PSF Packaging WG / PyCon 2018 Chair",
+ "PyCon Ukraine",
+ "PyLadies PDX",
+ "Recovered Silver",
+ "Twisted",
+ "@vmbrasseur",
+])
+
+@register.simple_tag
+def affiliation(ticket, user):
+ aff = user.attendee.attendeeprofilebase.attendeeprofile.company
+ if "Individual" not in ticket or "Sponsor" in ticket:
+ return aff
+ elif ticket == "Individual Supporter" and aff in CLEARED:
+ return aff
+ else:
+ return ""
+
@register.simple_tag(takes_context=True)
def ticket_type(context):