@decorators.must_be_logged_in
def prereg_landing_page(auth, **kwargs):
 campaign = (request.path.strip('/') or 'prereg')
 registerable_nodes = [node for node in auth.user.contributor_to if node.has_permission(user=auth.user, permission='admin')]
 has_projects = bool(registerable_nodes)
 has_draft_registrations = bool(utils.drafts_for_user(auth.user, campaign).count())
 return {'has_draft_registrations': has_draft_registrations, 'has_projects': has_projects, 'campaign_long': utils.PREREG_CAMPAIGNS[campaign], 'campaign_short': campaign}

@ decorators . must_be_logged_in def prereg_landing_page ( auth , ** kwargs ) : campaign = ( request . path . strip ( '/' ) or 'prereg' ) registerable_nodes = [ node for node in auth . user . contributor_to if node . has_permission ( user = auth . user , permission = 'admin' ) ] has_projects = bool ( registerable_nodes ) has_draft_registrations = bool ( utils . drafts_for_user ( auth . user , campaign ) . count ( ) ) return { 'has_draft_registrations' : has_draft_registrations , 'has_projects' : has_projects , 'campaign_long' : utils . PREREG_CAMPAIGNS [ campaign ] , 'campaign_short' : campaign }
landing page for the prereg challenge .