Remove deprecated `verify_exists` from URL fields.

This commit is contained in:
Rob Hudson 2013-10-02 11:56:39 -07:00
Родитель eef2dc7f52
Коммит a6ee4b4a45
11 изменённых файлов: 19 добавлений и 27 удалений

Просмотреть файл

@ -411,8 +411,7 @@ def get_satisfaction(url):
class AddonFormSupport(AddonFormBase):
support_url = TransField.adapt(forms.URLField)(required=False,
verify_exists=False)
support_url = TransField.adapt(forms.URLField)(required=False)
support_email = TransField.adapt(forms.EmailField)(required=False)
class Meta:

Просмотреть файл

@ -318,8 +318,7 @@ class Addon(amo.models.OnChangeMixin, amo.models.ModelBase):
related_name='addons')
premium_type = models.PositiveIntegerField(
choices=amo.ADDON_PREMIUM_TYPES.items(), default=amo.ADDON_FREE)
manifest_url = models.URLField(max_length=255, blank=True, null=True,
verify_exists=False)
manifest_url = models.URLField(max_length=255, blank=True, null=True)
app_domain = models.CharField(max_length=255, blank=True, null=True,
db_index=True)
@ -2212,7 +2211,7 @@ class AppSupport(amo.models.ModelBase):
class Charity(amo.models.ModelBase):
name = models.CharField(max_length=255)
url = models.URLField(verify_exists=False)
url = models.URLField()
paypal = models.CharField(max_length=255)
class Meta:

Просмотреть файл

@ -591,7 +591,7 @@ class FeaturedCollection(amo.models.ModelBase):
class MonthlyPick(amo.models.ModelBase):
addon = models.ForeignKey(Addon)
blurb = models.TextField()
image = models.URLField(verify_exists=False)
image = models.URLField()
locale = models.CharField(max_length=10, unique=True, null=True,
blank=True)

Просмотреть файл

@ -38,7 +38,7 @@ class BlocklistDetail(amo.models.ModelBase):
name = models.CharField(max_length=255)
why = models.TextField()
who = models.TextField()
bug = models.URLField(verify_exists=False)
bug = models.URLField()
class Meta(amo.models.ModelBase.Meta):
db_table = 'bldetails'

Просмотреть файл

@ -289,7 +289,7 @@ def ProfileForm(*args, **kw):
class CharityForm(happyforms.ModelForm):
url = Charity._meta.get_field('url').formfield(verify_exists=False)
url = Charity._meta.get_field('url').formfield()
class Meta:
model = Charity
@ -673,10 +673,8 @@ class Step3Form(addons.forms.AddonFormBasic):
class Step3WebappForm(Step3Form):
"""Form to override certain fields for webapps"""
name = TransField(max_length=128)
homepage = TransField.adapt(forms.URLField)(required=False,
verify_exists=False)
support_url = TransField.adapt(forms.URLField)(required=False,
verify_exists=False)
homepage = TransField.adapt(forms.URLField)(required=False)
support_url = TransField.adapt(forms.URLField)(required=False)
support_email = TransField.adapt(forms.EmailField)(required=False)
@ -970,7 +968,7 @@ class CheckCompatibilityForm(happyforms.Form):
class NewManifestForm(happyforms.Form):
manifest = forms.URLField(verify_exists=False)
manifest = forms.URLField()
def clean_manifest(self):
manifest = self.cleaned_data['manifest']

Просмотреть файл

