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