diff --git a/pinaxcon/registrasion/models.py b/pinaxcon/registrasion/models.py
index 863e0e82..c9cb3f53 100644
--- a/pinaxcon/registrasion/models.py
+++ b/pinaxcon/registrasion/models.py
@@ -1,10 +1,10 @@
+from textwrap import wrap
from django.core.exceptions import ValidationError
from django.db import models
from django.utils.encoding import python_2_unicode_compatible
from django_countries.fields import CountryField
from registrasion import models as rego
-
@python_2_unicode_compatible
class PastEvent(models.Model):
''' This is populated in 0001_initial.py '''
@@ -213,7 +213,7 @@ class AttendeeProfile(rego.AttendeeProfileBase):
)
def first_name(self):
- return " ".join(self.name.split(" ")[:-1])
+ return wrap(self.name, 15, break_long_words=False)[0]
def last_name(self):
- return self.name.split(" ")[-1]
+ return wrap(self.name, 15, break_long_words=False)[1]
diff --git a/pinaxcon/templates/registrasion/badge.svg b/pinaxcon/templates/registrasion/badge.svg
index 0c34d897..88cc17af 100644
--- a/pinaxcon/templates/registrasion/badge.svg
+++ b/pinaxcon/templates/registrasion/badge.svg
@@ -351,10 +351,10 @@
{% if ticket_type == "Student" or ticket_type == "Hobbyist" or "Only" in ticket_type %}{% else %}{{ user.attendee.attendeeprofilebase.attendeeprofile.company }}{% endif %}
- {{ user.attendee.attendeeprofilebase.attendeeprofile.free_text_1 }}
+ {{ user.attendee.attendeeprofilebase.attendeeprofile.free_text_1|truncatechars:35 }}
- {{ user.attendee.attendeeprofilebase.attendeeprofile.free_text_2 }}
+ {{ user.attendee.attendeeprofilebase.attendeeprofile.free_text_2|truncatechars:35 }}
{{ ticket_type|upper }}
@@ -372,19 +372,19 @@
{{ pdns_count }}
- {{ user.attendee.attendeeprofilebase.attendeeprofile.first_name }}
+ {{ user.attendee.attendeeprofilebase.attendeeprofile.first_name }}
- {{ user.attendee.attendeeprofilebase.attendeeprofile.last_name }}
+ {{ user.attendee.attendeeprofilebase.attendeeprofile.last_name }}
{% if ticket_type == "Student" or ticket_type == "Hobbyist" or "Only" in ticket_type %}{% else %}{{ user.attendee.attendeeprofilebase.attendeeprofile.company }}{% endif %}
- {{ user.attendee.attendeeprofilebase.attendeeprofile.free_text_1 }}
+ {{ user.attendee.attendeeprofilebase.attendeeprofile.free_text_1|truncatechars:35 }}
- {{ user.attendee.attendeeprofilebase.attendeeprofile.free_text_2 }}
+ {{ user.attendee.attendeeprofilebase.attendeeprofile.free_text_2|truncatechars:35Schulmannnnnn }}
{{ ticket_type|upper }}