X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/24c1d259ba4af084959d70c6a1f355d0a57f1191..97487ee6a55f54bd483c20557fb554fea4f28844:/apps/toolbar/management/commands/fixbuttons.py diff --git a/apps/toolbar/management/commands/fixbuttons.py b/apps/toolbar/management/commands/fixbuttons.py index ea797fcf..79169d21 100644 --- a/apps/toolbar/management/commands/fixbuttons.py +++ b/apps/toolbar/management/commands/fixbuttons.py @@ -7,7 +7,7 @@ from django.core.management.base import NoArgsCommand from toolbar.models import Button, ButtonGroup -from django.utils import simplejson as json +import json import re @@ -27,7 +27,7 @@ class Command(NoArgsCommand): if params[-1] == u')': params = params[:-1] try: - v = son.loads(re.sub(u'([\\w-]+)\\s*:', u'"\\1": ', params).encode('utf-8')) + v = json.loads(re.sub(u'([\\w-]+)\\s*:', u'"\\1": ', params).encode('utf-8')) except ValueError, e: print "Unable to fix '%s' " % b.params print "Try to fix this button manually and rerun the script."