diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/migrations/0002_auto_20200619_1511.py | 20 | ||||
-rw-r--r-- | core/migrations/0003_auto_20200619_1513.py | 20 | ||||
-rw-r--r-- | core/models_caves.py | 4 |
3 files changed, 42 insertions, 2 deletions
diff --git a/core/migrations/0002_auto_20200619_1511.py b/core/migrations/0002_auto_20200619_1511.py new file mode 100644 index 0000000..ef84c1c --- /dev/null +++ b/core/migrations/0002_auto_20200619_1511.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.29 on 2020-06-19 14:11 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('core', '0001_initial'), + ] + + operations = [ + migrations.AlterField( + model_name='logbookentry', + name='cave_slug', + field=models.SlugField(blank=True), + ), + ] diff --git a/core/migrations/0003_auto_20200619_1513.py b/core/migrations/0003_auto_20200619_1513.py new file mode 100644 index 0000000..e12f2a2 --- /dev/null +++ b/core/migrations/0003_auto_20200619_1513.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.29 on 2020-06-19 14:13 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('core', '0002_auto_20200619_1511'), + ] + + operations = [ + migrations.AlterField( + model_name='logbookentry', + name='cave_slug', + field=models.SlugField(blank=True, null=True), + ), + ] diff --git a/core/models_caves.py b/core/models_caves.py index a037c90..11aa24a 100644 --- a/core/models_caves.py +++ b/core/models_caves.py @@ -125,7 +125,7 @@ class Cave(TroggleModel): return urljoin(settings.URL_ROOT, reverse('cave',kwargs={'cave_id':href,})) def __str__(self, sep = ": "): - return str("slug:"+str(self.slug())) + return str(self.slug()) def get_QMs(self): return QM.objects.filter(found_by__cave_slug=self.caveslug_set.all()) @@ -418,7 +418,7 @@ class LogbookEntry(TroggleModel): expeditionday = models.ForeignKey("ExpeditionDay", null=True,on_delete=models.CASCADE)#MJG wants to KILL THIS (redundant information) expedition = models.ForeignKey(Expedition,blank=True, null=True,on_delete=models.CASCADE) # yes this is double- title = models.CharField(max_length=settings.MAX_LOGBOOK_ENTRY_TITLE_LENGTH) - cave_slug = models.SlugField(max_length=50) + cave_slug = models.SlugField(max_length=50, blank=True, null=True) place = models.CharField(max_length=100,blank=True, null=True,help_text="Only use this if you haven't chosen a cave") text = models.TextField() slug = models.SlugField(max_length=50) |