python - Validating URL paramaters -


how should 1 validate url parameters in view? accomplished using a bunch of ìf statements or there better way go it? i'd validate parameters when request comes in rather having scattered across view, model , manager.

when validation i'm referring basic checks such existence of key, checking data type, integer ranges, etc.

thanks.

i think in case depends on scale of application if it's small application doing data validation via simple if statements easiest route, django have features support nicer form validation(https://docs.djangoproject.com/en/1.3/ref/forms/validation/), might cleaner way, still boils down if statements in end.


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -