Skip to content

Commit 5b2c82c

Browse files
committed
Rename provinces and AC urls + fix datasets __str__() method
1 parent cac0629 commit 5b2c82c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

vbos/datasets/models.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ class VectorDataset(models.Model):
111111
source = models.CharField(max_length=155, blank=True, null=True)
112112

113113
def __str__(self):
114-
return self.name
114+
return f"{self.name} ({self.type})"
115115

116116
class Meta:
117117
ordering = ["id"]
@@ -150,7 +150,7 @@ class TabularDataset(models.Model):
150150
unit = models.CharField(max_length=50, blank=True, null=True)
151151

152152
def __str__(self):
153-
return self.name
153+
return f"{self.name} ({self.type})"
154154

155155
class Meta:
156156
ordering = ["id"]

vbos/datasets/urls.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
urlpatterns = [
88
# raster
99
path("cluster/", views.ClusterListView.as_view(), name="cluster-list"),
10-
path("province/", views.ProvinceListView.as_view(), name="province-list"),
10+
path("provinces/", views.ProvinceListView.as_view(), name="province-list"),
1111
path(
12-
"area-council/<str:province>/",
12+
"provinces/<str:province>/area-councils/",
1313
views.AreaCouncilListView.as_view(),
1414
name="area-council-list",
1515
),

0 commit comments

Comments
 (0)