I am working on a simple web mapping app using Django framework, and I am trying to add a geometric field where to insert polygon geometry's coordinates instead of drawing it manually (these coordinates will be stored in a PostgreSQL database under the column geometry). How to make geom field a coordinates insertion field?
Here is my model class:
from __future__ import unicode_literals
from django.db import models
from django.contrib.gis.db import models as gis_models
from django.db.models import Manager as GeoManager
from django.contrib.gis.geos import Polygon
class projets(models.Model):
titre = models.CharField(max_length=15)
avancement = models.CharField(max_length=50,null=True,blank=True)
geom = gis_models.MultiPolygonField(srid=4326,null=True,blank=True)
class Meta:
verbose_name_plural ="Projets"