Tuesday, January 24, 2012

Re: Deverifying a URLField

On 25/01/2012 10:30am, Rich Jones wrote:
> Hello, all!
>
> I have a small conundrum I could use a hand with.
>
> I have a deployed Django application with a Model which has a
> URLField:
>
> project_homepage = models.URLField('Project Homepage', blank=True)

How about ...

project_homepage = models.URLField('Project Homepage', blank=True,
verify_exists=(not settings.DEBUG))

... which should avoid verification during development but make it
happen in production.

>
> and a ModelForm to create the parent object.
>
> Currently, the application checks to see if this is a valid URL. I
> would like this to be unvalidated instead.
>
> How do I go about changing it? Will I need to do a database migration
> to do this? Or can I just add a 'verified=False' and run syncdb?
>
> Thanks so much!
> Rich
>

--
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.

No comments:

Post a Comment