Migration in progress
This commit is contained in:
parent
cfea61b5af
commit
41667dbea3
2 changed files with 210 additions and 2 deletions
22
app/admin.py
22
app/admin.py
|
@ -63,6 +63,22 @@ class TrendsQualityAdmin(admin.ModelAdmin):
|
||||||
search_fields = ['trend']
|
search_fields = ['trend']
|
||||||
|
|
||||||
|
|
||||||
|
class RepositoryAdmin(admin.ModelAdmin):
|
||||||
|
search_fields = ['repository_name', 'repository_url']
|
||||||
|
|
||||||
|
|
||||||
|
class GMBAFunctionAdmin(admin.ModelAdmin):
|
||||||
|
search_fields = ['gmba_function']
|
||||||
|
|
||||||
|
|
||||||
|
class OrganizationAdmin(admin.ModelAdmin):
|
||||||
|
search_fields = ['organisation_search', 'org_alpjha_search', 'organization_2', 'organization_3', 'subject']
|
||||||
|
|
||||||
|
|
||||||
|
class RangeOnlineInfoAdmin(admin.ModelAdmin):
|
||||||
|
search_fields = ['info_source']
|
||||||
|
|
||||||
|
|
||||||
# Register your models here.
|
# Register your models here.
|
||||||
admin.site.register(Person, PersonAdmin)
|
admin.site.register(Person, PersonAdmin)
|
||||||
admin.site.register(Resource, ResourceAdmin)
|
admin.site.register(Resource, ResourceAdmin)
|
||||||
|
@ -84,4 +100,8 @@ admin.site.register(Source, SourceAdmin)
|
||||||
admin.site.register(TaxonStatus, TaxonStatusAdmin)
|
admin.site.register(TaxonStatus, TaxonStatusAdmin)
|
||||||
admin.site.register(TaxonUnit, TaxonUnitAdmin)
|
admin.site.register(TaxonUnit, TaxonUnitAdmin)
|
||||||
admin.site.register(TrendsQuality, TrendsQualityAdmin)
|
admin.site.register(TrendsQuality, TrendsQualityAdmin)
|
||||||
admin.site.register(TrendsQuantity, TrendsQuantityAdmin)
|
admin.site.register(TrendsQuantity, TrendsQuantityAdmin)
|
||||||
|
admin.site.register(Repository, RepositoryAdmin)
|
||||||
|
admin.site.register(GMBA_function, GMBAFunctionAdmin)
|
||||||
|
admin.site.register(Organization, OrganizationAdmin)
|
||||||
|
admin.site.register(RangeOnlineInfo, RangeOnlineInfoAdmin)
|
||||||
|
|
190
app/models.py
190
app/models.py
|
@ -109,6 +109,54 @@ class Range(models.Model):
|
||||||
name = models.TextField(blank=True, null=True)
|
name = models.TextField(blank=True, null=True)
|
||||||
countries = models.TextField(blank=True, null=True)
|
countries = models.TextField(blank=True, null=True)
|
||||||
|
|
||||||
|
range_name_map = models.TextField(blank=True, null=True)
|
||||||
|
range_name = models.TextField(blank=True, null=True)
|
||||||
|
range_name_ascii = models.TextField(blank=True, null=True)
|
||||||
|
range_name_language = models.TextField(blank=True, null=True)
|
||||||
|
mother_range = models.TextField(blank=True, null=True)
|
||||||
|
feature = models.TextField(blank=True, null=True)
|
||||||
|
map_unit = models.TextField(blank=True, null=True)
|
||||||
|
level = models.TextField(blank=True, null=True)
|
||||||
|
level_text = models.TextField(blank=True, null=True)
|
||||||
|
level_1 = models.TextField(blank=True, null=True)
|
||||||
|
level_2 = models.TextField(blank=True, null=True)
|
||||||
|
level_3 = models.TextField(blank=True, null=True)
|
||||||
|
latitude = models.TextField(blank=True, null=True)
|
||||||
|
longitude = models.TextField(blank=True, null=True)
|
||||||
|
orogeny = models.TextField(blank=True, null=True)
|
||||||
|
area = models.TextField(blank=True, null=True)
|
||||||
|
GMBA_v1_id = models.TextField(blank=True, null=True)
|
||||||
|
peak_elevation = models.TextField(blank=True, null=True)
|
||||||
|
peak_name = models.TextField(blank=True, null=True)
|
||||||
|
peak_latitude = models.TextField(blank=True, null=True)
|
||||||
|
peak_longitude = models.TextField(blank=True, null=True)
|
||||||
|
comments = models.TextField(blank=True, null=True)
|
||||||
|
checked = models.TextField(blank=True, null=True)
|
||||||
|
source = models.TextField(blank=True, null=True)
|
||||||
|
range_alternate_id = models.TextField(blank=True, null=True)
|
||||||
|
geologic_region = models.TextField(blank=True, null=True)
|
||||||
|
gmba_v2_id = models.TextField(blank=True, null=True)
|
||||||
|
gmba_v2_id_str = models.TextField(blank=True, null=True)
|
||||||
|
wiki_data_id = models.TextField(blank=True, null=True)
|
||||||
|
wiki_data_url = models.TextField(blank=True, null=True)
|
||||||
|
select_300 = models.TextField(blank=True, null=True)
|
||||||
|
gmba_narrow = models.TextField(blank=True, null=True)
|
||||||
|
name_fr = models.TextField(blank=True, null=True)
|
||||||
|
name_de = models.TextField(blank=True, null=True)
|
||||||
|
name_es = models.TextField(blank=True, null=True)
|
||||||
|
name_pt = models.TextField(blank=True, null=True)
|
||||||
|
name_cn = models.TextField(blank=True, null=True)
|
||||||
|
name_ru = models.TextField(blank=True, null=True)
|
||||||
|
name_tr = models.TextField(blank=True, null=True)
|
||||||
|
perimeter = models.TextField(blank=True, null=True)
|
||||||
|
color_all = models.TextField(blank=True, null=True)
|
||||||
|
color_basic = models.TextField(blank=True, null=True)
|
||||||
|
color_300 = models.TextField(blank=True, null=True)
|
||||||
|
elev_low = models.TextField(blank=True, null=True)
|
||||||
|
elev_high = models.TextField(blank=True, null=True)
|
||||||
|
elev_range = models.TextField(blank=True, null=True)
|
||||||
|
elev_avg = models.TextField(blank=True, null=True)
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
db_table = 'range'
|
db_table = 'range'
|
||||||
|
|
||||||
|
@ -141,6 +189,26 @@ class Resource(models.Model):
|
||||||
citation = models.TextField(blank=True, null=True)
|
citation = models.TextField(blank=True, null=True)
|
||||||
abstract = models.TextField(blank=True, null=True)
|
abstract = models.TextField(blank=True, null=True)
|
||||||
|
|
||||||
|
citation = models.TextField(blank=True, null=True)
|
||||||
|
type = models.TextField(blank=True, null=True)
|
||||||
|
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)
|
||||||
|
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)
|
||||||
|
PEGASuS_Assessment_ID = models.TextField(blank=True, null=True)
|
||||||
|
gloria = models.TextField(blank=True, null=True)
|
||||||
|
gnomo = models.TextField(blank=True, null=True)
|
||||||
|
lter = models.TextField(blank=True, null=True)
|
||||||
|
ltser = models.TextField(blank=True, null=True)
|
||||||
|
miren = models.TextField(blank=True, null=True)
|
||||||
|
team = models.TextField(blank=True, null=True)
|
||||||
|
inventory = models.TextField(blank=True, null=True)
|
||||||
|
doi = models.TextField(blank=True, null=True)
|
||||||
|
WikiDataID = models.TextField(blank=True, null=True)
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
db_table = 'resource'
|
db_table = 'resource'
|
||||||
|
|
||||||
|
@ -276,4 +344,124 @@ class Language(models.Model):
|
||||||
|
|
||||||
class Source(models.Model):
|
class Source(models.Model):
|
||||||
id = models.AutoField(primary_key=True)
|
id = models.AutoField(primary_key=True)
|
||||||
source = models.TextField(blank=True, null=True)
|
source = models.TextField(blank=True, null=True)
|
||||||
|
|
||||||
|
|
||||||
|
class Repository(models.Model):
|
||||||
|
id = models.AutoField(primary_key=True)
|
||||||
|
repository_name = models.TextField(blank=True, null=True)
|
||||||
|
repository_url = models.TextField(blank=True, null=True)
|
||||||
|
|
||||||
|
|
||||||
|
class GMBA_function(models.Model):
|
||||||
|
id = models.AutoField(primary_key=True)
|
||||||
|
gmba_function = models.TextField(blank=True, null=True)
|
||||||
|
|
||||||
|
|
||||||
|
class Organization(models.Model):
|
||||||
|
org_num1 = models.AutoField(primary_key=True)
|
||||||
|
organisation_search = models.TextField(blank=True, null=True)
|
||||||
|
org_alpha_search = models.TextField(blank=True, null=True)
|
||||||
|
organisation_english = models.TextField(blank=True, null=True)
|
||||||
|
organisation_2 = models.TextField(blank=True, null=True)
|
||||||
|
organisation_3 = models.TextField(blank=True, null=True)
|
||||||
|
organisation_original = models.TextField(blank=True, null=True)
|
||||||
|
acronym = models.TextField(blank=True, null=True)
|
||||||
|
street = models.TextField(blank=True, null=True)
|
||||||
|
po_box = models.TextField(blank=True, null=True)
|
||||||
|
postcode = models.TextField(blank=True, null=True)
|
||||||
|
city = models.TextField(blank=True, null=True)
|
||||||
|
region = models.TextField(blank=True, null=True)
|
||||||
|
search_url = models.TextField(blank=True, null=True)
|
||||||
|
lat_long = models.TextField(blank=True, null=True)
|
||||||
|
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)
|
||||||
|
tags = models.TextField(blank=True, null=True)
|
||||||
|
description = models.TextField(blank=True, null=True)
|
||||||
|
northing = models.TextField(blank=True, null=True)
|
||||||
|
easting = models.TextField(blank=True, null=True)
|
||||||
|
category = models.TextField(blank=True, null=True)
|
||||||
|
subject = models.TextField(blank=True, null=True)
|
||||||
|
|
||||||
|
|
||||||
|
class RangeOnlineInfo(models.Model):
|
||||||
|
id = models.AutoField(primary_key=True)
|
||||||
|
range_name = models.ForeignKey(Range, models.DO_NOTHING, blank=True, null=True, to_field='range_name_map')
|
||||||
|
info_source = models.TextField(blank=True, null=True)
|
||||||
|
url = models.TextField(blank=True, null=True)
|
||||||
|
|
||||||
|
|
||||||
|
class RangeNameTranslation(models.Model):
|
||||||
|
id = models.AutoField(primary_key=True)
|
||||||
|
range_name = models.ForeignKey(Range, models.DO_NOTHING, blank=True, null=True)
|
||||||
|
language_translation = models.ForeignKey(Language, models.DO_NOTHING, blank=True, null=True)
|
||||||
|
range_name_translation = models.TextField(blank=True, null=True)
|
||||||
|
|
||||||
|
|
||||||
|
class AddElevation(models.Model):
|
||||||
|
id = models.AutoField(primary_key=True)
|
||||||
|
gmba_v2_id = models.ForeignKey(Range, models.DO_NOTHING, blank=True, null=True, to_field='gmba_v2_id')
|
||||||
|
elev_min = models.TextField(blank=True, null=True)
|
||||||
|
elev_max = models.TextField(blank=True, null=True)
|
||||||
|
elev_range = models.TextField(blank=True, null=True)
|
||||||
|
|
||||||
|
|
||||||
|
class GMBA_V2_Centroid(models.Model):
|
||||||
|
id = models.AutoField(primary_key=True)
|
||||||
|
gridcode = models.TextField(blank=True, null=True)
|
||||||
|
area = models.TextField(blank=True, null=True)
|
||||||
|
latitude = models.TextField(blank=True, null=True)
|
||||||
|
longitude = models.TextField(blank=True, null=True)
|
||||||
|
|
||||||
|
|
||||||
|
class ImportGeom210915(models.Model):
|
||||||
|
id = models.AutoField(primary_key=True)
|
||||||
|
gmba_v2_id = models.ForeignKey(Range, models.DO_NOTHING, blank=True, null=True, to_field='gmba_v2_id')
|
||||||
|
area = models.TextField(blank=True, null=True)
|
||||||
|
perimeter = models.TextField(blank=True, null=True)
|
||||||
|
color_all = models.TextField(blank=True, null=True)
|
||||||
|
color_basic = models.TextField(blank=True, null=True)
|
||||||
|
|
||||||
|
|
||||||
|
class Keyword(models.Model):
|
||||||
|
keyword_id = models.AutoField(primary_key=True)
|
||||||
|
mother = models.TextField(blank=True, null=True)
|
||||||
|
keyword = models.TextField(blank=True, null=True)
|
||||||
|
|
||||||
|
|
||||||
|
class ResourceKeyword(models.Model):
|
||||||
|
id = models.AutoField(primary_key=True)
|
||||||
|
resource = models.ForeignKey(Resource, models.DO_NOTHING, blank=True, null=True)
|
||||||
|
keyword = models.ForeignKey(Keyword, models.DO_NOTHING, blank=True, null=True, to_field='keyword_id')
|
||||||
|
|
||||||
|
|
||||||
|
class NamesImport(models.Model):
|
||||||
|
id = models.AutoField(primary_key=True)
|
||||||
|
gmba_v2_id = models.ForeignKey(Range, models.DO_NOTHING, blank=True, null=True, to_field='gmba_v2_id')
|
||||||
|
cn = models.TextField(blank=True, null=True)
|
||||||
|
de = models.TextField(blank=True, null=True)
|
||||||
|
es = models.TextField(blank=True, null=True)
|
||||||
|
fr = models.TextField(blank=True, null=True)
|
||||||
|
pt = models.TextField(blank=True, null=True)
|
||||||
|
ru = models.TextField(blank=True, null=True)
|
||||||
|
tr = models.TextField(blank=True, null=True)
|
||||||
|
|
||||||
|
|
||||||
|
class ResourceRange(models.Model):
|
||||||
|
id = models.AutoField(primary_key=True)
|
||||||
|
resource_title = models.ForeignKey(Range, models.DO_NOTHING, blank=True, null=True)
|
||||||
|
range_name = models.ForeignKey(Range, models.DO_NOTHING, blank=True, null=True)
|
||||||
|
|
||||||
|
|
||||||
|
class LanguageLink(models.Model):
|
||||||
|
id = models.AutoField(primary_key=True)
|
||||||
|
language_number_code = models.ForeignKey(Language, models.DO_NOTHING, blank=True, null=True)
|
||||||
|
language_letter_code = models.TextField(blank=True, null=True)
|
||||||
|
|
||||||
|
|
||||||
|
class ImportGeom210915(models.Model):
|
||||||
|
id = models.AutoField(primary_key=True)
|
||||||
|
gmba_v2_id = models.ForeignKey(Range, models.DO_NOTHING, blank=True, null=True, to_field='gmba_v2_id')
|
||||||
|
area = models.TextField(blank=True, null=True)
|
Loading…
Reference in a new issue