add a `description` column to `download_sources` table (bug 615405, bug 668456)
This commit is contained in:
Родитель
daa5c1dd44
Коммит
e08f27ad38
|
@ -306,6 +306,7 @@ class DownloadSource(models.Model):
|
|||
# e.g., `full` or `prefix`.
|
||||
type = models.CharField(max_length=255)
|
||||
|
||||
description = models.TextField()
|
||||
created = models.DateTimeField(auto_now_add=True)
|
||||
|
||||
class Meta:
|
||||
|
|
|
@ -7,7 +7,8 @@ from zadmin.models import DownloadSource
|
|||
class TestDownloadSource(TestCase):
|
||||
|
||||
def test_add(self):
|
||||
created = DownloadSource.objects.create(name='home', type='full')
|
||||
created = DownloadSource.objects.create(name='home', type='full',
|
||||
description='This is obviously for the homepage')
|
||||
d = DownloadSource.objects.filter(id=created.id)
|
||||
eq_(d.count(), 1)
|
||||
eq_(d[0].__unicode__(), 'home (full)')
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
alter table download_sources add column description mediumtext;
|
Загрузка…
Ссылка в новой задаче