diff --git a/infoscreen/migrations/0008_auto_20220801_2213.py b/infoscreen/migrations/0008_auto_20220801_2213.py new file mode 100644 index 0000000..f1d3763 --- /dev/null +++ b/infoscreen/migrations/0008_auto_20220801_2213.py @@ -0,0 +1,28 @@ +# Generated by Django 3.2.14 on 2022-08-01 19:13 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ("infoscreen", "0007_lunchitem"), + ] + + operations = [ + migrations.AlterField( + model_name="infoinstance", + name="id", + field=models.AutoField(primary_key=True, serialize=False), + ), + migrations.AlterField( + model_name="infoitem", + name="id", + field=models.AutoField(primary_key=True, serialize=False), + ), + migrations.AlterField( + model_name="rotation", + name="id", + field=models.AutoField(primary_key=True, serialize=False), + ), + ] diff --git a/infoscreen/models.py b/infoscreen/models.py index 2610f23..d879fdc 100644 --- a/infoscreen/models.py +++ b/infoscreen/models.py @@ -16,6 +16,7 @@ class InfoItem(models.Model): class __meta__: abstract = True + id = models.AutoField(primary_key=True) name = models.CharField(max_length=255) # expire_date = None means never expiring item expire_date = models.DateTimeField(blank=True, null=True) @@ -316,6 +317,7 @@ class ExternalImageInfoItem(InfoItem): class InfoInstance(models.Model): """Class for Info instance in Infoscreen.""" + id = models.AutoField(primary_key=True) rotation = models.ForeignKey( "Rotation", related_name="instances", on_delete=models.CASCADE ) @@ -356,6 +358,7 @@ class InfoInstance(models.Model): class Rotation(models.Model): """Class for rotation model.""" + id = models.AutoField(primary_key=True) name = models.CharField(max_length=255) def get_dict(self): @@ -388,6 +391,7 @@ class Rotation(models.Model): class ImageUploadForm(forms.Form): """Form used to handle imageuploads to infoscreen app.""" + id = models.AutoField(primary_key=True) name = forms.CharField() image = forms.ImageField() @@ -395,5 +399,6 @@ class ImageUploadForm(forms.Form): class UploadFileForm(forms.Form): """Form used for uploading file.""" + id = models.AutoField(primary_key=True) name = forms.CharField() video = forms.FileField() diff --git a/infoscreen/templates/base.html b/infoscreen/templates/base.html index c4c3c70..c3569dd 100644 --- a/infoscreen/templates/base.html +++ b/infoscreen/templates/base.html @@ -1,6 +1,5 @@ {% load i18n %} {% load static %} -{% load staticfiles %} diff --git a/infoscreen/templates/infoscreen_admin.html b/infoscreen/templates/infoscreen_admin.html index 47d3258..4db11d0 100644 --- a/infoscreen/templates/infoscreen_admin.html +++ b/infoscreen/templates/infoscreen_admin.html @@ -2,7 +2,6 @@ {% load i18n %} {% load static %} -{% load staticfiles %} {% block appname %}infoAdmin{% endblock appname %} @@ -41,5 +40,5 @@ -{% include "webapp:footer.html" %} +{% include "footer.html" %} {% endblock body %} \ No newline at end of file diff --git a/kaehmy/migrations/0007_alter_commentparent_id.py b/kaehmy/migrations/0007_alter_commentparent_id.py new file mode 100644 index 0000000..bd7aca8 --- /dev/null +++ b/kaehmy/migrations/0007_alter_commentparent_id.py @@ -0,0 +1,18 @@ +# Generated by Django 3.2.14 on 2022-08-01 19:13 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ("kaehmy", "0006_delete_telegramchannel"), + ] + + operations = [ + migrations.AlterField( + model_name="commentparent", + name="id", + field=models.AutoField(primary_key=True, serialize=False), + ), + ] diff --git a/kaehmy/models.py b/kaehmy/models.py index 6582a63..a3a033a 100644 --- a/kaehmy/models.py +++ b/kaehmy/models.py @@ -56,6 +56,7 @@ class CustomRole(KaehmyBaseRole): class CommentParent(models.Model): + id = models.AutoField(primary_key=True) name = models.CharField(_("Name"), max_length=255, default="") email = models.EmailField(_("Email"), default="") timestamp = models.DateTimeField(_("Timestamp"), default=timezone.now) diff --git a/kaehmy/templates/footer.html b/kaehmy/templates/footer.html index 22b4d76..a081138 100644 --- a/kaehmy/templates/footer.html +++ b/kaehmy/templates/footer.html @@ -1,6 +1,5 @@ {% load i18n %} {% load static %} -{% load staticfiles %}