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
Post a Comment