diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 00000000..b7353733 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,35 @@ +--- +name: Bug report +about: Create a report to help us improve + +--- + +**Describe the bug** +A clear and concise description of what the bug is. + +**To Reproduce** +Steps to reproduce the behavior: +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See error + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Screenshots** +If applicable, add screenshots to help explain your problem. + +**Desktop (please complete the following information):** + - OS: [e.g. iOS] + - Browser [e.g. chrome, safari] + - Version [e.g. 22] + +**Smartphone (please complete the following information):** + - Device: [e.g. iPhone6] + - OS: [e.g. iOS8.1] + - Browser [e.g. stock browser, safari] + - Version [e.g. 22] + +**Additional context** +Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 00000000..066b2d92 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,17 @@ +--- +name: Feature request +about: Suggest an idea for this project + +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. diff --git a/CHANGELOG b/CHANGELOG index 4869fb15..dce31fbf 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,4 +1,4 @@ -## 2.17.1 +## 2.17.1-2 - pydal 18.08 - many small bug fixes diff --git a/Makefile b/Makefile index 870c51f9..0f9c530f 100644 --- a/Makefile +++ b/Makefile @@ -44,7 +44,7 @@ rmfiles: rm -rf applications/examples/uploads/* src: ### Use semantic versioning - echo 'Version 2.17.1-stable+timestamp.'`date +%Y.%m.%d.%H.%M.%S` > VERSION + echo 'Version 2.17.2-stable+timestamp.'`date +%Y.%m.%d.%H.%M.%S` > VERSION ### rm -f all junk files #make clean # make rmfiles diff --git a/VERSION b/VERSION index 5cb3e1ea..fe799f43 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.17.1-stable+timestamp.2018.08.05.17.57.00 +Version 2.17.2-stable+timestamp.2018.10.06.11.34.06 diff --git a/anyserver.py b/anyserver.py index b935a1ed..261dd422 100644 --- a/anyserver.py +++ b/anyserver.py @@ -212,16 +212,16 @@ def mongrel2_handler(application, conn, debug=False): while True: if debug: - print "WAITING FOR REQUEST" + print("WAITING FOR REQUEST") # receive a request req = conn.recv() if debug: - print "REQUEST BODY: %r\n" % req.body + print("REQUEST BODY: %r\n" % req.body) if req.is_disconnect(): if debug: - print "DISCONNECT" + print("DISCONNECT") continue # effectively ignore the disconnect from the client # Set a couple of environment attributes a.k.a. header attributes @@ -247,7 +247,7 @@ def mongrel2_handler(application, conn, debug=False): environ['wsgi.input'] = req.body if debug: - print "ENVIRON: %r\n" % environ + print("ENVIRON: %r\n" % environ) # SimpleHandler needs file-like stream objects for # requests, errors and responses @@ -282,10 +282,10 @@ def mongrel2_handler(application, conn, debug=False): # return the response if debug: - print "RESPONSE: %r\n" % response + print("RESPONSE: %r\n" % response) if errors: if debug: - print "ERRORS: %r" % errors + print("ERRORS: %r" % errors) data = "%s\r\n\r\n%s" % (data, errors) conn.reply_http( req, data, code=code, status=status, headers=headers) @@ -355,8 +355,8 @@ def main(): dest='workers', help='number of workers number') (options, args) = parser.parse_args() - print 'starting %s on %s:%s...' % ( - options.server, options.ip, options.port) + print('starting %s on %s:%s...' % ( + options.server, options.ip, options.port)) run(options.server, options.ip, options.port, logging=options.logging, profiler=options.profiler_dir, options=options) diff --git a/applications/admin/controllers/default.py b/applications/admin/controllers/default.py index 28198d2a..4a142f22 100644 --- a/applications/admin/controllers/default.py +++ b/applications/admin/controllers/default.py @@ -562,7 +562,11 @@ def enable(): os.unlink(filename) return SPAN(T('Disable'), _style='color:green') else: - safe_open(filename, 'wb').write('disabled: True\ntime-disabled: %s' % request.now) + if PY2: + safe_open(filename, 'wb').write('disabled: True\ntime-disabled: %s' % request.now) + else: + str_ = 'disabled: True\ntime-disabled: %s' % request.now + safe_open(filename, 'wb').write(str_.encode('utf-8')) return SPAN(T('Enable'), _style='color:red') @@ -642,7 +646,10 @@ def edit(): # show settings tab and save prefernces if 'settings' in request.vars: if request.post_vars: # save new preferences - post_vars = request.post_vars.items() + if PY2: + post_vars = request.post_vars.items() + else: + post_vars = list(request.post_vars.items()) # Since unchecked checkbox are not serialized, we must set them as false by hand to store the correct preference in the settings post_vars += [(opt, 'false') for opt in preferences if opt not in request.post_vars] if config.save(post_vars): diff --git a/applications/admin/static/js/web2py_bootstrap.js b/applications/admin/static/js/web2py_bootstrap.js index 7206cb1b..abf6d1c7 100644 --- a/applications/admin/static/js/web2py_bootstrap.js +++ b/applications/admin/static/js/web2py_bootstrap.js @@ -29,5 +29,14 @@ jQuery(function(){ } hoverMenu(); // first page load jQuery(window).resize(hoverMenu); // on resize event - jQuery('ul.nav li.dropdown a').click(function(){window.location=jQuery(this).attr('href');}); + jQuery('ul.nav li.dropdown a').click(function(){ + if(jQuery(this).attr("target")){ + window.open( + jQuery(this).attr('href'), + jQuery(this).attr('target') // <- This is what makes it open in a new window. + ); + } else { + window.location=jQuery(this).attr('href'); + } + }); }); diff --git a/applications/examples/views/default/download.html b/applications/examples/views/default/download.html index c1ecdec5..d8df3871 100644 --- a/applications/examples/views/default/download.html +++ b/applications/examples/views/default/download.html @@ -62,16 +62,16 @@

