fixed some layout problems
This commit is contained in:
@@ -1 +1 @@
|
|||||||
Version 2.4.2-stable+timestamp.2013.03.08.12.05.24
|
Version 2.4.2-stable+timestamp.2013.03.08.16.29.39
|
||||||
|
|||||||
@@ -148,9 +148,7 @@ def check_version():
|
|||||||
elif platform.system().lower() in ('windows', 'win32', 'win64') and os.path.exists("web2py.exe"):
|
elif platform.system().lower() in ('windows', 'win32', 'win64') and os.path.exists("web2py.exe"):
|
||||||
return SPAN('You should upgrade to version %s.%s.%s' % version_number[:3])
|
return SPAN('You should upgrade to version %s.%s.%s' % version_number[:3])
|
||||||
else:
|
else:
|
||||||
return sp_button(URL('upgrade_web2py'), T('upgrade now')) \
|
return sp_button(URL('upgrade_web2py'), T('upgrade now to %s') % version_number.split('-')[0])
|
||||||
+ XML(' <strong class="upgrade_version">%s.%s.%s</strong>'
|
|
||||||
% version_number[:3])
|
|
||||||
|
|
||||||
|
|
||||||
def logout():
|
def logout():
|
||||||
@@ -205,14 +203,12 @@ def site():
|
|||||||
|
|
||||||
is_appname = IS_VALID_APPNAME()
|
is_appname = IS_VALID_APPNAME()
|
||||||
form_create = SQLFORM.factory(Field('name', requires=is_appname),
|
form_create = SQLFORM.factory(Field('name', requires=is_appname),
|
||||||
table_name='appcreate',
|
table_name='appcreate')
|
||||||
_class='well well-small')
|
|
||||||
form_update = SQLFORM.factory(Field('name', requires=is_appname),
|
form_update = SQLFORM.factory(Field('name', requires=is_appname),
|
||||||
Field('file', 'upload', uploadfield=False),
|
Field('file', 'upload', uploadfield=False),
|
||||||
Field('url'),
|
Field('url'),
|
||||||
Field('overwrite', 'boolean'),
|
Field('overwrite', 'boolean'),
|
||||||
table_name='appupdate',
|
table_name='appupdate')
|
||||||
_class='well well-small')
|
|
||||||
form_create.process()
|
form_create.process()
|
||||||
form_update.process()
|
form_update.process()
|
||||||
|
|
||||||
@@ -1430,7 +1426,7 @@ def errors():
|
|||||||
hash2error[hash]['count'] += 1
|
hash2error[hash]['count'] += 1
|
||||||
except KeyError:
|
except KeyError:
|
||||||
error_lines = error['traceback'].split("\n")
|
error_lines = error['traceback'].split("\n")
|
||||||
last_line = error_lines[-2]
|
last_line = error_lines[-2] if len(error_lines)>1 else 'unknown'
|
||||||
error_causer = os.path.split(error['layer'])[1]
|
error_causer = os.path.split(error['layer'])[1]
|
||||||
hash2error[hash] = dict(count=1, pickel=error,
|
hash2error[hash] = dict(count=1, pickel=error,
|
||||||
causer=error_causer,
|
causer=error_causer,
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ if request.vars.app or request.args:
|
|||||||
|
|
||||||
if os.path.exists('applications/examples'):
|
if os.path.exists('applications/examples'):
|
||||||
response.menu.append(
|
response.menu.append(
|
||||||
(T('Help'), False, URL('examples', 'default', 'index')))
|
(T('Help'), False, URL('examples', 'default', 'examples')))
|
||||||
else:
|
else:
|
||||||
response.menu.append((T('Help'), False, 'http://web2py.com/examples'))
|
response.menu.append((T('Help'), False, 'http://web2py.com/examples'))
|
||||||
|
|
||||||
|
|||||||
+18
-3
@@ -99,7 +99,7 @@ margin-bottom:7px;
|
|||||||
{
|
{
|
||||||
clear:right;
|
clear:right;
|
||||||
margin-top:2em;
|
margin-top:2em;
|
||||||
border-top:1px dotted;
|
border-top:1px solid #d1d1d1;
|
||||||
padding:0 1em;
|
padding:0 1em;
|
||||||
}
|
}
|
||||||
.pwdchange>.button{margin-bottom:10px;}
|
.pwdchange>.button{margin-bottom:10px;}
|
||||||
@@ -188,14 +188,15 @@ vertical-align:middle;
|
|||||||
.celled
|
.celled
|
||||||
{
|
{
|
||||||
display:inline-block;
|
display:inline-block;
|
||||||
padding: 4px 0 0 0;
|
padding: 0 0 0 4px;
|
||||||
vertical-align:top;
|
vertical-align:top;
|
||||||
margin-top:4px;
|
margin-top:4px;
|
||||||
width:700px;
|
width:700px;
|
||||||
}
|
}
|
||||||
.folder
|
.folder
|
||||||
{
|
{
|
||||||
border-left: 1px dotted #AAA;
|
list-style-type:none;
|
||||||
|
#border-left: 1px dotted #AAA;
|
||||||
}
|
}
|
||||||
.folder li
|
.folder li
|
||||||
{
|
{
|
||||||
@@ -819,4 +820,18 @@ background-color:#FC0;
|
|||||||
{
|
{
|
||||||
width:165px;
|
width:165px;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
h4.editableapp,
|
||||||
|
h4.currentapp {
|
||||||
|
padding: 5px 0 5px 54px;
|
||||||
|
display: inline;
|
||||||
|
}
|
||||||
|
|
||||||
|
h4.editableapp {
|
||||||
|
background: #fff url(../images/folder.png) no-repeat;
|
||||||
|
}
|
||||||
|
|
||||||
|
h4.currentapp {
|
||||||
|
background: #fff url(../images/folder_locked.png) no-repeat;
|
||||||
}
|
}
|
||||||
@@ -7,7 +7,7 @@ def peekfile(path,file,vars={},title=None):
|
|||||||
return A(file.replace('\\\\','/'),_title=title,_href=URL('peek', args=args, vars=vars))
|
return A(file.replace('\\\\','/'),_title=title,_href=URL('peek', args=args, vars=vars))
|
||||||
def editfile(path,file,vars={}):
|
def editfile(path,file,vars={}):
|
||||||
args=(path,file) if 'app' in vars else (app,path,file)
|
args=(path,file) if 'app' in vars else (app,path,file)
|
||||||
return A(SPAN(T('Edit')),_class='button editbutton btn',_href=URL('edit', args=args, vars=vars))
|
return A(SPAN(T('Edit')),_class='button editbutton btn btn-mini',_href=URL('edit', args=args, vars=vars))
|
||||||
def testfile(path,file):
|
def testfile(path,file):
|
||||||
return A(TAG[''](IMG(_src=URL('static', 'images/test_icon.png'), _alt=T('test')),
|
return A(TAG[''](IMG(_src=URL('static', 'images/test_icon.png'), _alt=T('test')),
|
||||||
SPAN(T("Run tests in this file (to run all files, you may also use the button labelled 'test')"))),
|
SPAN(T("Run tests in this file (to run all files, you may also use the button labelled 'test')"))),
|
||||||
@@ -17,9 +17,9 @@ def testfile(path,file):
|
|||||||
**{'_data-placement':'right',
|
**{'_data-placement':'right',
|
||||||
'_data-original-title':T("Run tests in this file (to run all files, you may also use the button labelled 'test')")})
|
'_data-original-title':T("Run tests in this file (to run all files, you may also use the button labelled 'test')")})
|
||||||
def editlanguagefile(path,file,vars={}):
|
def editlanguagefile(path,file,vars={}):
|
||||||
return A(SPAN(T('Edit')),_class='button editbutton btn',_href=URL('edit_language', args=(app, path, file), vars=vars))
|
return A(SPAN(T('Edit')),_class='button editbutton btn btn-mini',_href=URL('edit_language', args=(app, path, file), vars=vars))
|
||||||
def editpluralsfile(path,file,vars={}):
|
def editpluralsfile(path,file,vars={}):
|
||||||
return A(SPAN(T('Edit')),_class='button editbutton btn',_href=URL('edit_plurals', args=(app, path, file), vars=vars))
|
return A(SPAN(T('Edit')),_class='button editbutton btn btn-mini',_href=URL('edit_plurals', args=(app, path, file), vars=vars))
|
||||||
def file_upload_form(location, anchor=None):
|
def file_upload_form(location, anchor=None):
|
||||||
form=FORM(
|
form=FORM(
|
||||||
LABEL(T("upload file:")),
|
LABEL(T("upload file:")),
|
||||||
@@ -92,7 +92,7 @@ def deletefile(arglist, vars={}):
|
|||||||
<!-- MODELS -->
|
<!-- MODELS -->
|
||||||
<h3 id="_models" rel="pagebookmark">
|
<h3 id="_models" rel="pagebookmark">
|
||||||
<span class="component" onclick="collapse('models_inner');">{{=T("Models")}}</span>
|
<span class="component" onclick="collapse('models_inner');">{{=T("Models")}}</span>
|
||||||
<a href="#models" rel="tooltip" data-placement="right" data-original-title="{{=T('The data representation, define database tables and sets')}}">
|
<a href="#models" rel="tooltip" data-placement="span3" data-original-title="{{=T('The data representation, define database tables and sets')}}">
|
||||||
{{=helpicon()}}
|
{{=helpicon()}}
|
||||||
<span>{{=T("The data representation, define database tables and sets")}}</span>
|
<span>{{=T("The data representation, define database tables and sets")}}</span>
|
||||||
</a><span id="models" class="hashstick"> </span><a href="#" class="tophashlink btn btn-mini btn-warning"><span>top</span></a>
|
</a><span id="models" class="hashstick"> </span><a href="#" class="tophashlink btn btn-mini btn-warning"><span>top</span></a>
|
||||||
@@ -125,9 +125,10 @@ def deletefile(arglist, vars={}):
|
|||||||
</ul>
|
</ul>
|
||||||
{{pass}}
|
{{pass}}
|
||||||
<div class="controls formfield">
|
<div class="controls formfield">
|
||||||
<div class="row-fluid">
|
<button onclick="jQuery('#form1').slideToggle()" class="btn btn-mini">Create</button>
|
||||||
<div class="span3">{{=file_create_form('%s/models/' % app, 'models')}}</div>
|
<div id="form1" class="row-fluid" style="display:none">
|
||||||
</div>
|
<div class="span3">{{=file_create_form('%s/models/' % app, 'models')}}</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -140,7 +141,7 @@ for c in controllers: controller_functions+=[c[:-3]+'/%s.html'%x for x in functi
|
|||||||
<!-- CONTROLLERS -->
|
<!-- CONTROLLERS -->
|
||||||
<h3 id="_controllers" rel="pagebookmark">
|
<h3 id="_controllers" rel="pagebookmark">
|
||||||
<span class="component" onclick="collapse('controllers_inner');">{{=T("Controllers")}}</span>
|
<span class="component" onclick="collapse('controllers_inner');">{{=T("Controllers")}}</span>
|
||||||
<a href="#controllers" rel="tooltip" data-placement="right" data-original-title="{{=T('The application logic, each URL path is mapped in one exposed function in the controller')}}">
|
<a href="#controllers" rel="tooltip" data-placement="span3" data-original-title="{{=T('The application logic, each URL path is mapped in one exposed function in the controller')}}">
|
||||||
{{=helpicon()}}
|
{{=helpicon()}}
|
||||||
<span>{{=T("The application logic, each URL path is mapped in one exposed function in the controller")}}</span>
|
<span>{{=T("The application logic, each URL path is mapped in one exposed function in the controller")}}</span>
|
||||||
</a><span id="controllers" class="hashstick"> </span><a href="#" class="tophashlink btn btn-mini btn-warning"><span>top</span></a>
|
</a><span id="controllers" class="hashstick"> </span><a href="#" class="tophashlink btn btn-mini btn-warning"><span>top</span></a>
|
||||||
@@ -172,16 +173,17 @@ for c in controllers: controller_functions+=[c[:-3]+'/%s.html'%x for x in functi
|
|||||||
</ul>
|
</ul>
|
||||||
{{pass}}
|
{{pass}}
|
||||||
<div class="controls formfield">
|
<div class="controls formfield">
|
||||||
<div class="row-fluid">
|
<button onclick="jQuery('#form2').slideToggle()" class="btn btn-mini">Create</button>
|
||||||
<div class="span3">{{=file_create_form('%s/controllers/' % app, 'controllers')}}</div>
|
<div id="form2" class="row-fluid" style="display:none">
|
||||||
</div>
|
<div class="span3">{{=file_create_form('%s/controllers/' % app, 'controllers')}}</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- VIEWS -->
|
<!-- VIEWS -->
|
||||||
<h3 id="_views" rel="pagebookmark">
|
<h3 id="_views" rel="pagebookmark">
|
||||||
<span class="component" onclick="collapse('views_inner');">{{=T("Views")}}</span>
|
<span class="component" onclick="collapse('views_inner');">{{=T("Views")}}</span>
|
||||||
<a href="#views" rel="tooltip" data-placement="right" data-original-title="{{=T('The presentations layer, views are also known as templates')}}">
|
<a href="#views" rel="tooltip" data-placement="span3" data-original-title="{{=T('The presentations layer, views are also known as templates')}}">
|
||||||
{{=helpicon()}}
|
{{=helpicon()}}
|
||||||
<span>{{=T("The presentations layer, views are also known as templates")}}</span>
|
<span>{{=T("The presentations layer, views are also known as templates")}}</span>
|
||||||
</a><span id="views" class="hashstick"> </span><a href="#" class="tophashlink btn btn-mini btn-warning"><span>top</span></a>
|
</a><span id="views" class="hashstick"> </span><a href="#" class="tophashlink btn btn-mini btn-warning"><span>top</span></a>
|
||||||
@@ -211,16 +213,17 @@ for c in controllers: controller_functions+=[c[:-3]+'/%s.html'%x for x in functi
|
|||||||
</ul>
|
</ul>
|
||||||
{{pass}}
|
{{pass}}
|
||||||
<div class="controls formfield">
|
<div class="controls formfield">
|
||||||
<div class="row-fluid">
|
<button onclick="jQuery('#form3').slideToggle()" class="btn btn-mini">Create</button>
|
||||||
<div class="span3">{{=file_create_form('%s/views/' % app, 'views')}}</div>
|
<div id="form3" class="row-fluid" style="display:none">
|
||||||
</div>
|
<div class="span3">{{=file_create_form('%s/views/' % app, 'views')}}</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- LANGUAGES -->
|
<!-- LANGUAGES -->
|
||||||
<h3 id="_languages" rel="pagebookmark">
|
<h3 id="_languages" rel="pagebookmark">
|
||||||
<span class="component" onclick="collapse('languages_inner');">{{=T("Languages")}}</span>
|
<span class="component" onclick="collapse('languages_inner');">{{=T("Languages")}}</span>
|
||||||
<a href="#languages" rel="tooltip" data-placement="right" data-original-title="{{=T('Translation strings for the application')}}">
|
<a href="#languages" rel="tooltip" data-placement="span3" data-original-title="{{=T('Translation strings for the application')}}">
|
||||||
{{=helpicon()}}
|
{{=helpicon()}}
|
||||||
<span>{{=T("Translation strings for the application")}}</span>
|
<span>{{=T("Translation strings for the application")}}</span>
|
||||||
</a><span id="languages" class="hashstick"> </span><a href="#" class="tophashlink btn btn-mini btn-warning"><span>top</span></a>
|
</a><span id="languages" class="hashstick"> </span><a href="#" class="tophashlink btn btn-mini btn-warning"><span>top</span></a>
|
||||||
@@ -274,16 +277,17 @@ for c in controllers: controller_functions+=[c[:-3]+'/%s.html'%x for x in functi
|
|||||||
</ul>
|
</ul>
|
||||||
{{pass}}
|
{{pass}}
|
||||||
<div class="controls formfield">
|
<div class="controls formfield">
|
||||||
<div class="row-fluid">
|
<button onclick="jQuery('#form4').slideToggle()" class="btn btn-mini">Create</button>
|
||||||
<div class="span3">{{=file_create_form('%s/languages/' % app, 'languages', T('(something like "it-it")'))}}</div>
|
<div id="form4" class="row-fluid" style="display:none">
|
||||||
</div>
|
<div class="span3">{{=file_create_form('%s/languages/' % app, 'languages', T('(something like "it-it")'))}}</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- STATIC -->
|
<!-- STATIC -->
|
||||||
<h3 id="_static" rel="pagebookmark">
|
<h3 id="_static" rel="pagebookmark">
|
||||||
<span class="component" onclick="collapse('static_inner');">{{=T("Static")}}</span>
|
<span class="component" onclick="collapse('static_inner');">{{=T("Static")}}</span>
|
||||||
<a href="#static" rel="tooltip" data-placement="right" data-original-title="{{=T('These files are served without processing, your images go here')}}">
|
<a href="#static" rel="tooltip" data-placement="span3" data-original-title="{{=T('These files are served without processing, your images go here')}}">
|
||||||
{{=helpicon()}}
|
{{=helpicon()}}
|
||||||
<span>{{=T("These files are served without processing, your images go here")}}</span>
|
<span>{{=T("These files are served without processing, your images go here")}}</span>
|
||||||
</a><span id="static" class="hashstick"> </span><a href="#" class="tophashlink btn btn-mini btn-warning"><span>top</span></a>
|
</a><span id="static" class="hashstick"> </span><a href="#" class="tophashlink btn btn-mini btn-warning"><span>top</span></a>
|
||||||
@@ -328,17 +332,18 @@ for c in controllers: controller_functions+=[c[:-3]+'/%s.html'%x for x in functi
|
|||||||
</ul>
|
</ul>
|
||||||
{{pass}}
|
{{pass}}
|
||||||
<div class="controls formfield">
|
<div class="controls formfield">
|
||||||
<div class="row-fluid">
|
<button onclick="jQuery('#form4').slideToggle()" class="btn btn-mini">Create/Upload</button>
|
||||||
<div class="span3">{{=file_create_form('%s/static/' % app, 'static')}}<em>{{=T('or alternatively')}}</em></div>
|
<div id="form4" class="row-fluid" style="display:none">
|
||||||
<div class="span3">{{=file_upload_form('%s/static/' % app, 'static')}}</div>
|
<div class="span3">{{=file_create_form('%s/static/' % app, 'static')}}<em>{{=T('or alternatively')}}</em></div>
|
||||||
</div>
|
<div class="span3">{{=file_upload_form('%s/static/' % app, 'static')}}</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- MODULES -->
|
<!-- MODULES -->
|
||||||
<h3 id="_modules" rel="pagebookmark">
|
<h3 id="_modules" rel="pagebookmark">
|
||||||
<span class="component" onclick="collapse('modules_inner');">{{=T("Modules")}}</span>
|
<span class="component" onclick="collapse('modules_inner');">{{=T("Modules")}}</span>
|
||||||
<a href="#modules" rel="tooltip" data-placement="right" data-original-title="{{=T('Additional code for your application')}}">
|
<a href="#modules" rel="tooltip" data-placement="span3" data-original-title="{{=T('Additional code for your application')}}">
|
||||||
{{=helpicon()}}
|
{{=helpicon()}}
|
||||||
<span>{{=T("Additional code for your application")}}</span>
|
<span>{{=T("Additional code for your application")}}</span>
|
||||||
</a><span id="modules" class="hashstick"> </span><a href="#" class="tophashlink btn btn-mini btn-warning"><span>top</span></a>
|
</a><span id="modules" class="hashstick"> </span><a href="#" class="tophashlink btn btn-mini btn-warning"><span>top</span></a>
|
||||||
@@ -363,17 +368,18 @@ for c in controllers: controller_functions+=[c[:-3]+'/%s.html'%x for x in functi
|
|||||||
</ul>
|
</ul>
|
||||||
{{pass}}
|
{{pass}}
|
||||||
<div class="controls formfield">
|
<div class="controls formfield">
|
||||||
<div class="row-fluid">
|
<button onclick="jQuery('#form5').slideToggle()" class="btn btn-mini">Create/Upload</button>
|
||||||
<div class="span3">{{=file_create_form('%s/modules/' % app, 'modules')}}<em>{{=T('or alternatively')}}</em></div>
|
<div id="form5" class="row-fluid" style="display:none">
|
||||||
<div class="span3">{{=file_upload_form('%s/modules/' % app, 'modules')}}</div>
|
<div class="span3">{{=file_create_form('%s/modules/' % app, 'modules')}}<em>{{=T('or alternatively')}}</em></div>
|
||||||
</div>
|
<div class="span3">{{=file_upload_form('%s/modules/' % app, 'modules')}}</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- PRIVATE -->
|
<!-- PRIVATE -->
|
||||||
<h3 id="_private" rel="pagebookmark">
|
<h3 id="_private" rel="pagebookmark">
|
||||||
<span class="component" onclick="collapse('private_inner');">{{=T("Private files")}}</span>
|
<span class="component" onclick="collapse('private_inner');">{{=T("Private files")}}</span>
|
||||||
<a href="#private" rel="tooltip" data-placement="right" data-original-title="{{=T('These files are not served, they are only available from within your app')}}">
|
<a href="#private" rel="tooltip" data-placement="span3" data-original-title="{{=T('These files are not served, they are only available from within your app')}}">
|
||||||
{{=helpicon()}}
|
{{=helpicon()}}
|
||||||
<span>{{=T("These files are not served, they are only available from within your app")}}</span>
|
<span>{{=T("These files are not served, they are only available from within your app")}}</span>
|
||||||
</a><span id="private" class="hashstick"> </span><a href="#" class="tophashlink btn btn-mini btn-warning"><span>top</span></a>
|
</a><span id="private" class="hashstick"> </span><a href="#" class="tophashlink btn btn-mini btn-warning"><span>top</span></a>
|
||||||
@@ -419,17 +425,18 @@ for c in controllers: controller_functions+=[c[:-3]+'/%s.html'%x for x in functi
|
|||||||
{{pass}}
|
{{pass}}
|
||||||
</ul>
|
</ul>
|
||||||
<div class="controls formfield">
|
<div class="controls formfield">
|
||||||
<div class="row-fluid">
|
<button onclick="jQuery('#form6').slideToggle()" class="btn btn-mini">Create/Upload</button>
|
||||||
<div class="span3">{{=file_create_form('%s/private/' % app, 'private')}}<em>{{=T('or alternatively')}}</em></div>
|
<div id="form6" class="row-fluid" style="display:none">
|
||||||
<div class="span3">{{=file_upload_form('%s/private/' % app, 'private')}}</div>
|
<div class="span3">{{=file_create_form('%s/private/' % app, 'private')}}<em>{{=T('or alternatively')}}</em></div>
|
||||||
</div>
|
<div class="span3">{{=file_upload_form('%s/private/' % app, 'private')}}</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- PLUGINS -->
|
<!-- PLUGINS -->
|
||||||
<h3 id="_plugins" rel="pagebookmark">
|
<h3 id="_plugins" rel="pagebookmark">
|
||||||
<span class="component" onclick="collapse('plugins_inner');">{{=T("Plugins")}}</span>
|
<span class="component" onclick="collapse('plugins_inner');">{{=T("Plugins")}}</span>
|
||||||
<a href="#plugins" rel="tooltip" data-placement="right" data-original-title="{{=T('To create a plugin, name a file/folder plugin_[name]')}}">
|
<a href="#plugins" rel="tooltip" data-placement="span3" data-original-title="{{=T('To create a plugin, name a file/folder plugin_[name]')}}">
|
||||||
{{=helpicon()}}
|
{{=helpicon()}}
|
||||||
<span>{{=T("To create a plugin, name a file/folder plugin_[name]")}}</span>
|
<span>{{=T("To create a plugin, name a file/folder plugin_[name]")}}</span>
|
||||||
</a><span id="plugins" class="hashstick"> </span><a href="#" class="tophashlink btn btn-mini btn-warning"><span>top</span></a>
|
</a><span id="plugins" class="hashstick"> </span><a href="#" class="tophashlink btn btn-mini btn-warning"><span>top</span></a>
|
||||||
@@ -451,10 +458,12 @@ for c in controllers: controller_functions+=[c[:-3]+'/%s.html'%x for x in functi
|
|||||||
<p><strong>{{=T('There are no plugins')}}</strong></p>
|
<p><strong>{{=T('There are no plugins')}}</strong></p>
|
||||||
{{pass}}
|
{{pass}}
|
||||||
<div class="controls formfield">
|
<div class="controls formfield">
|
||||||
<div class="row-fluid">
|
<button onclick="jQuery('#form7').slideToggle()" class="btn btn-mini">Upload</button>
|
||||||
<div class="span3">{{=upload_plugin_form(app, 'plugins')}}</div>
|
<div id="form7" class="row-fluid" style="display:none">
|
||||||
</div>
|
<div class="row-fluid">
|
||||||
</div>
|
<div class="span3">{{=upload_plugin_form(app, 'plugins')}}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|||||||
@@ -132,7 +132,7 @@ jQuery(document).ready(function(){
|
|||||||
<form action="{{=URL('edit',args=filename)}}" method="post" name="editform" id="editform">
|
<form action="{{=URL('edit',args=filename)}}" method="post" name="editform" id="editform">
|
||||||
<div class="editor-bar-column">
|
<div class="editor-bar-column">
|
||||||
<label>{{=T('Save file:')}}</label>
|
<label>{{=T('Save file:')}}</label>
|
||||||
<a value="save" name="save" onclick="return doClickSave();" class="icon saveicon btn btn-mini" style="background-image: -webkit-linear-gradient(top,white,#E6E6E6);">
|
<a value="save" name="save" onclick="return doClickSave();" class="icon saveicon" style="background-image: -webkit-linear-gradient(top,white,#E6E6E6);">
|
||||||
{{=IMG(_src=URL('static', 'images/save_icon.png'), _alt=T('Save'))}}
|
{{=IMG(_src=URL('static', 'images/save_icon.png'), _alt=T('Save'))}}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ def all(items):
|
|||||||
def peekfile(path,file):
|
def peekfile(path,file):
|
||||||
return A(file.replace('\\\\','/'),_href=URL('peek', args=(app, path, file)))
|
return A(file.replace('\\\\','/'),_href=URL('peek', args=(app, path, file)))
|
||||||
def editfile(path,file):
|
def editfile(path,file):
|
||||||
return A(SPAN(T('Edit')),_class='button editbutton btn',_href=URL('edit', args=(app, path, file)))
|
return A(SPAN(T('Edit')),_class='button editbutton btn btn-mini',_href=URL('edit', args=(app, path, file)))
|
||||||
def testfile(path,file):
|
def testfile(path,file):
|
||||||
return A(TAG[''](IMG(_src=URL('static', 'images/test_icon.png'), _alt=T('test')),
|
return A(TAG[''](IMG(_src=URL('static', 'images/test_icon.png'), _alt=T('test')),
|
||||||
SPAN(T("Run tests in this file"))),
|
SPAN(T("Run tests in this file"))),
|
||||||
@@ -16,7 +16,7 @@ def testfile(path,file):
|
|||||||
**{'_data-placement':'right',
|
**{'_data-placement':'right',
|
||||||
'_data-original-title':T("Run tests in this file")})
|
'_data-original-title':T("Run tests in this file")})
|
||||||
def editlanguagefile(path,file):
|
def editlanguagefile(path,file):
|
||||||
return A(SPAN(T('Edit')),_class='button editbutton',_href=URL('edit_language', args=(app, path, file)))
|
return A(SPAN(T('Edit')),_class='button editbutton btn-mini',_href=URL('edit_language', args=(app, path, file)))
|
||||||
def file_upload_form(location):
|
def file_upload_form(location):
|
||||||
form=FORM(T("upload file:")," ",
|
form=FORM(T("upload file:")," ",
|
||||||
INPUT(_type="file",_name="file")," ",T("and rename it:")," ",
|
INPUT(_type="file",_name="file")," ",T("and rename it:")," ",
|
||||||
@@ -220,4 +220,4 @@ for c in controllers: controller_functions+=[c[:-3]+'/%s.html'%x for x in functi
|
|||||||
</ul>
|
</ul>
|
||||||
{{pass}}
|
{{pass}}
|
||||||
</div>
|
</div>
|
||||||
<!-- end "plugin" block -->
|
<!-- end "plugin" block -->
|
||||||
|
|||||||
@@ -3,143 +3,157 @@
|
|||||||
{{block sectionclass}}site{{end}}
|
{{block sectionclass}}site{{end}}
|
||||||
<!-- begin "site" block -->
|
<!-- begin "site" block -->
|
||||||
<div class="row-fluid">
|
<div class="row-fluid">
|
||||||
<div class="applist f60 span7">
|
<div class="applist f60 span7">
|
||||||
<div class="applist_inner">
|
<div class="applist_inner">
|
||||||
<h2>{{=T("Installed applications")}}</h2>
|
<h2>{{=T("Installed applications")}}</h2>
|
||||||
<ul class="unstyled">
|
<table width="100%" class="table">
|
||||||
{{for a in apps:}}
|
{{for a in apps:}}
|
||||||
<li class="application"> <!-- onmouseover="jQuery(this).children('p').show()" onmouseout="jQuery(this).children('p').hide()"-->
|
<tr>{{buttons = []}}
|
||||||
{{if a==request.application:}}
|
<td>
|
||||||
<h3 class="currentapp muted">{{=a}} ({{=T('currently running')}})</h3>
|
{{if a==request.application:}}
|
||||||
<p class="controls row-buttons">
|
<h4 class="currentapp">{{=a}} ({{=T('currently running')}})</h4>
|
||||||
{{else:}}
|
{{else:}}
|
||||||
<h3 class="editableapp muted">{{=A(a,_href=URL(a,'default','index'))}}</h3>
|
<h4 class="editableapp">{{=A(a,_href=URL(a,'default','index'))}}</h4>
|
||||||
{{if MULTI_USER_MODE and db.app(name=a):}}(created by {{="%(first_name)s %(last_name)s" % db.auth_user[db.app(name=a).owner]}}){{pass}}
|
{{if MULTI_USER_MODE and db.app(name=a):}}(created by {{="%(first_name)s %(last_name)s" % db.auth_user[db.app(name=a).owner]}}){{pass}}
|
||||||
<p class="controls row-buttons">
|
{{if not os.path.exists('applications/%s/compiled' % a):}}
|
||||||
{{if not os.path.exists('applications/%s/compiled' % a):}}
|
{{buttons.append((URL('design',args=a), T("Edit")))}}
|
||||||
{{=sp_button(URL('design',args=a), T("Edit"))}}
|
{{else:}}
|
||||||
{{else:}}
|
{{buttons.append((URL(a,'appadmin','index'), T("appadmin")))}}
|
||||||
{{=button(URL(a,'appadmin','index'), T("appadmin"))}}
|
{{pass}}
|
||||||
{{pass}}
|
{{buttons.append((URL('about',args=a), T("About")))}}
|
||||||
{{=button(URL('about',args=a), T("About"))}}
|
{{pass}}
|
||||||
{{pass}}
|
{{buttons.append((URL('errors',args=a), T("Errors")))}}
|
||||||
{{=button(URL('errors',args=a), T("Errors"))}}
|
{{buttons.append((URL('cleanup',args=a), T("Clean")))}}
|
||||||
{{=button(URL('cleanup',args=a), T("Clean"))}}
|
{{buttons.append((URL('pack',args=a), T("Pack all")))}}
|
||||||
{{=button(URL('pack',args=a), T("Pack all"))}}
|
{{if not os.path.exists('applications/%s/compiled' % a):}}
|
||||||
{{if not os.path.exists('applications/%s/compiled' % a):}}
|
{{buttons.append((URL('compile_app',args=a), T("Compile")))}}
|
||||||
{{=button(URL('compile_app',args=a), T("Compile"))}}
|
{{else:}}
|
||||||
{{else:}}
|
{{buttons.append((URL('pack',args=(a, 'compiled')), T("Pack compiled")))}}
|
||||||
{{=button(URL('pack',args=(a, 'compiled')), T("Pack compiled"))}}
|
{{if glob.glob('applications/%s/controllers/*.py' % a):}}
|
||||||
{{if glob.glob('applications/%s/controllers/*.py' % a):}}
|
{{buttons.append((URL('remove_compiled_app',args=a), T("Remove compiled")))}}
|
||||||
{{=button(URL('remove_compiled_app',args=a), T("Remove compiled"))}}
|
{{pass}}
|
||||||
{{pass}}
|
{{pass}}
|
||||||
{{pass}}
|
{{if os.path.exists(os.path.join(apath(r=request),a,'.git')): }}
|
||||||
{{if os.path.exists(os.path.join(apath(r=request),a,'.git')): }}
|
{{buttons.append((URL('git_pull',args=a), T("Git Pull")))}}
|
||||||
{{=button(URL('git_pull',args=a), T("Git Pull"))}}
|
{{buttons.append((URL('git_push',args=a), T("Git Push")))}}
|
||||||
{{=button(URL('git_push',args=a), T("Git Push"))}}
|
{{pass}}
|
||||||
{{pass}}
|
{{if a!=request.application:}}
|
||||||
{{if a!=request.application:}}
|
{{buttons.append((URL('uninstall',args=a), T("Uninstall")))}}
|
||||||
{{=button(URL('uninstall',args=a), T("Uninstall"))}}
|
{{pass}}
|
||||||
{{=button_enable(URL('enable',args=a), a)}}
|
</td>
|
||||||
{{pass}}
|
<td>
|
||||||
</p>
|
<div class="btn-group">
|
||||||
</li>
|
<a class="btn dropdown-toggle" data-toggle="dropdown" href="#">
|
||||||
{{pass}}
|
{{=T('Manage')}}
|
||||||
</ul>
|
<span class="caret"></span>
|
||||||
</div>
|
</a>
|
||||||
</div> <!-- /applist -->
|
<ul class="dropdown-menu">
|
||||||
<div class="sidebar fl60 span5">
|
{{for link,name in buttons:}}
|
||||||
<div class="sidebar_inner controls well well-small">
|
{{=LI(A(name,_href=link))}}
|
||||||
<!-- CHANGE ADMIN PWD -->
|
{{pass}}
|
||||||
<div class="pwdchange pull-right">
|
</ul>
|
||||||
{{if MULTI_USER_MODE:}}
|
</div>
|
||||||
{{=auth.navbar()}}
|
{{=button_enable(URL('enable',args=a), a)}}
|
||||||
{{else:}}
|
</td>
|
||||||
{{=sp_button(URL('change_password'), T('Change admin password'))}}
|
</tr>
|
||||||
{{pass}}
|
{{pass}}
|
||||||
</div> <!-- /CHANGE ADMIN PWD -->
|
</table>
|
||||||
{{if is_manager():}}
|
</div>
|
||||||
<!-- VERSION -->
|
</div> <!-- /applist -->
|
||||||
<div class="box">
|
<div class="sidebar fl60 span5">
|
||||||
<h3>{{=T("Version %s.%s.%s %s (%s)", myversion)}}</h3>
|
<div class="sidebar_inner controls well well-small">
|
||||||
<p id="check_version" class="row-buttons">
|
<!-- CHANGE ADMIN PWD -->
|
||||||
{{if session.check_version:}}
|
<div class="pwdchange pull-right">
|
||||||
{{=T('Checking for upgrades...')}}
|
{{if MULTI_USER_MODE:}}
|
||||||
</p>
|
{{=auth.navbar()}}
|
||||||
<script>ajax('{{=URL('check_version')}}',[],'check_version');</script>
|
{{else:}}
|
||||||
{{session.check_version=False}}
|
{{=sp_button(URL('change_password'), T('Change admin password'))}}
|
||||||
{{else:}}
|
{{=button(URL('default','reload_routes'), T('Reload routes'))}}
|
||||||
{{=button("javascript:ajax('"+URL('check_version')+"',[],'check_version')", T('Check for upgrades'))}}
|
{{pass}}
|
||||||
{{=button(URL('default','reload_routes'), T('Reload routes'))}}
|
</div> <!-- /CHANGE ADMIN PWD -->
|
||||||
</p>
|
{{if is_manager():}}
|
||||||
{{pass}}
|
<!-- VERSION -->
|
||||||
<p>{{=T("Running on %s", request.env.server_software)}}</p>
|
<div class="box">
|
||||||
{{if session.is_mobile=='auto':}}
|
<h4>{{=T("Version")}}</h4>
|
||||||
<p>{{=A(T('Try the mobile interface'),_href=URL('plugin_jqmobile','about'))}}</p>
|
<p>
|
||||||
{{pass}}
|
<tt>{{=myversion}}</tt><br/>
|
||||||
</div> <!-- /VERSION -->
|
({{=T("Running on %s", request.env.server_software)}})
|
||||||
{{pass}}
|
</p>
|
||||||
{{if MULTI_USER_MODE and is_manager():}}
|
<p id="check_version" class="row-buttons">
|
||||||
<!-- MULTI_USER_INTERFACE -->
|
{{if session.check_version:}}
|
||||||
<div class="box">
|
{{=T('Checking for upgrades...')}}
|
||||||
<h3>{{=T("Multi User Mode")}}</h3>
|
<script>ajax('{{=URL('check_version')}}',[],'check_version');</script>
|
||||||
<p class="row-buttons">
|
{{session.check_version=False}}
|
||||||
{{=button(URL('bulk_register'),T('Bulk Register'))}}
|
{{else:}}
|
||||||
{{=button(URL('manage_students',vars={'order':'auth_user.id'}),T('Manage Students'))}}
|
{{=button("javascript:ajax('"+URL('check_version')+"',[],'check_version')", T('Check for upgrades'))}}
|
||||||
</p>
|
{{pass}}
|
||||||
</div> <!-- /MULTI_USER_INTERFACE -->
|
</p>
|
||||||
{{pass}}
|
{{if session.is_mobile=='auto':}}
|
||||||
<!-- APP WIZARD -->
|
<p>{{=A(T('Try the mobile interface'),_href=URL('plugin_jqmobile','about'))}}</p>
|
||||||
<div class="box">
|
{{pass}}
|
||||||
<h3>{{=T("New application wizard")}}</h3>
|
</div> <!-- /VERSION -->
|
||||||
<p>{{=button(URL('wizard','index'), T('Start wizard'))}}
|
{{pass}}
|
||||||
{{=T("(requires internet access)")}}</p>
|
{{if MULTI_USER_MODE and is_manager():}}
|
||||||
</div> <!-- /APP WIZARD -->
|
<!-- MULTI_USER_INTERFACE -->
|
||||||
<!-- SCAFFOLD APP -->
|
<div class="box">
|
||||||
<div class="box">
|
<h4>{{=T("Multi User Mode")}}</h4>
|
||||||
<h3>{{=T("New simple application")}}</h3>
|
<p class="row-buttons">
|
||||||
{{=form_create.custom.begin}}
|
{{=button(URL('bulk_register'),T('Bulk Register'))}}
|
||||||
{{=LABEL(T("Application name:"))}}
|
{{=button(URL('manage_students',vars={'order':'auth_user.id'}),T('Manage Students'))}}
|
||||||
{{=form_create.custom.widget.name}}
|
</p>
|
||||||
<div class="controls"><button type="submit" class="btn">{{=T('Create')}}</button></div>
|
</div> <!-- /MULTI_USER_INTERFACE -->
|
||||||
{{=form_create.custom.end}}
|
{{pass}}
|
||||||
</div> <!-- /SCAFFOLD APP -->
|
<!-- SCAFFOLD APP -->
|
||||||
<!-- UPLOAD PACKAGE -->
|
<div class="box">
|
||||||
<div class="box">
|
<h4>{{=T("New simple application")}}</h4>
|
||||||
<h3>{{=T("Upload and install packed application")}}</h3>
|
{{=form_create.custom.begin}}
|
||||||
{{=form_update.custom.begin}}
|
{{=LABEL(T("Application name:"))}}
|
||||||
<label for="appupdate_name">{{=T("Application name:")}}</label>
|
{{=form_create.custom.widget.name}}
|
||||||
{{=form_update.custom.widget.name}}
|
<div class="controls"><button type="submit" class="btn">{{=T('Create')}}</button></div>
|
||||||
<label for="appupdate_file">{{=T("Upload a package:")}}</label>
|
{{=form_create.custom.end}}
|
||||||
{{=form_update.custom.widget.file}}
|
</div> <!-- /SCAFFOLD APP -->
|
||||||
<label for="appupdate_url">{{=T("Or Get from URL:")}}</label>
|
<!-- UPLOAD PACKAGE -->
|
||||||
{{=form_update.custom.widget.url}}<small class="help-block">({{=T('can be a git repo')}})</small>
|
<div class="box">
|
||||||
<div class="controls">
|
<h4>{{=T("Upload and install packed application")}}</h4>
|
||||||
<label class="checkbox">
|
{{=form_update.custom.begin}}
|
||||||
{{=form_update.custom.widget.overwrite}} {{=T("Overwrite installed app")}}
|
<label for="appupdate_name">{{=T("Application name:")}}</label>
|
||||||
</label>
|
{{=form_update.custom.widget.name}}
|
||||||
<button type="submit" class='btn'>{{=T('Install')}}</button>
|
<label for="appupdate_file">{{=T("Upload a package:")}}</label>
|
||||||
</div>
|
{{=form_update.custom.widget.file}}
|
||||||
{{=form_update.custom.end}}
|
<label for="appupdate_url">{{=T("Or Get from URL:")}}</label>
|
||||||
</div> <!-- /UPLOAD PACKAGE -->
|
{{=form_update.custom.widget.url}}<small class="help-block">({{=T('can be a git repo')}})</small>
|
||||||
<!-- DEPLOY ON GAE -->
|
<div class="controls">
|
||||||
<div class="box">
|
<label class="checkbox">
|
||||||
<h3>{{=T("Deploy")}}</h3>
|
{{=form_update.custom.widget.overwrite}} {{=T("Overwrite installed app")}}
|
||||||
<p class="row-buttons">
|
</label>
|
||||||
{{=button(URL('gae','deploy'), T('Deploy on Google App Engine'))}}
|
<button type="submit" class='btn'>{{=T('Install')}}</button>
|
||||||
{{=button(URL('openshift','deploy'),T('Deploy to OpenShift'))}}
|
</div>
|
||||||
</p>
|
{{=form_update.custom.end}}
|
||||||
</div> <!-- /DEPLOY ON GAE -->
|
</div> <!-- /UPLOAD PACKAGE -->
|
||||||
<br/>
|
<!-- DEPLOY ON GAE -->
|
||||||
{{if TWITTER_HASH:}}
|
<div class="box">
|
||||||
<!-- TWITTER -->
|
<h4>{{=T("Deploy")}}</h4>
|
||||||
<div class="box">
|
<p class="row-buttons">
|
||||||
<h3>{{=T("%s Recent Tweets"%TWITTER_HASH)}}</h3>
|
{{=button(URL('gae','deploy'), T('Deploy on Google App Engine'))}}
|
||||||
<div id="tweets">{{=T('loading...')}}</div>
|
{{=button(URL('openshift','deploy'),T('Deploy to OpenShift'))}}
|
||||||
<script>jQuery(document).ready(function(){jQuery('#tweets').load('{{=URL('twitter.load')}}');});</script>
|
</p>
|
||||||
</div> <!-- /TWITTER -->
|
</div> <!-- /DEPLOY ON GAE -->
|
||||||
{{pass}}
|
<!-- APP WIZARD -->
|
||||||
</div>
|
<div class="box">
|
||||||
</div> <!-- /sidebar -->
|
<h4>{{=T("New application wizard")}}</h4>
|
||||||
|
<p>{{=button(URL('wizard','index'), T('Start wizard'))}}<br/>
|
||||||
|
{{=T("(requires internet access, experimental)")}}</p>
|
||||||
|
</div> <!-- /APP WIZARD -->
|
||||||
|
{{if TWITTER_HASH:}}
|
||||||
|
<!-- TWITTER -->
|
||||||
|
<div class="box">
|
||||||
|
<h4>{{=T("%s Recent Tweets"%TWITTER_HASH)}}</h4>
|
||||||
|
<div id="tweets">{{=T('loading...')}}</div>
|
||||||
|
<script>jQuery(document).ready(function(){jQuery('#tweets').load('{{=URL('twitter.load')}}');});</script>
|
||||||
|
</div> <!-- /TWITTER -->
|
||||||
|
{{pass}}
|
||||||
|
</div>
|
||||||
|
</div> <!-- /sidebar -->
|
||||||
</div> <!-- /row-fluid
|
</div> <!-- /row-fluid
|
||||||
<!-- end "site" block -->
|
<!-- end "site" block -->
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<th>web2py™</th>
|
<th>web2py™</th>
|
||||||
<td>{{=myversion}}</td>
|
<td>Version {{=myversion}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{{if snapshot:}}
|
{{if snapshot:}}
|
||||||
<tr>
|
<tr>
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
<title>{{=response.title or URL()}}</title>
|
<title>{{=response.title or URL()}}</title>
|
||||||
{{
|
{{
|
||||||
response.files.append(URL('static','css/bootstrap.min.css'))
|
response.files.append(URL('static','css/bootstrap.min.css'))
|
||||||
|
#response.files.append(URL('static','css/styles.css'))
|
||||||
response.files.append(URL('static','css/bootstrap_essentials.css'))
|
response.files.append(URL('static','css/bootstrap_essentials.css'))
|
||||||
# response.files.append(URL('static','css/bootstrap_adapters.css'))
|
# response.files.append(URL('static','css/bootstrap_adapters.css'))
|
||||||
response.files.append(URL('static','css/bootstrap-responsive.min.css'))
|
response.files.append(URL('static','css/bootstrap-responsive.min.css'))
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ for application "{{=request.args[0]}}"</h2>
|
|||||||
<h3>Commit form</h3>
|
<h3>Commit form</h3>
|
||||||
{{=form}}
|
{{=form}}
|
||||||
|
|
||||||
|
|
||||||
{{if repo['.'].rev()>=0:}}
|
{{if repo['.'].rev()>=0:}}
|
||||||
<h3>Last Revision</h3>
|
<h3>Last Revision</h3>
|
||||||
<table>
|
<table>
|
||||||
|
|||||||
@@ -76,8 +76,7 @@ def license():
|
|||||||
|
|
||||||
|
|
||||||
def version():
|
def version():
|
||||||
return 'Version %s.%s.%s (%s) %s' % request.env.web2py_version
|
return 'Version '+request.env.web2py_version
|
||||||
|
|
||||||
|
|
||||||
@cache('examples', time_expire=cache_expire)
|
@cache('examples', time_expire=cache_expire)
|
||||||
def examples():
|
def examples():
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ random.shuffle(quotes)
|
|||||||
|
|
||||||
<h3>WEB2PY<sup>TM</sup> WEB FRAMEWORK</h3>
|
<h3>WEB2PY<sup>TM</sup> WEB FRAMEWORK</h3>
|
||||||
<p>Free open source full-stack framework for rapid development of fast, scalable, <a href="http://www.web2py.com/book/default/chapter/01#security" target="_blank">secure</a> and portable database-driven web-based applications. Written and programmable in <a href="http://www.python.org" target="_blank">Python</a>. <a href="http://www.gnu.org/licenses/lgpl.html">LGPLv3 License</a>.
|
<p>Free open source full-stack framework for rapid development of fast, scalable, <a href="http://www.web2py.com/book/default/chapter/01#security" target="_blank">secure</a> and portable database-driven web-based applications. Written and programmable in <a href="http://www.python.org" target="_blank">Python</a>. <a href="http://www.gnu.org/licenses/lgpl.html">LGPLv3 License</a>.
|
||||||
Current version: {{="%s.%s.%s (%s) %s" % request.env.web2py_version}}</p>
|
Current version: <a href="{{=URL('download')}}">{{=request.env.web2py_version}}</strong></p>
|
||||||
|
|
||||||
{{block extra}}
|
{{block extra}}
|
||||||
<div class="container aboutW2P">
|
<div class="container aboutW2P">
|
||||||
|
|||||||
+8
-4
@@ -373,12 +373,16 @@ def check_new_version(myversion, version_URL):
|
|||||||
the most up-to-version available
|
the most up-to-version available
|
||||||
"""
|
"""
|
||||||
try:
|
try:
|
||||||
from urllib import urlopen
|
from urllib import urlopen
|
||||||
version = parse_version(urlopen(version_URL).read())
|
version = urlopen(version_URL).read()
|
||||||
except Exception:
|
pversion = parse_version(version)
|
||||||
|
pmyversion = parse_version(myversion)
|
||||||
|
except Exception,e:
|
||||||
|
import traceback
|
||||||
|
print traceback.format_exc()
|
||||||
return -1, myversion
|
return -1, myversion
|
||||||
|
|
||||||
if version > myversion:
|
if pversion[:3]+pversion[-6:] > pmyversion[:3]+pmyversion[-6:]:
|
||||||
return True, version
|
return True, version
|
||||||
else:
|
else:
|
||||||
return False, version
|
return False, version
|
||||||
|
|||||||
+2
-2
@@ -47,8 +47,8 @@ __all__ = [
|
|||||||
|
|
||||||
def parse_semantic(version="Version 1.99.0-rc.1+timestamp.2011.09.19.08.23.26"):
|
def parse_semantic(version="Version 1.99.0-rc.1+timestamp.2011.09.19.08.23.26"):
|
||||||
"http://semver.org/"
|
"http://semver.org/"
|
||||||
re_version = re.compile('Version (\d+)\.(\d+)\.(\d+)(\-(?P<pre>[^\s+]*))?(\+(?P<build>\S*))')
|
re_version = re.compile('(\d+)\.(\d+)\.(\d+)(\-(?P<pre>[^\s+]*))?(\+(?P<build>\S*))')
|
||||||
m = re_version.match(version)
|
m = re_version.match(version.strip().split()[-1])
|
||||||
if not m:
|
if not m:
|
||||||
return None
|
return None
|
||||||
a, b, c = int(m.group(1)), int(m.group(2)), int(m.group(3))
|
a, b, c = int(m.group(1)), int(m.group(2)), int(m.group(3))
|
||||||
|
|||||||
+6
-8
@@ -102,16 +102,14 @@ requests = 0 # gc timer
|
|||||||
# pattern used to validate client address
|
# pattern used to validate client address
|
||||||
regex_client = re.compile('[\w\-:]+(\.[\w\-]+)*\.?') # ## to account for IPV6
|
regex_client = re.compile('[\w\-:]+(\.[\w\-]+)*\.?') # ## to account for IPV6
|
||||||
|
|
||||||
#try:
|
try:
|
||||||
if 1:
|
|
||||||
version_info = open(pjoin(global_settings.gluon_parent, 'VERSION'), 'r')
|
version_info = open(pjoin(global_settings.gluon_parent, 'VERSION'), 'r')
|
||||||
raw_version_string = version_info.read().strip()
|
raw_version_string = version_info.read().split()[-1].strip()
|
||||||
version_info.close()
|
version_info.close()
|
||||||
global_settings.web2py_version = parse_version(raw_version_string)
|
global_settings.web2py_version = raw_version_string
|
||||||
#except:
|
web2py_version = global_settings.web2py_version
|
||||||
# raise RuntimeError("Cannot determine web2py version")
|
except:
|
||||||
|
raise RuntimeError("Cannot determine web2py version")
|
||||||
web2py_version = global_settings.web2py_version
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import rocket
|
import rocket
|
||||||
|
|||||||
Reference in New Issue
Block a user