1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
|
from django.conf import settings
from django.db import models
from django.db.models import JSONField
class NonAsciiRepr:
def __repr__(self):
return "nôt åscíì"
class Binary(models.Model):
field = models.BinaryField()
def __str__(self):
return ""
class PostgresJSON(models.Model):
field = JSONField()
def __str__(self):
return ""
if settings.USE_GIS:
from django.contrib.gis.db import models as gismodels
class Location(gismodels.Model):
point = gismodels.PointField()
def __str__(self):
return ""
|