Ejemplo n.º 1
0
def MyNotifications(Request):
    if not GF.SESSION(Request):
        return StatusPages.UnAuthurithedUserPage(Request, 'My Notifications')

    UserNotifications = Notifications.objects.filter(User_Email=Hashing.Hash_Notifications(
        Request.session["Email"]
    )).order_by('-id')[:7]
    return MyNotifications_Render(Request, UserNotifications)
Ejemplo n.º 2
0
def Settings(Request, Section='Picture'):
    if not GF.SESSION(Request):
        return StatusPages.UnAuthurithedUserPage(Request, 'Settings')

    if Request.method == 'POST' and URL.REFERER_is_Set(Request):

        if URL.GetURL(Request) == init.Settings:
            return Settings_PictureResponse(Request)
        elif URL.GetURL(Request) == init.Settings+'/Name':
            return Settings_NameResponse(Request)
        elif URL.GetURL(Request) == init.Settings+'/Password':
            return Settings_PasswordResponse(Request)
        elif URL.GetURL(Request) == init.Settings+'/DeActivate':
            if 'DeactivateSubmit' in Request.POST:
                return Settings_Account(Request, 1)
            return Settings_Account(Request, 0)

    return Settings_Render(Request, Section,
                           Request.GET["Result"] if 'Result' in Request.GET else '')