mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2025-12-15 12:37:10 +00:00
[svn] * Make descriptions parser also replace links to descriptions from Cave models' underground_descriptions with wikilinks for valid (existing) links
* Make entrances searchable in admin by cave kataster number
This commit is contained in:
@@ -22,6 +22,7 @@ pages = [(["smkridge", "204", "ariston-rigging.html"], "ariston-rigging"),
|
||||
|
||||
|
||||
def getDescriptions():
|
||||
"""Creates objects in the database for each item in the list 'pages' . """
|
||||
for filelocation, name in pages:
|
||||
f = open(os.path.join(settings.EXPOWEB, *filelocation), "r")
|
||||
html = f.read()
|
||||
@@ -32,7 +33,13 @@ def getDescriptions():
|
||||
cd.save()
|
||||
|
||||
def parseDescriptions():
|
||||
"""Turns the HTML in each cave description into wikicode"""
|
||||
for cd in models.CaveDescription.objects.all():
|
||||
cd.description = html_to_wiki(cd.description)
|
||||
|
||||
cd.save()
|
||||
cd.save()
|
||||
|
||||
def parseDescriptionsInCaveObjects():
|
||||
for cave in models.Cave.objects.all():
|
||||
cave.underground_description=html_to_wiki(unicode(cave.underground_description))
|
||||
cave.save()
|
||||
Reference in New Issue
Block a user