app/soc/views/models/user_self.py
changeset 970 8b5611d5b053
parent 890 b3bf833c4580
child 973 f9c2b32b9e2b
equal deleted inserted replaced
969:b12de918d660 970:8b5611d5b053
    27 
    27 
    28 from django import forms
    28 from django import forms
    29 from django import http
    29 from django import http
    30 from django.utils.encoding import force_unicode
    30 from django.utils.encoding import force_unicode
    31 from django.utils.safestring import mark_safe
    31 from django.utils.safestring import mark_safe
    32 from django.utils.translation import ugettext_lazy
    32 from django.utils.translation import ugettext
    33 
    33 
    34 from soc.logic import dicts
    34 from soc.logic import dicts
    35 from soc.logic import validate
    35 from soc.logic import validate
    36 from soc.logic import models as model_logic
    36 from soc.logic import models as model_logic
    37 from soc.logic.models.site import logic as site_logic
    37 from soc.logic.models.site import logic as site_logic
    92 
    92 
    93 class View(base.View):
    93 class View(base.View):
    94   """View methods for the User model.
    94   """View methods for the User model.
    95   """
    95   """
    96 
    96 
    97   DEF_USER_ACCOUNT_INVALID_MSG_FMT = ugettext_lazy(
    97   DEF_USER_ACCOUNT_INVALID_MSG_FMT = ugettext(
    98     'The <b><i>%(email)s</i></b> account cannot be used with this site, for'
    98     'The <b><i>%(email)s</i></b> account cannot be used with this site, for'
    99     ' one or more of the following reasons:'
    99     ' one or more of the following reasons:'
   100     '<ul>'
   100     '<ul>'
   101     ' <li>the account is invalid</li>'
   101     ' <li>the account is invalid</li>'
   102     ' <li>the account is already attached to a User profile and cannot be'
   102     ' <li>the account is already attached to a User profile and cannot be'
   254 
   254 
   255   def getSidebarMenus(self, request, params=None):
   255   def getSidebarMenus(self, request, params=None):
   256     """See base.View.getSidebarMenus().
   256     """See base.View.getSidebarMenus().
   257     """
   257     """
   258 
   258 
   259     link_title = ugettext_lazy('Notifications')
   259     link_title = ugettext('Notifications')
   260 
   260 
   261     user = user_logic.getForCurrentAccount()
   261     user = user_logic.getForCurrentAccount()
   262 
   262 
   263     filter = {
   263     filter = {
   264         'scope': user,
   264         'scope': user,