Browse Source

Get rid of the script that removed special chars from names

Baptiste Jonglez 9 years ago
parent
commit
0433b449b3
2 changed files with 0 additions and 27 deletions
  1. 0 6
      UPGRADE.md
  2. 0 21
      panorama/management/commands/fix_refpoints_name.py

+ 0 - 6
UPGRADE.md

@@ -69,12 +69,6 @@ If all commands run without error, you're probably all good.  If the first
 import command complains about missing images, make sure they are available
 import command complains about missing images, make sure they are available
 in the `media/pano/` directory, under the expected file name.
 in the `media/pano/` directory, under the expected file name.
 
 
-The final step is to fix the name of reference points, because characters
-such as "'" are known to cause issue in the frontend code:
-
-    # Remove special characters from reference point names
-    python manage.py fix_refpoints_name
-
 Regenerate all tiles
 Regenerate all tiles
 --------------------
 --------------------
 
 

+ 0 - 21
panorama/management/commands/fix_refpoints_name.py

@@ -1,21 +0,0 @@
-# -*- coding: utf-8 -*-
-
-from __future__ import unicode_literals, division, print_function
-
-from django.core.management.base import BaseCommand
-
-from panorama.models import ReferencePoint
-
-
-class Command(BaseCommand):
-    help = 'Fix name of reference points, to avoid special characters'
-    
-    def handle(self, *args, **options):
-        nb_fixed = 0
-        for refpoint in ReferencePoint.objects.all():
-            if "'" in refpoint.name:
-                self.stdout.write("Fixing refpoint name: {}".format(refpoint.name))
-                refpoint.name = refpoint.name.replace("'", " ")
-                refpoint.save()
-                nb_fixed += 1
-        self.stdout.write("Fixed {} reference point names".format(nb_fixed))