- The source code version works on all supported platforms, including Linux, but it requires Python 2.6, or 2.7 (recommended). - It runs on Windows and most Unix systems, including Linux and BSD. + The source code version works on Windows and most Unix systems, including Linux, BSD and Mac . It requires Python 2.6 (no more supported), Python 2.7 (stable) or Python 3.5+ (recommended for new projects) already installed on your system. + There are also binary packages for Windows and Mac OS X. They include the Python 2.7 interpreter so you do not need to have it pre-installed.

Instructions

-

After download, unzip it and click on web2py.exe (windows) or web2py.app (osx). - To run from source, type:

-{{=CODE("python2.7 web2py.py", language=None, counter='>', _class='boxCode')}} +

With the binary packages, after download, just unzip it and then click on web2py.exe (windows) or web2py.app (osx). + If you prefer to run it from source with your own Python interpreter alreay installed, type:

+{{=CODE("python web2py.py", language=None, counter='>', _class='boxCode')}}

or for more info type:

-{{=CODE("python2.7 web2py.py -h", language=None, counter='>', _class='boxCode')}} +{{=CODE("python web2py.py -h", language=None, counter='>', _class='boxCode')}}

Caveats

diff --git a/applications/examples/views/default/index.html b/applications/examples/views/default/index.html index 19708c79..735ee4cc 100644 --- a/applications/examples/views/default/index.html +++ b/applications/examples/views/default/index.html @@ -4,7 +4,7 @@

Web Framework

-

Free open source full-stack framework for rapid development of fast, scalable, secure and portable database-driven web-based applications. Written and programmable in Python.

+

Free open source full-stack framework for rapid development of fast, scalable, secure and portable database-driven web-based applications. Written and programmable in Python (version 3 and 2.7).

diff --git a/applications/welcome/static/css/web2py-bootstrap4.css b/applications/welcome/static/css/web2py-bootstrap4.css index 2586fe99..2a8348c9 100644 --- a/applications/welcome/static/css/web2py-bootstrap4.css +++ b/applications/welcome/static/css/web2py-bootstrap4.css @@ -348,3 +348,13 @@ td.w2p_fc, .icon.pen:before { content: "\f040";} .icon.arrowright:before { content: "\f061";} .icon.magnifier:before { content: "\f002";} + +.web2py_table_selectable_actions { + padding-top: 10px; + float: right; +} + +.web2py_table_selectable_actions input { + padding: 5px 7px; + margin-right: 10px; +} diff --git a/applications/welcome/static/js/web2py-bootstrap4.js b/applications/welcome/static/js/web2py-bootstrap4.js index 91f3d8ff..6d42fb4b 100644 --- a/applications/welcome/static/js/web2py-bootstrap4.js +++ b/applications/welcome/static/js/web2py-bootstrap4.js @@ -52,7 +52,7 @@ }); } var ul = this; - $(ul).find(":text").addClass('form-control').wrap("
").after('
').keypress(function(e) { + $(ul).find(":text").addClass('form-control').wrap("
").after('
 
').keypress(function(e) { return (e.which == 13) ? pe(ul, e) : true; }).next().click(function(e) { pe(ul, e); diff --git a/applications/welcome/views/default/index.html b/applications/welcome/views/default/index.html index 9107d644..61a53cbf 100644 --- a/applications/welcome/views/default/index.html +++ b/applications/welcome/views/default/index.html @@ -1,7 +1,7 @@ {{extend 'layout.html'}} {{block header}} -
+

/{{=request.application}}/{{=request.controller}}/{{=request.function}}

diff --git a/applications/welcome/views/layout.html b/applications/welcome/views/layout.html index 5643dfdf..d26d052e 100644 --- a/applications/welcome/views/layout.html +++ b/applications/welcome/views/layout.html @@ -35,7 +35,7 @@
{{=response.flash or ''}}
-
@@ -18,7 +18,7 @@ - +