@ -81,7 +81,7 @@ models.signals.pre_save.connect(save_signal, sender=HubPromo,
class HubEvent(amo.models.ModelBase):
name = models.CharField(max_length=255, default='')
url = models.URLField(max_length=255, default='', verify_exists=False)
url = models.URLField(max_length=255, default='')
location = models.CharField(max_length=255, default='')
date = models.DateField(default=datetime.now)

Просмотреть файл

@ -112,8 +112,7 @@ class UserProfile(amo.models.OnChangeMixin, amo.models.ModelBase):
display_collections = models.BooleanField(default=False)
display_collections_fav = models.BooleanField(default=False)
emailhidden = models.BooleanField(default=True)
homepage = models.URLField(max_length=255, blank=True, default='',
verify_exists=False)
homepage = models.URLField(max_length=255, blank=True, default='')
location = models.CharField(max_length=255, blank=True, default='')
notes = models.TextField(blank=True, null=True)
notifycompat = models.BooleanField(default=True)

Просмотреть файл

@ -627,7 +627,7 @@ class License(amo.models.ModelBase):
OTHER = 0
name = TranslatedField(db_column='name')
url = models.URLField(null=True, verify_exists=False)
url = models.URLField(null=True)
builtin = models.PositiveIntegerField(default=OTHER)
text = LinkifiedField()
on_form = models.BooleanField(default=False,

Просмотреть файл

@ -291,8 +291,7 @@ class SiteEvent(models.Model):
db_index=True, default=0)
description = models.CharField(max_length=255, blank=True, null=True)
# An outbound link to an explanatory blog post or bug.
more_info_url = models.URLField(max_length=255, blank=True, null=True,
verify_exists=False)
more_info_url = models.URLField(max_length=255, blank=True, null=True)
class Meta:
db_table = ('zadmin_siteevent' +

Просмотреть файл

@ -389,7 +389,7 @@ PreviewFormSet = modelformset_factory(Preview, formset=BasePreviewFormSet,
class NewManifestForm(happyforms.Form):
manifest = forms.URLField(verify_exists=False)
manifest = forms.URLField()
def __init__(self, *args, **kwargs):
self.is_standalone = kwargs.pop('is_standalone', False)
@ -484,7 +484,7 @@ class NewPackagedAppForm(happyforms.Form):
class AppFormBasic(addons.forms.AddonFormBase):
"""Form to edit basic app info."""
slug = forms.CharField(max_length=30, widget=forms.TextInput)
manifest_url = forms.URLField(verify_exists=False)
manifest_url = forms.URLField()
description = TransField(required=True,
label=_lazy(u'Provide a detailed description of your app'),
help_text=_lazy(u'This description will appear on the details page.'),
@ -557,8 +557,7 @@ class AppFormBasic(addons.forms.AddonFormBase):
class AppFormDetails(addons.forms.AddonFormBase):
default_locale = forms.TypedChoiceField(required=False,
choices=Addon.LOCALES)
homepage = TransField.adapt(forms.URLField)(required=False,
verify_exists=False)
homepage = TransField.adapt(forms.URLField)(required=False)
privacy_policy = TransField(widget=TransTextarea(), required=True,
label=_lazy(u"Please specify your app's Privacy Policy"))
@ -622,8 +621,7 @@ class AppFormMedia(addons.forms.AddonFormBase):
class AppFormSupport(addons.forms.AddonFormBase):
support_url = TransField.adapt(forms.URLField)(required=False,
verify_exists=False)
support_url = TransField.adapt(forms.URLField)(required=False)
support_email = TransField.adapt(forms.EmailField)()
class Meta:

Просмотреть файл

@ -364,12 +364,12 @@ class AppDetailsBasicForm(TranslationFormMixin, happyforms.ModelForm):
"data is transmitted from a user's computer and how "
"it is used is required."))
homepage = TransField.adapt(forms.URLField)(required=False,
verify_exists=False, label=_lazy(u'Homepage:'),
label=_lazy(u'Homepage:'),
help_text=_lazy(u'If your app has another homepage, enter its address '
'here.'),
widget=TransInput(attrs={'class': 'full'}))
support_url = TransField.adapt(forms.URLField)(required=False,
verify_exists=False, label=_lazy(u'Support Website:'),
label=_lazy(u'Support Website:'),
help_text=_lazy(u'If your app has a support website or forum, enter '
'its address here.'),
widget=TransInput(attrs={'class': 'full'}))