first model in postgresql base
This commit is contained in:
BIN
work/__pycache__/admin.cpython-38.pyc
Normal file
BIN
work/__pycache__/admin.cpython-38.pyc
Normal file
Binary file not shown.
BIN
work/__pycache__/models.cpython-38.pyc
Normal file
BIN
work/__pycache__/models.cpython-38.pyc
Normal file
Binary file not shown.
22
work/migrations/0001_initial.py
Normal file
22
work/migrations/0001_initial.py
Normal file
@@ -0,0 +1,22 @@
|
||||
# Generated by Django 3.1.2 on 2020-11-13 11:22
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
initial = True
|
||||
|
||||
dependencies = [
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='HoursInput',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('hours_number', models.IntegerField()),
|
||||
('workplace', models.CharField(max_length=100)),
|
||||
],
|
||||
),
|
||||
]
|
||||
19
work/migrations/0002_hoursinput_date.py
Normal file
19
work/migrations/0002_hoursinput_date.py
Normal file
@@ -0,0 +1,19 @@
|
||||
# Generated by Django 3.1.2 on 2020-11-13 11:29
|
||||
|
||||
import datetime
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('work', '0001_initial'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='hoursinput',
|
||||
name='date',
|
||||
field=models.DateField(default=datetime.date.today),
|
||||
),
|
||||
]
|
||||
0
work/migrations/__init__.py
Normal file
0
work/migrations/__init__.py
Normal file
BIN
work/migrations/__pycache__/0001_initial.cpython-38.pyc
Normal file
BIN
work/migrations/__pycache__/0001_initial.cpython-38.pyc
Normal file
Binary file not shown.
BIN
work/migrations/__pycache__/0002_hoursinput_date.cpython-38.pyc
Normal file
BIN
work/migrations/__pycache__/0002_hoursinput_date.cpython-38.pyc
Normal file
Binary file not shown.
BIN
work/migrations/__pycache__/__init__.cpython-38.pyc
Normal file
BIN
work/migrations/__pycache__/__init__.cpython-38.pyc
Normal file
Binary file not shown.
@@ -8,8 +8,8 @@ import datetime
|
||||
# ('MS', 'Ms.'),
|
||||
# ]
|
||||
#
|
||||
# class HoursInput(models.Model):
|
||||
# date = models.DateField(default=datetime.date.today)
|
||||
# hours_number = models.IntegerField()
|
||||
# # workplace = models.CharField(required=True, max_length=100, choices=TITLE_CHOICES)
|
||||
#
|
||||
class HoursInput(models.Model):
|
||||
date = models.DateField(default=datetime.date.today)
|
||||
hours_number = models.IntegerField()
|
||||
workplace = models.CharField(max_length=100)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user