2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2025-12-16 05:37:14 +00:00

[svn] Make QM wikilinks work in new format, and fix cave description parser to output working wikilinks.

This commit is contained in:
substantialnoninfringinguser
2009-07-09 05:08:21 +01:00
parent f359b645e6
commit 3a61639a08
3 changed files with 16 additions and 9 deletions

View File

@@ -512,11 +512,18 @@ class CaveDescription(TroggleModel):
short_name = models.CharField(max_length=50, unique = True)
long_name = models.CharField(max_length=200, blank=True, null=True)
description = models.TextField(blank=True,null=True)
linked_subcaves = models.ManyToManyField("NewSubCave")
linked_entrances = models.ManyToManyField("Entrance")
linked_qms = models.ManyToManyField("QM")
linked_subcaves = models.ManyToManyField("NewSubCave", blank=True,null=True)
linked_entrances = models.ManyToManyField("Entrance", blank=True,null=True)
linked_qms = models.ManyToManyField("QM", blank=True,null=True)
def __unicode__(self):
return unicode(self.short_name)
if self.long_name:
return unicode(self.long_name)
else:
return unicode(self.short_name)
def get_absolute_url(self):
return urlparse.urljoin(settings.URL_ROOT, reverse('cavedescription', args=(self.short_name,)))
class NewSubCave(TroggleModel):
name = models.CharField(max_length=200, unique = True)