nowy model
This commit is contained in:
parent
a40df66886
commit
fcf5db8bb8
Binary file not shown.
25
SocialHelper/homepage/migrations/0004_ocena.py
Normal file
25
SocialHelper/homepage/migrations/0004_ocena.py
Normal file
@ -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)),
|
||||
],
|
||||
),
|
||||
]
|
Binary file not shown.
@ -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="")
|
||||
|
Loading…
Reference in New Issue
Block a user