Link country to organization

This commit is contained in:
PCoder 2021-11-26 12:18:13 +05:30
parent d8eeb21b04
commit f4b2cbfe79
2 changed files with 20 additions and 1 deletions

View File

@ -0,0 +1,19 @@
# Generated by Django 3.2.5 on 2021-11-26 06:47
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('app', '0021_alter_range_checked'),
]
operations = [
migrations.AlterField(
model_name='organization',
name='country',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='app.country'),
),
]

View File

@ -329,7 +329,7 @@ class Organization(models.Model):
url = models.TextField(blank=True, null=True)
tel = models.TextField(blank=True, null=True)
email = models.TextField(blank=True, null=True)
country = models.TextField(blank=True, null=True)
country = models.ForeignKey(Country, models.DO_NOTHING, blank=True, null=True, to_field='id')
tags = models.TextField(blank=True, null=True)
description = models.TextField(blank=True, null=True)
northing = models.TextField(blank=True, null=True)