admin-controllers-default.patch, thanks Vladyslav
This commit is contained in:
@@ -1 +1 @@
|
|||||||
Version 2.00.0 (2012-07-11 18:23:46) dev
|
Version 2.00.0 (2012-07-11 21:57:13) dev
|
||||||
|
|||||||
@@ -526,8 +526,8 @@ def edit():
|
|||||||
except:
|
except:
|
||||||
ex_name = 'unknown exception!'
|
ex_name = 'unknown exception!'
|
||||||
response.flash = DIV(T('failed to compile file because:'), BR(),
|
response.flash = DIV(T('failed to compile file because:'), BR(),
|
||||||
B(ex_name), T(' at line %s') % e.lineno,
|
B(ex_name), ' '+T('at line %s', e.lineno),
|
||||||
offset and T(' at char %s') % offset or '',
|
offset and ' '+T('at char %s', offset) or '',
|
||||||
PRE(str(e)))
|
PRE(str(e)))
|
||||||
|
|
||||||
if data_or_revert and request.args[1] == 'modules':
|
if data_or_revert and request.args[1] == 'modules':
|
||||||
@@ -568,7 +568,7 @@ def edit():
|
|||||||
for v in viewlist:
|
for v in viewlist:
|
||||||
vf = os.path.split(v)[-1]
|
vf = os.path.split(v)[-1]
|
||||||
vargs = "/".join([viewpath.replace(os.sep,"/"),vf])
|
vargs = "/".join([viewpath.replace(os.sep,"/"),vf])
|
||||||
editviewlinks.append(A(T(vf.split(".")[0]),\
|
editviewlinks.append(A(vf.split(".")[0],\
|
||||||
_href=URL('edit',args=[vargs])))
|
_href=URL('edit',args=[vargs])))
|
||||||
|
|
||||||
if len(request.args) > 2 and request.args[1] == 'controllers':
|
if len(request.args) > 2 and request.args[1] == 'controllers':
|
||||||
@@ -794,7 +794,10 @@ def design():
|
|||||||
statics.sort()
|
statics.sort()
|
||||||
|
|
||||||
# Get all languages
|
# Get all languages
|
||||||
languages = listdir(apath('%s/languages/' % app, r=request), '[\w-]*\.py')
|
languages = sorted([lang+'.py' for lang, info in
|
||||||
|
T.get_possible_languages_info().iteritems()
|
||||||
|
if info[2]!=0]) # info[2] is langfile_mtime:
|
||||||
|
# get only existed files
|
||||||
|
|
||||||
#Get crontab
|
#Get crontab
|
||||||
cronfolder = apath('%s/cron' % app, r=request)
|
cronfolder = apath('%s/cron' % app, r=request)
|
||||||
@@ -988,13 +991,12 @@ def create_file():
|
|||||||
if len(filename) == 5:
|
if len(filename) == 5:
|
||||||
raise SyntaxError
|
raise SyntaxError
|
||||||
|
|
||||||
msg = T('This is the %(filename)s template',
|
msg = T('This is the %(filename)s template', dict(filename=filename))
|
||||||
dict(filename=filename))
|
|
||||||
if extension == 'html':
|
if extension == 'html':
|
||||||
text = dedent("""
|
text = dedent("""
|
||||||
{{extend 'layout.html'}}
|
{{extend 'layout.html'}}
|
||||||
<h1>%s</h1>
|
<h1>%s</h1>
|
||||||
{{=BEAUTIFY(response._vars)}}""" % msg)
|
{{=BEAUTIFY(response._vars)}}""" % msg)[1:]
|
||||||
else:
|
else:
|
||||||
generic = os.path.join(path,'generic.'+extension)
|
generic = os.path.join(path,'generic.'+extension)
|
||||||
if os.path.exists(generic):
|
if os.path.exists(generic):
|
||||||
@@ -1015,7 +1017,7 @@ def create_file():
|
|||||||
text = dedent("""
|
text = dedent("""
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
# coding: utf8
|
# coding: utf8
|
||||||
from gluon import *\n""")
|
from gluon import *\n""")[1:]
|
||||||
|
|
||||||
elif path[-8:] == '/static/':
|
elif path[-8:] == '/static/':
|
||||||
if request.vars.plugin and not filename.startswith('plugin_%s/' % request.vars.plugin):
|
if request.vars.plugin and not filename.startswith('plugin_%s/' % request.vars.plugin):
|
||||||
@@ -1368,7 +1370,7 @@ def twitter():
|
|||||||
try:
|
try:
|
||||||
if TWITTER_HASH:
|
if TWITTER_HASH:
|
||||||
page = urllib.urlopen("http://search.twitter.com/search.json?q=%%40%s" % TWITTER_HASH).read()
|
page = urllib.urlopen("http://search.twitter.com/search.json?q=%%40%s" % TWITTER_HASH).read()
|
||||||
data = sj.loads(page , encoding="utf-8")['results']
|
data = sj.loads(page, encoding="utf-8")['results']
|
||||||
d = dict()
|
d = dict()
|
||||||
for e in data:
|
for e in data:
|
||||||
d[e["id"]] = e
|
d[e["id"]] = e
|
||||||
|
|||||||
Reference in New Issue
Block a user