def reg(request): """Reg action""" data, code, valid = validator.create(request) if valid: if settings.ENV == 'production': try: data, code, user = resource.create(request) except: return {'code': 'account/create/fail'}, 404 else: data, code, user = resource.create(request) return data, code
def create(request): """Create record""" data, code, valid = validator.create(request) if valid: if settings.ENV == 'production': try: data, code, item = resource.create(request) except: return {'code': 'html_cache/create/fail'}, 404 else: data, code, item = resource.create(request) return data, code
def create(request): """Create record""" data, code, valid = validator.create(request) if valid: if settings.ENV == "production": try: data, code, item = resource.create(request) except: return {"code": "tag/create/fail"}, 404 else: data, code, item = resource.create(request) return data, code