From cf5da88d1a9a825414440e536333eb700565dba9 Mon Sep 17 00:00:00 2001 From: David Kerkeslager Date: Fri, 4 Mar 2022 11:47:48 -0500 Subject: [PATCH] Add Mountain Project URLs --- .../migrations/0005_mountain_project_urls.py | 23 +++++++++++++++++++ src/climbing/models.py | 2 ++ 2 files changed, 25 insertions(+) create mode 100644 src/climbing/migrations/0005_mountain_project_urls.py diff --git a/src/climbing/migrations/0005_mountain_project_urls.py b/src/climbing/migrations/0005_mountain_project_urls.py new file mode 100644 index 0000000..3d3e323 --- /dev/null +++ b/src/climbing/migrations/0005_mountain_project_urls.py @@ -0,0 +1,23 @@ +# Generated by Django 4.0.3 on 2022-03-04 16:47 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('climbing', '0004_add_todos_and_ticks'), + ] + + operations = [ + migrations.AddField( + model_name='problem', + name='mountain_project', + field=models.URLField(blank=True, null=True), + ), + migrations.AddField( + model_name='route', + name='mountain_project', + field=models.URLField(blank=True, null=True), + ), + ] diff --git a/src/climbing/models.py b/src/climbing/models.py index 14c728e..60aa717 100644 --- a/src/climbing/models.py +++ b/src/climbing/models.py @@ -70,6 +70,7 @@ class Route(models.Model): related_name='routes', ) name = models.CharField(max_length=64) + mountain_project = models.URLField(blank=True, null=True) notes = models.TextField(blank=True, null=True) def __str__(self): @@ -195,6 +196,7 @@ class Problem(models.Model): name = models.CharField(max_length=64) difficulty = models.CharField(max_length=3, choices=BOULDER_DIFFICULTY_CHOICES) safety = models.CharField(max_length=4, choices=SAFETY_CHOICES) + mountain_project = models.URLField(blank=True, null=True) notes = models.TextField(blank=True, null=True) def __str__(self): -- 2.20.1