Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
853beae9c6 | ||
|
|
94aab906d5 | ||
|
|
bb3909a944 | ||
|
|
99087ab37a | ||
|
|
4bcd905f4f | ||
|
|
83bda542ad | ||
|
|
1ea27f7f15 | ||
|
|
7fa8f1fa08 | ||
|
|
95b54857a3 |
@@ -1,4 +1,4 @@
|
|||||||
## 2.9.6-2.9.7
|
## 2.9.6 - 2.9.8
|
||||||
|
|
||||||
- fixed support of GAE + SQL
|
- fixed support of GAE + SQL
|
||||||
- fixed a typo in the license of some login_methods code. It is now LGPL consistently with the rest of the web2py code. This change applied to all previous web2py versions.
|
- fixed a typo in the license of some login_methods code. It is now LGPL consistently with the rest of the web2py code. This change applied to all previous web2py versions.
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ update:
|
|||||||
echo "remember that pymysql was tweaked"
|
echo "remember that pymysql was tweaked"
|
||||||
src:
|
src:
|
||||||
### Use semantic versioning
|
### Use semantic versioning
|
||||||
echo 'Version 2.9.7-stable+timestamp.'`date +%Y.%m.%d.%H.%M.%S` > VERSION
|
echo 'Version 2.9.9-stable+timestamp.'`date +%Y.%m.%d.%H.%M.%S` > VERSION
|
||||||
### rm -f all junk files
|
### rm -f all junk files
|
||||||
make clean
|
make clean
|
||||||
### clean up baisc apps
|
### clean up baisc apps
|
||||||
|
|||||||
+4
-1
@@ -6,7 +6,6 @@ It is written and programmable in Python. LGPLv3 License
|
|||||||
|
|
||||||
Learn more at http://web2py.com
|
Learn more at http://web2py.com
|
||||||
|
|
||||||
|
|
||||||
## Google App Engine deployment
|
## Google App Engine deployment
|
||||||
|
|
||||||
cp examples/app.yaml ./
|
cp examples/app.yaml ./
|
||||||
@@ -14,6 +13,10 @@ Learn more at http://web2py.com
|
|||||||
|
|
||||||
Then edit ./app.yaml and replace "yourappname" with yourappname.
|
Then edit ./app.yaml and replace "yourappname" with yourappname.
|
||||||
|
|
||||||
|
## Documentation (readthedocs.org)
|
||||||
|
|
||||||
|
[](http://web2py.rtfd.org/)
|
||||||
|
|
||||||
## Tests
|
## Tests
|
||||||
|
|
||||||
[](https://travis-ci.org/web2py/web2py)
|
[](https://travis-ci.org/web2py/web2py)
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
Version 2.9.7-stable+timestamp.2014.09.04.22.37.07
|
Version 2.9.9-stable+timestamp.2014.09.08.08.12.34
|
||||||
|
|||||||
@@ -545,8 +545,11 @@
|
|||||||
};
|
};
|
||||||
$('[data-show-trigger]', target).each(function () {
|
$('[data-show-trigger]', target).each(function () {
|
||||||
var name = $(this).attr('data-show-trigger');
|
var name = $(this).attr('data-show-trigger');
|
||||||
|
// The field exists only when creating/editing a row
|
||||||
|
if ($('#' + name).length) {
|
||||||
if(!triggers[name]) triggers[name] = [];
|
if(!triggers[name]) triggers[name] = [];
|
||||||
triggers[name].push($(this).attr('id'));
|
triggers[name].push($(this).attr('id'));
|
||||||
|
}
|
||||||
});
|
});
|
||||||
for(var name in triggers) {
|
for(var name in triggers) {
|
||||||
$('#' + name, target).change(show_if).keyup(show_if);
|
$('#' + name, target).change(show_if).keyup(show_if);
|
||||||
|
|||||||
@@ -545,8 +545,11 @@
|
|||||||
};
|
};
|
||||||
$('[data-show-trigger]', target).each(function () {
|
$('[data-show-trigger]', target).each(function () {
|
||||||
var name = $(this).attr('data-show-trigger');
|
var name = $(this).attr('data-show-trigger');
|
||||||
|
// The field exists only when creating/editing a row
|
||||||
|
if ($('#' + name).length) {
|
||||||
if(!triggers[name]) triggers[name] = [];
|
if(!triggers[name]) triggers[name] = [];
|
||||||
triggers[name].push($(this).attr('id'));
|
triggers[name].push($(this).attr('id'));
|
||||||
|
}
|
||||||
});
|
});
|
||||||
for(var name in triggers) {
|
for(var name in triggers) {
|
||||||
$('#' + name, target).change(show_if).keyup(show_if);
|
$('#' + name, target).change(show_if).keyup(show_if);
|
||||||
|
|||||||
@@ -545,8 +545,11 @@
|
|||||||
};
|
};
|
||||||
$('[data-show-trigger]', target).each(function () {
|
$('[data-show-trigger]', target).each(function () {
|
||||||
var name = $(this).attr('data-show-trigger');
|
var name = $(this).attr('data-show-trigger');
|
||||||
|
// The field exists only when creating/editing a row
|
||||||
|
if ($('#' + name).length) {
|
||||||
if(!triggers[name]) triggers[name] = [];
|
if(!triggers[name]) triggers[name] = [];
|
||||||
triggers[name].push($(this).attr('id'));
|
triggers[name].push($(this).attr('id'));
|
||||||
|
}
|
||||||
});
|
});
|
||||||
for(var name in triggers) {
|
for(var name in triggers) {
|
||||||
$('#' + name, target).change(show_if).keyup(show_if);
|
$('#' + name, target).change(show_if).keyup(show_if);
|
||||||
|
|||||||
+3
-1
@@ -20,7 +20,7 @@ import datetime
|
|||||||
import logging
|
import logging
|
||||||
from http import HTTP
|
from http import HTTP
|
||||||
from gzip import open as gzopen
|
from gzip import open as gzopen
|
||||||
|
from recfile import generate
|
||||||
|
|
||||||
__all__ = [
|
__all__ = [
|
||||||
'parse_version',
|
'parse_version',
|
||||||
@@ -400,6 +400,8 @@ def get_session(request, other_application='admin'):
|
|||||||
session_id = request.cookies['session_id_' + other_application].value
|
session_id = request.cookies['session_id_' + other_application].value
|
||||||
session_filename = os.path.join(
|
session_filename = os.path.join(
|
||||||
up(request.folder), other_application, 'sessions', session_id)
|
up(request.folder), other_application, 'sessions', session_id)
|
||||||
|
if not os.path.exists(session_filename):
|
||||||
|
session_filename = generate(session_filename)
|
||||||
osession = storage.load_storage(session_filename)
|
osession = storage.load_storage(session_filename)
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
osession = storage.Storage()
|
osession = storage.Storage()
|
||||||
|
|||||||
@@ -1,12 +1,18 @@
|
|||||||
import os, uuid
|
import os, uuid
|
||||||
|
|
||||||
def generate(filename, depth=2, base=512):
|
def generate(filename, depth=2, base=512):
|
||||||
|
if os.path.sep in filename:
|
||||||
|
path, filename = os.path.split(filename)
|
||||||
|
else:
|
||||||
|
path = None
|
||||||
dummyhash = sum(ord(c)*256**(i % 4) for i,c in enumerate(filename)) % base**depth
|
dummyhash = sum(ord(c)*256**(i % 4) for i,c in enumerate(filename)) % base**depth
|
||||||
folders = []
|
folders = []
|
||||||
for level in range(depth-1,-1,-1):
|
for level in range(depth-1,-1,-1):
|
||||||
code, dummyhash = divmod(dummyhash, base**level)
|
code, dummyhash = divmod(dummyhash, base**level)
|
||||||
folders.append("%03x" % code)
|
folders.append("%03x" % code)
|
||||||
folders.append(filename)
|
folders.append(filename)
|
||||||
|
if path:
|
||||||
|
folders.insert(0,path)
|
||||||
return os.path.join(*folders)
|
return os.path.join(*folders)
|
||||||
|
|
||||||
def exists(filename, path=None):
|
def exists(filename, path=None):
|
||||||
|
|||||||
+1
-1
@@ -1289,7 +1289,7 @@ class SQLFORM(FORM):
|
|||||||
xfields.append(
|
xfields.append(
|
||||||
(self.FIELDKEY_DELETE_RECORD + SQLFORM.ID_ROW_SUFFIX,
|
(self.FIELDKEY_DELETE_RECORD + SQLFORM.ID_ROW_SUFFIX,
|
||||||
LABEL(
|
LABEL(
|
||||||
T(delete_label), separator,
|
T(delete_label), sep,
|
||||||
_for=self.FIELDKEY_DELETE_RECORD,
|
_for=self.FIELDKEY_DELETE_RECORD,
|
||||||
_id=self.FIELDKEY_DELETE_RECORD + \
|
_id=self.FIELDKEY_DELETE_RECORD + \
|
||||||
SQLFORM.ID_LABEL_SUFFIX),
|
SQLFORM.ID_LABEL_SUFFIX),
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ Provides:
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
import cPickle
|
import cPickle
|
||||||
|
import copy_reg
|
||||||
import gluon.portalocker as portalocker
|
import gluon.portalocker as portalocker
|
||||||
|
|
||||||
__all__ = ['List', 'Storage', 'Settings', 'Messages',
|
__all__ = ['List', 'Storage', 'Settings', 'Messages',
|
||||||
@@ -129,6 +130,12 @@ class Storage(dict):
|
|||||||
values = self.getlist(key)
|
values = self.getlist(key)
|
||||||
return values[-1] if values else default
|
return values[-1] if values else default
|
||||||
|
|
||||||
|
|
||||||
|
def pickle_storage(s):
|
||||||
|
return Storage, (dict(s),)
|
||||||
|
|
||||||
|
copy_reg.pickle(Storage, pickle_storage)
|
||||||
|
|
||||||
PICKABLE = (str, int, long, float, bool, list, dict, tuple, set)
|
PICKABLE = (str, int, long, float, bool, list, dict, tuple, set)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+2
-1
@@ -2710,7 +2710,8 @@ class Auth(object):
|
|||||||
extra_fields = [
|
extra_fields = [
|
||||||
Field("password_two", "password", requires=IS_EQUAL_TO(
|
Field("password_two", "password", requires=IS_EQUAL_TO(
|
||||||
request.post_vars.get(passfield,None),
|
request.post_vars.get(passfield,None),
|
||||||
error_message=self.messages.mismatched_password))]
|
error_message=self.messages.mismatched_password),
|
||||||
|
label=current.T("Confirm Password"))]
|
||||||
else:
|
else:
|
||||||
extra_fields = []
|
extra_fields = []
|
||||||
form = SQLFORM(table_user,
|
form = SQLFORM(table_user,
|
||||||
|
|||||||
@@ -29,6 +29,12 @@ Typical usage:
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
from __future__ import with_statement
|
from __future__ import with_statement
|
||||||
|
|
||||||
|
import sys
|
||||||
|
import os
|
||||||
|
print os.path.join(*__file__.split(os.sep)[:-2] or ['.'])
|
||||||
|
sys.path.append(os.path.join(*__file__.split(os.sep)[:-2] or ['.']))
|
||||||
|
|
||||||
from gluon import current
|
from gluon import current
|
||||||
from gluon.storage import Storage
|
from gluon.storage import Storage
|
||||||
from optparse import OptionParser
|
from optparse import OptionParser
|
||||||
@@ -37,6 +43,7 @@ import datetime
|
|||||||
import os
|
import os
|
||||||
import stat
|
import stat
|
||||||
import time
|
import time
|
||||||
|
import glob
|
||||||
|
|
||||||
EXPIRATION_MINUTES = 60
|
EXPIRATION_MINUTES = 60
|
||||||
SLEEP_MINUTES = 5
|
SLEEP_MINUTES = 5
|
||||||
@@ -157,6 +164,9 @@ class SessionFile(object):
|
|||||||
def delete(self):
|
def delete(self):
|
||||||
try:
|
try:
|
||||||
os.unlink(self.filename)
|
os.unlink(self.filename)
|
||||||
|
path = os.path.dirname(filename)
|
||||||
|
if not path.endswith('sessions') and len(os.listdir(path))==0:
|
||||||
|
os.rmdir(path)
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@@ -191,10 +201,11 @@ def single_loop(expiration=None, force=False, verbose=False):
|
|||||||
except:
|
except:
|
||||||
expiration = EXPIRATION_MINUTES * 60
|
expiration = EXPIRATION_MINUTES * 60
|
||||||
|
|
||||||
set_db = SessionSetDb(expiration, force, verbose)
|
|
||||||
set_files = SessionSetFiles(expiration, force, verbose)
|
set_files = SessionSetFiles(expiration, force, verbose)
|
||||||
set_db.trash()
|
|
||||||
set_files.trash()
|
set_files.trash()
|
||||||
|
set_db = SessionSetDb(expiration, force, verbose)
|
||||||
|
set_db.trash()
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
"""Main processing."""
|
"""Main processing."""
|
||||||
|
|||||||
Reference in New Issue
Block a user