Wednesday, September 7, 2011

RE: automatic type conversion from URL parameters Options

> One solution to your problem could be to write a decorator that takes a
> list of types (plus something like None for "don't care") and
> automatically converts argument N to thetypein the N-th element of the
> list before calling your function.

Is there an example or tutorial showing how to write a decorator? I'm
interested in automatically converting the url parameter that comes in
as a string. So 'None' converts to the object None.

Thanks,
Josh

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate