add index view; add Project and Issue models
This commit is contained in:
parent
6c43c8b360
commit
9d77a7d232
7 changed files with 78 additions and 6 deletions
39
issues/migrations/0001_initial.py
Normal file
39
issues/migrations/0001_initial.py
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
# Generated by Django 2.1.7 on 2019-03-20 22:34
|
||||
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
import django.utils.timezone
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
initial = True
|
||||
|
||||
dependencies = [
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='Issue',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('title', models.CharField(max_length=200)),
|
||||
('text', models.TextField(blank=True)),
|
||||
('create_date', models.DateTimeField(default=django.utils.timezone.now)),
|
||||
],
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='Project',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('project_key', models.CharField(max_length=16, unique=True)),
|
||||
('name', models.CharField(max_length=200)),
|
||||
('description', models.TextField(blank=True)),
|
||||
],
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='issue',
|
||||
name='project',
|
||||
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='issues.Project'),
|
||||
),
|
||||
]
|
||||
Reference in a new issue