Add mother_range dependency

This commit is contained in:
PCoder 2021-11-25 11:05:12 +05:30
parent 3e73ae9d34
commit dd62f6a38c
2 changed files with 20 additions and 1 deletions

View file

@ -0,0 +1,19 @@
# Generated by Django 3.2.5 on 2021-11-25 05:34
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('app', '0019_auto_20211125_0509'),
]
operations = [
migrations.AlterField(
model_name='range',
name='mother_range',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='app.range'),
),
]

View file

@ -79,7 +79,7 @@ class Range(models.Model):
range_name = models.TextField(blank=True, null=True)
range_name_ascii = models.TextField(blank=True, null=True)
range_name_language = models.ForeignKey(Language, models.DO_NOTHING, blank=True, null=True, to_field='id')
mother_range = models.TextField(blank=True, null=True)
mother_range = models.ForeignKey("self", models.DO_NOTHING, blank=True, null=True, to_field='id')
feature = models.TextField(blank=True, null=True) # TODO needs to be a drop down
map_unit = models.TextField(blank=True, null=True)
level = models.TextField(blank=True, null=True)