Example #1
0
 def addToDefaultArgs(
     CSVname, modelName
 ):  #This has to do with the non-destructive import. These arguments will be passed as the "default" dictionary in a get_or_create
     if line[CSVname]:
         defaultArgs[modelName] = html_to_wiki(line[CSVname])
Example #2
0
 def addToArgs(CSVname, modelName):
     if line[CSVname]:
         args[modelName] = html_to_wiki(line[CSVname])
Example #3
0
def parseDescriptionsOnCaveObjects():
    for cave in models.Cave.objects.all():
        cave.underground_description = html_to_wiki(
            unicode(cave.underground_description))
        cave.save()
Example #4
0
 def addToArgsViaDict(CSVname, modelName, dictionary):
     if line[CSVname]:
         args[modelName] = dictionary[html_to_wiki(line[CSVname])]
Example #5
0
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()