Skip to content

Commit

Permalink
Update organization model
Browse files Browse the repository at this point in the history
  • Loading branch information
Zih0 committed Aug 15, 2021
1 parent b953bfb commit df79d1b
Showing 1 changed file with 5 additions and 15 deletions.
20 changes: 5 additions & 15 deletions server/models/organization_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@


class Image(models.Model):
url = models.URLField(max_length=200)
url = models.URLField(max_length=1000)

class Meta:
abstract = True
Expand All @@ -29,20 +29,6 @@ class Meta:
fields = ("sns", "name")


class Organization(models.Model):
_id = models.ObjectIdField()
name = models.CharField(max_length=100)
ceo = models.CharField(max_length=100)
description = models.TextField()
phone = models.CharField(max_length=100)
images = models.ArrayField(model_container=Image, model_form_class=ImageForm)
donation = models.CharField(max_length=100)
fax = models.CharField(max_length=100)
email = models.CharField(max_length=100)
sns = models.ArrayField(model_container=SNS, model_form_class=SNSForm)
objects = models.DjongoManager()


class AbstractOrganization(models.Model):
_id = models.ObjectIdField()
name = models.CharField(max_length=100)
Expand All @@ -59,6 +45,10 @@ class Meta:
abstract = True


class Organization(AbstractOrganization):
objects = models.DjongoManager()


class OrganizationForm(forms.ModelForm):
class Meta:
model = Organization
Expand Down

0 comments on commit df79d1b

Please sign in to comment.