From b40cc3c45823977960404f6f0eeba9c16595c1a0 Mon Sep 17 00:00:00 2001 From: Tanner Collin Date: Sat, 15 Sep 2018 23:29:59 -0600 Subject: [PATCH] Change domain and make fields optional --- authserver/authserver/api/models.py | 6 +++--- authserver/authserver/settings.py | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/authserver/authserver/api/models.py b/authserver/authserver/api/models.py index 997aa82..e24c27b 100644 --- a/authserver/authserver/api/models.py +++ b/authserver/authserver/api/models.py @@ -5,7 +5,7 @@ class Category(models.Model): name = models.CharField(max_length=32) slug = models.CharField(max_length=32, unique=True) info = models.TextField(max_length=1024, blank=True) - photo = models.ImageField() + photo = models.ImageField(blank=True) def __str__(self): return self.name @@ -16,7 +16,7 @@ class Tool(models.Model): slug = models.CharField(max_length=32, unique=True) info = models.TextField(max_length=1024, blank=True) wiki_id = models.IntegerField() - photo = models.ImageField() + photo = models.ImageField(blank=True) def __str__(self): return self.name @@ -24,7 +24,7 @@ class Tool(models.Model): class Profile(models.Model): user = models.OneToOneField(User, on_delete=models.CASCADE, editable=False) lockout_admin = models.BooleanField(default=False) - authorized_tools = models.ManyToManyField(Tool) + authorized_tools = models.ManyToManyField(Tool, blank=True) def __str__(self): return self.user.username diff --git a/authserver/authserver/settings.py b/authserver/authserver/settings.py index 2fa18eb..72a4585 100644 --- a/authserver/authserver/settings.py +++ b/authserver/authserver/settings.py @@ -80,6 +80,7 @@ TEMPLATES = [ WSGI_APPLICATION = 'authserver.wsgi.application' +ALLOWED_HOSTS = ['localhost', '127.0.0.1', '172.17.17.65', 'tools-auth.protospace.ca'] # Database # https://docs.djangoproject.com/en/2.1/ref/settings/#databases