Commit 4d128674 authored by Arthur Lutz's avatar Arthur Lutz
Browse files

[views] add a page to pdf with logo only so as to do handmade badges (closes #2335854)

parent d592672d5c23
......@@ -203,6 +203,17 @@ class BadgesController(Controller):
raise Redirect(conference.absolute_url(vid='badgeview', logo=logo,
is_logo_tempfile=is_logo_tempfile))
class EmptyPerson(object):
""" fake class to fake people with empty names to do handmade badges """
representing = u' '
is_chair_at = False
leads = False
firstname = u''
surname = u''
def dc_long_title(self):
return u' '
class BadgeView(EntityView):
__regid__ = 'badgeview'
title = _('generate badges')
......@@ -227,6 +238,7 @@ class BadgeView(EntityView):
self._cw.user.dc_long_title(), 'Badges',
)
page.fill_page(self.get_users(conference))
page.fill_page([EmptyPerson(),]*9) #empty badges for last minute attendees
if is_logo_tempfile:
os.remove(logo)
self.w(open(self.filename).read())
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment