app/soc/logic/helper/notifications.py
changeset 638 22ec01fdf8f4
parent 635 2f5322ad1f5b
child 640 a62a78fe4e43
equal deleted inserted replaced
637:86ec079d8302 638:22ec01fdf8f4
    12 # distributed under the License is distributed on an "AS IS" BASIS,
    12 # distributed under the License is distributed on an "AS IS" BASIS,
    13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    14 # See the License for the specific language governing permissions and
    14 # See the License for the specific language governing permissions and
    15 # limitations under the License.
    15 # limitations under the License.
    16 
    16 
    17 """Helper functions for sending out notifications
    17 """Helper functions for sending out notifications.
    18 """
    18 """
    19 
    19 
    20 __authors__ = [
    20 __authors__ = [
    21   '"Lennard de Rijk" <ljvderijk@gmail.com>',
    21   '"Lennard de Rijk" <ljvderijk@gmail.com>',
    22   ]
    22   ]
       
    23 
       
    24 
       
    25 import os
    23 
    26 
    24 from google.appengine.api import users
    27 from google.appengine.api import users
    25 
    28 
    26 from django.utils.translation import ugettext_lazy
    29 from django.utils.translation import ugettext_lazy
    27 
    30 
    28 from soc.logic import mail_dispatcher
    31 from soc.logic import mail_dispatcher
    29 from soc.logic.models import user as user_logic
    32 from soc.logic.models import user as user_logic
    30 
       
    31 from soc.views.helper import redirects
    33 from soc.views.helper import redirects
    32 
       
    33 import os
       
    34 
    34 
    35 
    35 
    36 DEF_INVITATION_FMT = ugettext_lazy(
    36 DEF_INVITATION_FMT = ugettext_lazy(
    37     "Invitation to become a %(role)s for %(group)s")
    37     "Invitation to become a %(role)s for %(group)s")
    38 
       
    39 
    38 
    40 def sendInviteNotification(entity):
    39 def sendInviteNotification(entity):
    41   """Sends out an invite notification to the user the request is for.
    40   """Sends out an invite notification to the user the request is for.
    42 
    41 
    43   Args:
    42   Args: