let these fields be blank, better display for addons

This commit is contained in:
Jeff Balogh 2010-01-01 16:24:00 -05:00
Родитель e71c78456e
Коммит 8ecbb7c0c8
1 изменённых файлов: 8 добавлений и 5 удалений

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

@ -36,7 +36,7 @@ class Addon(amo.ModelBase):
status = models.PositiveIntegerField(choices=STATUS_CHOICES, db_index=True)
higheststatus = models.PositiveIntegerField(choices=STATUS_CHOICES,
help_text="An upper limit for what an author can change.")
icontype = models.CharField(max_length=25)
icontype = models.CharField(max_length=25, blank=True)
homepage = TranslatedField()
supportemail = TranslatedField()
supporturl = TranslatedField()
@ -78,19 +78,22 @@ class Addon(amo.ModelBase):
locale_disambiguation = models.CharField(max_length=255, blank=True,
help_text="For dictionaries and language packs")
paypal_id = models.CharField(max_length=255)
suggested_amount = models.CharField(max_length=255,
paypal_id = models.CharField(max_length=255, blank=True)
suggested_amount = models.CharField(max_length=255, blank=True,
help_text="Requested donation amount.")
annoying = models.PositiveIntegerField(choices=STATUS_CHOICES, default=0)
get_satisfaction_company = models.CharField(max_length=255)
get_satisfaction_product = models.CharField(max_length=255)
get_satisfaction_company = models.CharField(max_length=255, blank=True)
get_satisfaction_product = models.CharField(max_length=255, blank=True)
users = models.ManyToManyField('users.User')
class Meta:
db_table = 'addons'
def __unicode__(self):
return '%s: %s' % (self.id, self.name)
def get_absolute_url(self):
# XXX: use reverse
return '/addon/%s' % self.id