diff --git a/SocialHelper/homepage/__pycache__/models.cpython-37.pyc b/SocialHelper/homepage/__pycache__/models.cpython-37.pyc index 715bb21..c5c4a0e 100644 Binary files a/SocialHelper/homepage/__pycache__/models.cpython-37.pyc and b/SocialHelper/homepage/__pycache__/models.cpython-37.pyc differ diff --git a/SocialHelper/homepage/migrations/0004_ocena.py b/SocialHelper/homepage/migrations/0004_ocena.py new file mode 100644 index 0000000..7c702d6 --- /dev/null +++ b/SocialHelper/homepage/migrations/0004_ocena.py @@ -0,0 +1,25 @@ +# Generated by Django 3.1.4 on 2021-01-01 16:53 + +from django.conf import settings +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ('homepage', '0003_places'), + ] + + operations = [ + migrations.CreateModel( + name='Ocena', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('comm', models.TextField(default='', max_length=40)), + ('ocena_jedn', models.FloatField(default='', max_length=40)), + ('user_iden', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), + ], + ), + ] diff --git a/SocialHelper/homepage/migrations/__pycache__/0004_ocena.cpython-37.pyc b/SocialHelper/homepage/migrations/__pycache__/0004_ocena.cpython-37.pyc new file mode 100644 index 0000000..66eeff5 Binary files /dev/null and b/SocialHelper/homepage/migrations/__pycache__/0004_ocena.cpython-37.pyc differ diff --git a/SocialHelper/homepage/models.py b/SocialHelper/homepage/models.py index 3c4b7c9..2b7e3b6 100644 --- a/SocialHelper/homepage/models.py +++ b/SocialHelper/homepage/models.py @@ -29,3 +29,8 @@ class Product(models.Model): class Places(models.Model): city = models.TextField(max_length=40, blank=False, default="") woj_city = models.TextField(max_length=40, blank=False, default="") + +class Ocena(models.Model): + user_iden = models.ForeignKey(User, on_delete=models.CASCADE) + comm = models.TextField(max_length=40, blank=False, default="") + ocena_jedn = models.FloatField(max_length=40, blank=False, default="")