diff --git a/src/activities/models.py b/src/activities/models.py index a650572..ec9f01a 100644 --- a/src/activities/models.py +++ b/src/activities/models.py @@ -14,12 +14,12 @@ class FavouriteOrganization(models.Model): user = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.CASCADE) -# class Test(models.Model): -# title = models.CharField(max_length=64) -# image = models.ImageField(upload_to='images/tests/') -# -# -# class Bonus(models.Model): -# user = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.CASCADE) -# amount = models.IntegerField() -# descr = models.TextField() +class Test(models.Model): + title = models.CharField(max_length=64) + image = models.ImageField(upload_to='images/tests/') + + +class Bonus(models.Model): + user = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.CASCADE) + amount = models.IntegerField() + descr = models.TextField() diff --git a/src/organizations/models.py b/src/organizations/models.py index 3db6288..a3265e4 100644 --- a/src/organizations/models.py +++ b/src/organizations/models.py @@ -31,12 +31,12 @@ class Category(models.Model): class Organization(models.Model): location = models.ForeignKey(Location, on_delete=models.SET_NULL, null=True) - name = models.CharField(max_length=256) - phone = models.CharField(max_length=20) + name = models.CharField(max_length=256, blank=True) + phone = models.CharField(max_length=20, blank=True) category = models.ForeignKey(Category, on_delete=models.SET_NULL, null=True, default=None) - website = models.URLField() - description = models.TextField() - owner = models.ForeignKey('jwtauth.CustomUser', on_delete=models.SET_NULL, null=True) + website = models.URLField(blank=True) + description = models.TextField(blank=True) + owner = models.ForeignKey('jwtauth.CustomUser', on_delete=models.SET_NULL, null=True, blank=True) def __str__(self): return self.name