# Path: tests/gis_app/models.py
# class GeometryModel(LabelModel):
#     name = models.CharField(max_length=255)
#     geometry = models.GeometryField(srid=settings.SRID)
# 
# class PointModel(LabelModel):
#     name = models.CharField(max_length=255)
#     geometry = models.PointField(srid=settings.SRID)


from wq.db import rest
from .models import GeometryModel, PointModel
from django.conf import settings

if settings.WITH_GIS:
    rest.router.register_model(
        GeometryModel,
        fields="__all__",
    )
    rest.router.register_model(
        PointModel,
        fields="__all__",

# Path: tests/gis_app/models.py
# class GeometryModel(LabelModel):
#     name = models.CharField(max_length=255)
#     geometry = models.GeometryField(srid=settings.SRID)
# 
# class PointModel(LabelModel):
#     name = models.CharField(max_length=255)
#     geometry = models.PointField(srid=settings.SRID)


# Path: tests/gis_app/rest.py
from wq.db import rest
from .models import GeometryModel, PointModel
from django.conf import settings


if settings.WITH_GIS:
    rest.router.register_model(
        GeometryModel,
        fields="__all__",
    )
    rest.router.register_model(
        PointModel,
        fields="__all__",

    )