1
0
mirror of https://github.com/django/django.git synced 2025-03-28 02:00:45 +00:00
Tim Graham 444cdf6131 [1.11.x] Made runtests.py run gis_tests only when using a GIS database backend.
This facilitates other changes like refs #28160.

Backport of 890537253cf235091816d27a5c2fb64943c8e34a from master
2017-05-04 20:54:25 -04:00

21 lines
441 B
Python

from django.contrib.gis.db import models
from django.utils.encoding import python_2_unicode_compatible
from ..admin import admin
@python_2_unicode_compatible
class City(models.Model):
name = models.CharField(max_length=30)
point = models.PointField()
class Meta:
app_label = 'geoadmin'
def __str__(self):
return self.name
site = admin.AdminSite(name='admin_gis')
site.register(City, admin.OSMGeoAdmin)