mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-20 15:02:31 +00:00
Updates to person model. Removed comments for now in favour of a simple notes section that can be easily modified as a text field. Will look at introducing this again in the future.
This commit is contained in:
41
RIGS/migrations/0002_modelcomment_person.py
Normal file
41
RIGS/migrations/0002_modelcomment_person.py
Normal file
@@ -0,0 +1,41 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import models, migrations
|
||||
from django.conf import settings
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('RIGS', '0001_initial'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='ModelComment',
|
||||
fields=[
|
||||
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
||||
('postedAt', models.DateTimeField(auto_now=True)),
|
||||
('message', models.TextField()),
|
||||
('user', models.ForeignKey(to=settings.AUTH_USER_MODEL)),
|
||||
],
|
||||
options={
|
||||
},
|
||||
bases=(models.Model,),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='Person',
|
||||
fields=[
|
||||
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
||||
('name', models.CharField(max_length=50)),
|
||||
('phone', models.CharField(max_length=15, null=True, blank=True)),
|
||||
('email', models.EmailField(max_length=75, null=True, blank=True)),
|
||||
('address', models.TextField(null=True, blank=True)),
|
||||
('comments', models.ManyToManyField(to='RIGS.ModelComment')),
|
||||
],
|
||||
options={
|
||||
},
|
||||
bases=(models.Model,),
|
||||
),
|
||||
]
|
||||
31
RIGS/migrations/0003_auto_20141031_0219.py
Normal file
31
RIGS/migrations/0003_auto_20141031_0219.py
Normal file
@@ -0,0 +1,31 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import models, migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('RIGS', '0002_modelcomment_person'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RemoveField(
|
||||
model_name='modelcomment',
|
||||
name='user',
|
||||
),
|
||||
migrations.RemoveField(
|
||||
model_name='person',
|
||||
name='comments',
|
||||
),
|
||||
migrations.DeleteModel(
|
||||
name='ModelComment',
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='person',
|
||||
name='notes',
|
||||
field=models.TextField(null=True, blank=True),
|
||||
preserve_default=True,
|
||||
),
|
||||
]
|
||||
Reference in New Issue
Block a user