migration for left side-bar
This commit is contained in:
parent
ca15430389
commit
dd48490687
|
@ -2,7 +2,7 @@ import urllib2
|
||||||
import re
|
import re
|
||||||
from texts.models import *
|
from texts.models import *
|
||||||
|
|
||||||
NEXT = "http://next.pad.ma/"
|
NEXT = "http://pad.ma/"
|
||||||
OLD = "http://pad.ma/"
|
OLD = "http://pad.ma/"
|
||||||
IdMapping = {}
|
IdMapping = {}
|
||||||
regex = re.compile(r'(http:\/\/.*?pad.ma\/(V.*?))[\s\"\<\n]')
|
regex = re.compile(r'(http:\/\/.*?pad.ma\/(V.*?))[\s\"\<\n]')
|
||||||
|
@ -47,6 +47,12 @@ def doAll():
|
||||||
p.html = newText
|
p.html = newText
|
||||||
p.save()
|
p.save()
|
||||||
|
|
||||||
|
def doAllSide():
|
||||||
|
for p in PadmaText.objects.all():
|
||||||
|
print p.title
|
||||||
|
newLeftBar = replaceUrls(p.left_bar)
|
||||||
|
p.left_bar = newLeftBar
|
||||||
|
p.save()
|
||||||
|
|
||||||
def nextToCurrent(text):
|
def nextToCurrent(text):
|
||||||
return text.replace(NEXT, OLD)
|
return text.replace(NEXT, OLD)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user