#49 Frontend rendering

* adds rendering for detail view
* adds new includable html snippet for parcel rendering
* refactors generic includables in konova/ app into konova/templates/includes/...
* fixes bug where parcels have been reused from the database due to wrong model structure
* adds get_underlying_parcels() for Geometry model
* adds get_underlying_parcels() for GeoReferencedMixin models
* fixes bug where missing geometry would lead to an error during geometry conflict check
* removes unused wfs attribute from AbstractWFSFetcher
* adds/updates translations
This commit is contained in:
2022-01-05 14:13:26 +01:00
parent b43beffc6b
commit 49859d17d2
20 changed files with 183 additions and 75 deletions
+8 -8
View File
@@ -24,6 +24,12 @@ class Parcel(UuidModel):
"""
geometries = models.ManyToManyField("konova.Geometry", related_name="parcels", blank=True)
district = models.ForeignKey("konova.District", on_delete=models.SET_NULL, null=True, blank=True, related_name="parcels")
gmrkng = models.CharField(
max_length=1000,
help_text="Gemarkung",
null=True,
blank=True,
)
flrstck_nnr = models.CharField(
max_length=1000,
help_text="Flurstücksnenner",
@@ -45,7 +51,7 @@ class Parcel(UuidModel):
updated_on = models.DateTimeField(auto_now_add=True)
def __str__(self):
return f"{self.flr} | {self.flrstck_nnr} | {self.flrstck_zhlr}"
return f"{self.gmrkng} | {self.flr} | {self.flrstck_zhlr} | {self.flrstck_nnr}"
class District(UuidModel):
@@ -56,12 +62,6 @@ class District(UuidModel):
District.
"""
gmrkng = models.CharField(
max_length=1000,
help_text="Gemarkung",
null=True,
blank=True,
)
gmnd = models.CharField(
max_length=1000,
help_text="Gemeinde",
@@ -76,4 +76,4 @@ class District(UuidModel):
)
def __str__(self):
return f"{self.gmrkng} | {self.gmnd} | {self.krs}"
return f"{self.gmnd} | {self.krs}"