Add type choices

This commit is contained in:
PCoder 2021-11-26 17:26:50 +05:30
parent 7953a80ddc
commit c28d46f9a1
1 changed files with 25 additions and 1 deletions

View File

@ -156,6 +156,30 @@ class Resource(models.Model):
("****", "****"),
("*****", "*****"),
)
TYPE_CHOICES = (
("" ,"" ),
("Atlas" ,"Atlas" ),
("Book" ,"Book" ),
("Book chapter" ,"Book chapter" ),
("Case study" ,"Case study" ),
("Conservation project","Conservation project"),
("Dataset" ,"Dataset" ),
("Development project" ,"Development project" ),
("Journal article" ,"Journal article" ),
("LTER" ,"LTER" ),
("Map" ,"Map" ),
("Network" ,"Network" ),
("PEGASuS" ,"PEGASuS" ),
("Presentation" ,"Presentation" ),
("Report" ,"Report" ),
("Research project" ,"Research project" ),
("Research Site" ,"Research Site" ),
("Thesis" ,"Thesis" ),
("Video" ,"Video" ),
("Website" ,"Website" ),
("Working Group" ,"Working Group" ),
)
id = models.AutoField(primary_key=True)
source_id = models.IntegerField(blank=True, null=True)
title = models.TextField(blank=True, null=True)
@ -163,7 +187,7 @@ class Resource(models.Model):
citation = models.TextField(blank=True, null=True)
abstract = models.TextField(blank=True, null=True)
type = models.TextField(blank=True, null=True)
type = models.TextField(blank=True, null=True, choices=TYPE_CHOICES)
author_keywords = models.TextField(blank=True, null=True)
lat = models.TextField(blank=True, null=True)
lon = models.TextField(blank=True, null=True)