|
@@ -9,9 +9,7 @@ from locations.models import GeoLocation
|
|
BNULL = {"blank": True, "null": True}
|
|
BNULL = {"blank": True, "null": True}
|
|
|
|
|
|
|
|
|
|
-
|
|
|
|
class Trail(ScrobblableMixin):
|
|
class Trail(ScrobblableMixin):
|
|
-
|
|
|
|
class PrincipalType(models.TextChoices):
|
|
class PrincipalType(models.TextChoices):
|
|
WOODS = "WOODS"
|
|
WOODS = "WOODS"
|
|
ROAD = "ROAD"
|
|
ROAD = "ROAD"
|
|
@@ -19,7 +17,7 @@ class Trail(ScrobblableMixin):
|
|
MOUNTAIN = "MOUNTAIN"
|
|
MOUNTAIN = "MOUNTAIN"
|
|
|
|
|
|
class ActivityType(models.TextChoices):
|
|
class ActivityType(models.TextChoices):
|
|
- WALK= "WALK"
|
|
|
|
|
|
+ WALK = "WALK"
|
|
HIKE = "HIKE"
|
|
HIKE = "HIKE"
|
|
RUN = "RUN"
|
|
RUN = "RUN"
|
|
BIKE = "BIKE"
|
|
BIKE = "BIKE"
|
|
@@ -39,8 +37,14 @@ class Trail(ScrobblableMixin):
|
|
)
|
|
)
|
|
strava_id = models.CharField(max_length=255, **BNULL)
|
|
strava_id = models.CharField(max_length=255, **BNULL)
|
|
trailforks_id = models.CharField(max_length=255, **BNULL)
|
|
trailforks_id = models.CharField(max_length=255, **BNULL)
|
|
- principal_type = models.CharField(max_length=10, choices=PrincipalType.choices, **BNULL)
|
|
|
|
- default_activity_type = models.CharField(max_length=10, choices=ActivityType.choices, **BNULL)
|
|
|
|
|
|
+ alltrails_id = models.CharField(max_length=255, **BNULL)
|
|
|
|
+ gaiagps_id = models.CharField(max_length=255, **BNULL)
|
|
|
|
+ principal_type = models.CharField(
|
|
|
|
+ max_length=10, choices=PrincipalType.choices, **BNULL
|
|
|
|
+ )
|
|
|
|
+ default_activity_type = models.CharField(
|
|
|
|
+ max_length=10, choices=ActivityType.choices, **BNULL
|
|
|
|
+ )
|
|
|
|
|
|
def get_absolute_url(self):
|
|
def get_absolute_url(self):
|
|
return reverse("trails:trail_detail", kwargs={"slug": self.uuid})
|
|
return reverse("trails:trail_detail", kwargs={"slug": self.uuid})
|