MCPcopy Index your code
hub / github.com/ddserver/ddserver / wrapped

Function wrapped

ddserver/interface/validation.py:68–85  ·  view source on GitHub ↗
(messages, *args, **kwargs)

Source from the content-addressed store, hash-verified

66 def wrapper(func):
67 @require(messages = 'ddserver.interface.message:MessageManager')
68 def wrapped(messages, *args, **kwargs):
69 validator = Schema()
70
71 try:
72 # Validate the POST values using the schema
73 data = validator().to_python({k : bottle.request.POST.get(k)
74 for k
75 in bottle.request.POST})
76
77 func(*args,
78 data = Values(data),
79 **kwargs)
80
81 except formencode.Invalid, e:
82 for msg in e.error_dict.itervalues():
83 messages.error(msg)
84
85 bottle.redirect(__on_error__)
86
87 return wrapped
88 return wrapper

Callers

nothing calls this directly

Calls 2

ValuesClass · 0.85
errorMethod · 0.80

Tested by

no test coverage detected