Change domain and make fields optional
This commit is contained in:
parent
8c6a4dcbe6
commit
b40cc3c458
|
@ -5,7 +5,7 @@ class Category(models.Model):
|
||||||
name = models.CharField(max_length=32)
|
name = models.CharField(max_length=32)
|
||||||
slug = models.CharField(max_length=32, unique=True)
|
slug = models.CharField(max_length=32, unique=True)
|
||||||
info = models.TextField(max_length=1024, blank=True)
|
info = models.TextField(max_length=1024, blank=True)
|
||||||
photo = models.ImageField()
|
photo = models.ImageField(blank=True)
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return self.name
|
return self.name
|
||||||
|
@ -16,7 +16,7 @@ class Tool(models.Model):
|
||||||
slug = models.CharField(max_length=32, unique=True)
|
slug = models.CharField(max_length=32, unique=True)
|
||||||
info = models.TextField(max_length=1024, blank=True)
|
info = models.TextField(max_length=1024, blank=True)
|
||||||
wiki_id = models.IntegerField()
|
wiki_id = models.IntegerField()
|
||||||
photo = models.ImageField()
|
photo = models.ImageField(blank=True)
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return self.name
|
return self.name
|
||||||
|
@ -24,7 +24,7 @@ class Tool(models.Model):
|
||||||
class Profile(models.Model):
|
class Profile(models.Model):
|
||||||
user = models.OneToOneField(User, on_delete=models.CASCADE, editable=False)
|
user = models.OneToOneField(User, on_delete=models.CASCADE, editable=False)
|
||||||
lockout_admin = models.BooleanField(default=False)
|
lockout_admin = models.BooleanField(default=False)
|
||||||
authorized_tools = models.ManyToManyField(Tool)
|
authorized_tools = models.ManyToManyField(Tool, blank=True)
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return self.user.username
|
return self.user.username
|
||||||
|
|
|
@ -80,6 +80,7 @@ TEMPLATES = [
|
||||||
|
|
||||||
WSGI_APPLICATION = 'authserver.wsgi.application'
|
WSGI_APPLICATION = 'authserver.wsgi.application'
|
||||||
|
|
||||||
|
ALLOWED_HOSTS = ['localhost', '127.0.0.1', '172.17.17.65', 'tools-auth.protospace.ca']
|
||||||
|
|
||||||
# Database
|
# Database
|
||||||
# https://docs.djangoproject.com/en/2.1/ref/settings/#databases
|
# https://docs.djangoproject.com/en/2.1/ref/settings/#databases
|
||||||
|
|
Loading…
Reference in New Issue
Block a user