def handler_userpenaltymovieadmin(request):
    aAdminUser = user.adminUser()    
    if not aAdminUser.getAdminUser():
        return HttpResponseRedirect("/login/")    
    
    penalty_id = request.REQUEST.get('id')   
    userPenaltyObject = api.getUserPenaltyById(penalty_id)
    
    penalty_para={
        'uuid':util.get_universally_unique_identifiers(),
        'detail': userPenaltyObject.detail,     
        'lang_type': userPenaltyObject.lang_type            
    }
    
    adminPanaltyVO = proxy.px_AdminPenalty().createAdminPenaltyObject(penalty_para)            
    proxy.px_AdminPenalty().insert_model_object(adminPanaltyVO)
    
    api.deleteUserPenalty(userPenaltyObject)
    
    
    return HttpResponseRedirect("/kinggame/userpenaltylist/")    
    
    
    
    
Пример #2
0
    def __handleInsertPenalty(self):
        insertType = self.Request.REQUEST.get('type', '')

        penalty_para = self.__getPenaltyDictionaryData()

        if (insertType == 'user'):
            userPanaltyVO = proxy.px_UserPenalty().createUserPenaltyObject(
                penalty_para)
            if not proxy.px_UserPenalty().insert_model_object(userPanaltyVO):
                raise exception.AppDbValidationError('db insert error')
        elif (insertType == 'admin'):
            adminPanaltyVO = proxy.px_AdminPenalty().createAdminPenaltyObject(
                penalty_para)
            if not proxy.px_AdminPenalty().insert_model_object(adminPanaltyVO):
                raise exception.AppDbValidationError('db insert error')
        else:
            raise exception.AppValidationError('null allow this type')
Пример #3
0
def getPenaltyList():
    return proxy.px_AdminPenalty().getPenaltyList()
Пример #4
0
def getAdminPenaltyById(id):
    return proxy.px_AdminPenalty().getAdminPenaltyById(id)
Пример #5
0
def getAdminPenaltyList(next=None):
    return proxy.px_AdminPenalty().getAdminPenaltyList(next)
Пример #6
0
def getTopPenaltyList(type="kr", next=None):
    return proxy.px_AdminPenalty().getTopPenaltyList(type, next)
Пример #7
0
def getPenaltyList():
    return proxy.px_AdminPenalty().getPenaltyList()
Пример #8
0
def getAdminPenaltyById(id):
    return proxy.px_AdminPenalty().getAdminPenaltyById(id)
Пример #9
0
def getAdminPenaltyList(next=None):
    return proxy.px_AdminPenalty().getAdminPenaltyList(next)
Пример #10
0
def getTopPenaltyList(type='kr', next=None):
    return proxy.px_AdminPenalty().getTopPenaltyList(type, next)