From d012a2e3847074c023041fbc0f11f70cb2a39dc2 Mon Sep 17 00:00:00 2001 From: PCoder Date: Thu, 13 Jan 2022 10:35:42 +0530 Subject: [PATCH] Make range_alternate_id charfield and position it at the bottom --- app/admin.py | 5 ++++- app/models.py | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/app/admin.py b/app/admin.py index 3dedfa9..a090c5b 100644 --- a/app/admin.py +++ b/app/admin.py @@ -162,7 +162,7 @@ class RangeAdmin(admin.ModelAdmin): ('range_name_ascii', 'GMBA_v1_id'), ('latitude', 'longitude'), ('mother_range', 'wiki_data_id', 'wiki_data_url', 'area'), - ('feature', 'range_alternate_id'), + 'feature', 'source', 'id', ) @@ -181,6 +181,9 @@ class RangeAdmin(admin.ModelAdmin): ('Comments', { 'classes': ('collapse',), 'fields': ('comments',), + }), + ('Others', { + 'fields': ('range_alternate_id', ) }) ) list_display = ['range_name', 'mother_range', 'countries'] diff --git a/app/models.py b/app/models.py index 9f82dc3..466d4fb 100644 --- a/app/models.py +++ b/app/models.py @@ -113,7 +113,7 @@ class MountainRange(models.Model): comments = models.TextField(blank=True, null=True) checked = models.BooleanField(default=False) source = models.TextField(blank=True, null=True) - range_alternate_id = models.TextField(blank=True, null=True) + range_alternate_id = models.CharField(blank=True, null=True, max_length=128) geologic_region = models.TextField(blank=True, null=True) gmba_v2_id = models.PositiveIntegerField(blank=True, null=True) gmba_v2_id_str = models.TextField(blank=True, null=True)