Make resource stars choices

This commit is contained in:
PCoder 2021-11-26 13:43:42 +05:30
parent 13feebafb3
commit b8a564d5f3
2 changed files with 28 additions and 1 deletions

View 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),
),
]

View file

@ -147,6 +147,15 @@ class Range(models.Model):
class Resource(models.Model):
STAR_CHOICES = (
("", ""),
("-", "-"),
("*", "*"),
("**", "**"),
("***", "***"),
("****", "****"),
("*****", "*****"),
)
id = models.AutoField(primary_key=True)
source_id = models.IntegerField(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)
lat = 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_polygon_ID = models.TextField(blank=True, null=True)
PEGASuS_Polygon_comments = models.TextField(blank=True, null=True)