app/soc/views/simple.py
changeset 365 74dec172944e
parent 361 465e4df617de
child 374 9363b9dc2983
equal deleted inserted replaced
364:ab47d3f494b3 365:74dec172944e
    20 __authors__ = [
    20 __authors__ = [
    21   '"Todd Larsen" <tlarsen@google.com>',
    21   '"Todd Larsen" <tlarsen@google.com>',
    22   '"Pawel Solyga" <pawel.solyga@gmail.com>',
    22   '"Pawel Solyga" <pawel.solyga@gmail.com>',
    23   ]
    23   ]
    24 
    24 
    25 from google.appengine.api import users
       
    26 
    25 
    27 from django.utils.translation import ugettext_lazy
    26 from django.utils.translation import ugettext_lazy
    28 
    27 
    29 from soc.logic import out_of_band
    28 from soc.logic import out_of_band
    30 from soc.logic.site import id_user
    29 from soc.logic.site import id_user
    31 from soc.views import helper
    30 from soc.views import helper
       
    31 from soc.views.helper import decorators
    32 
    32 
    33 import soc.views.helper.responses
    33 import soc.views.helper.responses
    34 import soc.views.helper.templates
    34 import soc.views.helper.templates
    35 
    35 
    36 
    36 
    37 DEF_PUBLIC_TMPL = 'soc/base.html'
    37 DEF_PUBLIC_TMPL = 'soc/base.html'
    38 
    38 
       
    39 @decorators.view
    39 def public(request, page=None, template=DEF_PUBLIC_TMPL, link_name=None,
    40 def public(request, page=None, template=DEF_PUBLIC_TMPL, link_name=None,
    40            context=None):
    41            context=None):
    41   """A simple template view that expects a link_name extracted from the URL.
    42   """A simple template view that expects a link_name extracted from the URL.
    42 
    43 
    43   Args:
    44   Args: