change foregin key to one to one field and add MUOR app to settings.

This commit is contained in:
prance 2022-01-27 22:49:57 +01:00
parent 4072c90e68
commit f87290b6b5
2 changed files with 4 additions and 2 deletions

View File

@ -9,7 +9,8 @@ class Profile(AbstractUser):
class Session(models.Model): class Session(models.Model):
user = models.ForeignKey(Profile, primary_key=True, on_delete=models.CASCADE) user = models.OneToOneField(Profile, primary_key=True,
on_delete=models.CASCADE)
port = models.PositiveIntegerField(null=False, unique=True) port = models.PositiveIntegerField(null=False, unique=True)
sessionid = models.CharField(max_length=32) sessionid = models.CharField(max_length=32)
container_id = models.CharField(max_length=64, null=True, blank=True) container_id = models.CharField(max_length=64, null=True, blank=True)

View File

@ -36,7 +36,8 @@ INSTALLED_APPS = [
'django.contrib.sessions', 'django.contrib.sessions',
'django.contrib.messages', 'django.contrib.messages',
'django.contrib.staticfiles', 'django.contrib.staticfiles',
'crispy_forms' 'crispy_forms',
'MUOR'
] ]
MIDDLEWARE = [ MIDDLEWARE = [