Picture plugin: small improvements #1468

merged 3 commits into from Oct 9, 2012


None yet

3 participants


Made a couple of small changes to the Picture plugin: tried to improve the help_text, added some input validation.

Question: the url field is used to store URLs (as the name suggests!) and is a CharField - I would have expected a URLField,
Is there a reason to use a CharField - I went through the history of this file and could not find any clues.
I would be happy to change the field type, but only if it's likely to get merged :-)


My guess is that it is a CharField to allow values that fail validation of the URLField, e.g. relative links, or internal links without protocol and domain.

btw, the travis build failure seems to have been caused by a travis problem, not your code. I hate that they advertise it as "failed build" when it is actually the service that failed...

Divio AG member

I don't remember either why it is a Charfield. I would merge a field type change. But only if it get's in after #1343

@digi604 digi604 merged commit 764702a into divio:develop Oct 9, 2012

1 check failed

Details default The Travis build failed

@digi604 a switch to URLField would make the above use cases impossible, and I think they are relevant enough to keep around


@piquadrat Storing relative links instead of a full URL - yes, I can see how that could be useful. It then leads on to the question "Should Django's URLField also handle these edge cases?", but that's a project for another day...

@digi604 Thanks for merging my code.


@richardbarran FYI, there's a ticket on Django's trac, but it's closed as wontfix: https://code.djangoproject.com/ticket/10896

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment