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/")
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')
def getPenaltyList(): return proxy.px_AdminPenalty().getPenaltyList()
def getAdminPenaltyById(id): return proxy.px_AdminPenalty().getAdminPenaltyById(id)
def getAdminPenaltyList(next=None): return proxy.px_AdminPenalty().getAdminPenaltyList(next)
def getTopPenaltyList(type="kr", next=None): return proxy.px_AdminPenalty().getTopPenaltyList(type, next)
def getTopPenaltyList(type='kr', next=None): return proxy.px_AdminPenalty().getTopPenaltyList(type, next)