mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-31 04:12:15 +00:00
Several changes to models
Add __str__ methods with unicode compatibility. Make trainer fields optional as they should be. Include these migrations and apply to DB. Install some test data in the DB.
This commit is contained in:
30
training/migrations/0002_required_fields.py
Normal file
30
training/migrations/0002_required_fields.py
Normal file
@@ -0,0 +1,30 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import models, migrations
|
||||
from django.conf import settings
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('training', '0001_initial'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='trainingrecord',
|
||||
name='assessed_trainer',
|
||||
field=models.ForeignKey(related_name='trainingrecords_assessed', blank=True, to=settings.AUTH_USER_MODEL, null=True),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='trainingrecord',
|
||||
name='completed_trainer',
|
||||
field=models.ForeignKey(related_name='trainingrecords_completed', blank=True, to=settings.AUTH_USER_MODEL, null=True),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='trainingrecord',
|
||||
name='started_trainer',
|
||||
field=models.ForeignKey(related_name='trainingrecords_started', blank=True, to=settings.AUTH_USER_MODEL, null=True),
|
||||
),
|
||||
]
|
||||
Reference in New Issue
Block a user