mirror of
https://github.com/Steffo99/sophon.git
synced 2024-12-22 23:04:21 +00:00
🔧 Allow sources to be null
This commit is contained in:
parent
97400516e9
commit
1b14c76feb
2 changed files with 45 additions and 1 deletions
43
sophon/core/migrations/0002_auto_20210405_1641.py
Normal file
43
sophon/core/migrations/0002_auto_20210405_1641.py
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
# Generated by Django 3.1.7 on 2021-04-05 16:41
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('core', '0001_initial'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='datasource',
|
||||||
|
name='builtin',
|
||||||
|
field=models.BooleanField(help_text='Whether the source is builtin in PandaSDMX or not.', verbose_name='Builtin'),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='datasource',
|
||||||
|
name='pandasdmx_id',
|
||||||
|
field=models.CharField(help_text='Internal id used by PandaSDMX to reference the source.', max_length=16, primary_key=True, serialize=False, verbose_name='PandaSDMX id'),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='datasource',
|
||||||
|
name='settings',
|
||||||
|
field=models.JSONField(help_text='Info parameter to pass to pandasdmx.add_source if the source is not builtin (see https://pandasdmx.readthedocs.io/en/latest/api.html#pandasdmx.add_source).', null=True, verbose_name='Settings'),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='project',
|
||||||
|
name='description',
|
||||||
|
field=models.CharField(help_text='A brief description of the project, to be displayed inthe overview.', max_length=8192, verbose_name='Project description'),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='project',
|
||||||
|
name='name',
|
||||||
|
field=models.CharField(help_text='The display name of the project.', max_length=512, verbose_name='Project name'),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='project',
|
||||||
|
name='sources',
|
||||||
|
field=models.ManyToManyField(help_text='The sources used by this project.', null=True, related_name='used_in', to='core.DataSource'),
|
||||||
|
),
|
||||||
|
]
|
|
@ -55,7 +55,8 @@ class Project(models.Model):
|
||||||
sources = models.ManyToManyField(
|
sources = models.ManyToManyField(
|
||||||
DataSource,
|
DataSource,
|
||||||
help_text="The sources used by this project.",
|
help_text="The sources used by this project.",
|
||||||
related_name="used_in"
|
related_name="used_in",
|
||||||
|
null=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
|
|
Loading…
Reference in a new issue