From 5f692749900e8862ef28ad8d55518e6f56447487 Mon Sep 17 00:00:00 2001 From: through-your-tears Date: Sat, 6 Apr 2024 20:30:02 +0300 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D1=8B=20=D0=BC=D0=B8=D0=B3=D1=80=D0=B0=D1=86=D0=B8=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/activities/models.py | 18 +++++++++--------- src/organizations/models.py | 10 +++++----- 2 files changed, 14 insertions(+), 14 deletions(-) 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