Unit conversions between model field value and form field value

2019-05-07 Thread Tim Bell
Hi, I have a model with an integer field storing a duration in hours, while I want to present that to users in a form in days. (The choice of these different units is imposed by other factors not under my control.) So, when saving a form, I need to convert a value in days to hours by multiplyi

Re: Invalid URLs passing validation by URLValidator

2018-06-27 Thread Tim Bell
up, or report it as a bug on the django > bug tracker. > Reported as a bug (with a fix): https://code.djangoproject.com/ticket/29528 Cheers, Tim Bell -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from th

Re: Invalid URLs passing validation by URLValidator

2018-06-27 Thread Tim Bell
, so the > bug is still there and nice catch! > > I've filed a bug (and created a pull request): https://code.djangoproject.com/ticket/29528 Cheers, Tim Bell -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe

Invalid URLs passing validation by URLValidator

2018-06-21 Thread Tim Bell
percent-encoded. http://FOO/b...@example.com Similarly, I think this passes validation not because "FOO" is being treated as a valid hostname, but because "FOO/bar" is considered a username, even though "/" isn't percent-encoded. Should this be considered a