Revert "Autocomplete from GIS list of CRSs.."
This reverts commit dce53630f7
.
This commit is contained in:
@ -1,32 +1,17 @@
|
||||
import datetime
|
||||
from urllib import parse
|
||||
|
||||
from django.contrib.gis.db import models
|
||||
from django.contrib.auth.models import User
|
||||
from django.db import connection
|
||||
from django.utils.translation import ugettext as _
|
||||
from django.template.defaultfilters import slugify
|
||||
|
||||
from django_extensions.db.fields import AutoSlugField
|
||||
from django_countries.fields import CountryField
|
||||
from django.utils.translation import ugettext as _
|
||||
from django.template.defaultfilters import slugify
|
||||
from multiselectfield import MultiSelectField
|
||||
from phonenumber_field.modelfields import PhoneNumberField
|
||||
|
||||
from . import validators
|
||||
|
||||
|
||||
class SpatialRefSys(connection.ops.spatial_ref_sys()):
|
||||
def __str__(self):
|
||||
return self.__unicode__()
|
||||
|
||||
def __unicode__(self):
|
||||
return '{0.auth_name}:{0.auth_srid} {0.name}'.format(self)
|
||||
|
||||
class Meta:
|
||||
proxy = True
|
||||
verbose_name = "spatial reference system"
|
||||
|
||||
|
||||
class Shapefile(models.Model):
|
||||
file = models.FileField(
|
||||
upload_to='shapefiles/',
|
||||
@ -1022,9 +1007,13 @@ class CaseStudy(models.Model):
|
||||
)
|
||||
|
||||
# 4.3.2
|
||||
coordinate_reference_system = models.ForeignKey(
|
||||
SpatialRefSys, null=True, blank=True,
|
||||
default=4326
|
||||
coordinate_reference_system = models.CharField(
|
||||
verbose_name=_("Coordinate reference system"),
|
||||
help_text=_("Enter the coordinate reference system of the shapefiles."),
|
||||
max_length=12,
|
||||
default=None,
|
||||
null=True,
|
||||
blank=True
|
||||
)
|
||||
|
||||
# 4.3.3
|
||||
|
Reference in New Issue
Block a user