Make resource stars choices
This commit is contained in:
parent
13feebafb3
commit
b8a564d5f3
2 changed files with 28 additions and 1 deletions
18
app/migrations/0024_alter_resource_stars.py
Normal file
18
app/migrations/0024_alter_resource_stars.py
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
# Generated by Django 3.2.5 on 2021-11-26 08:12
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('app', '0023_alter_range_feature'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='resource',
|
||||||
|
name='stars',
|
||||||
|
field=models.TextField(blank=True, choices=[('', ''), ('-', '-'), ('*', '*'), ('**', '**'), ('***', '***'), ('****', '****'), ('*****', '*****')], null=True),
|
||||||
|
),
|
||||||
|
]
|
|
@ -147,6 +147,15 @@ class Range(models.Model):
|
||||||
|
|
||||||
|
|
||||||
class Resource(models.Model):
|
class Resource(models.Model):
|
||||||
|
STAR_CHOICES = (
|
||||||
|
("", ""),
|
||||||
|
("-", "-"),
|
||||||
|
("*", "*"),
|
||||||
|
("**", "**"),
|
||||||
|
("***", "***"),
|
||||||
|
("****", "****"),
|
||||||
|
("*****", "*****"),
|
||||||
|
)
|
||||||
id = models.AutoField(primary_key=True)
|
id = models.AutoField(primary_key=True)
|
||||||
source_id = models.IntegerField(blank=True, null=True)
|
source_id = models.IntegerField(blank=True, null=True)
|
||||||
title = models.TextField(blank=True, null=True)
|
title = models.TextField(blank=True, null=True)
|
||||||
|
@ -158,7 +167,7 @@ class Resource(models.Model):
|
||||||
author_keywords = models.TextField(blank=True, null=True)
|
author_keywords = models.TextField(blank=True, null=True)
|
||||||
lat = models.TextField(blank=True, null=True)
|
lat = models.TextField(blank=True, null=True)
|
||||||
lon = models.TextField(blank=True, null=True)
|
lon = models.TextField(blank=True, null=True)
|
||||||
stars = models.TextField(blank=True, null=True)
|
stars = models.TextField(blank=True, null=True, choices=STAR_CHOICES)
|
||||||
PEGASuS_Check_map_with_author = models.TextField(blank=True, null=True)
|
PEGASuS_Check_map_with_author = models.TextField(blank=True, null=True)
|
||||||
PEGASuS_polygon_ID = models.TextField(blank=True, null=True)
|
PEGASuS_polygon_ID = models.TextField(blank=True, null=True)
|
||||||
PEGASuS_Polygon_comments = models.TextField(blank=True, null=True)
|
PEGASuS_Polygon_comments = models.TextField(blank=True, null=True)
|
||||||
|
|
Loading…
Reference in a new issue