Commit Graph
25 Commits
Author SHA1 Message Date
Tim NyborgandGitHub 66ae2a5a7f limit widget rebuilding on form error to ListWidget 2019-10-09 16:21:25 +01:00
Tim NyborgandGitHub 2b30157cce Update redis_cache.py
moving logging as well
2019-09-25 11:06:23 +01:00
Tim NyborgandGitHub 89c392d224 correcting indentation 2019-09-17 14:48:15 +01:00
Tim NyborgandGitHub 75491fb273 python3 compatibility for JSONRPCError
Trying this again, now that I learned about gluon._compat
2019-08-23 12:25:11 +01:00
Tim NyborgandGitHub 2e8a8a62f9 fix error block location in radio buttons
Currently, radio widget error messages appear between the final checkbox and the final label.  Instead, use CheckboxesWidget's invisible input method to display errors on radio widgets.
2019-06-17 12:13:15 +01:00
Tim NyborgandGitHub 99d3d1d465 prevent open redirects with no protocol specified
prevent_open_redirect doesn't currently handle a 'next' with a // but no protocol, e.g.: .../user/login?_next=//google.com
2019-05-20 11:27:21 +01:00
Tim NyborgandGitHub 3f15d1ceb8 correct SAML authorization request binding
AuthnRequest cannot use BINDING_HTTP_REDIRECT, according to the SAML v2 specifications.  See:
https://github.com/IdentityPython/pysaml2/issues/163
2019-05-07 09:09:56 +01:00
Tim NyborgandGitHub 77a5c01ac9 Allow custom json encoder
This lets an application use a custom JSONEncoder when making jsonrpc calls (to automatically handle, say, serialization of datetime, or Decimal, or custom classes).

e.g.:
    
import json, datetime, decimal
class ExtendedEncoder(json.JSONEncoder):
    def default(self, obj):
        if isinstance(obj, datetime.datetime):
            return obj.isoformat()
        if isinstance(obj, decimal.Decimal):
            return str(obj)
        return super(ExtendedEncoder, self).default(obj)
    
api = ServerProxy(address, version='2.0', encoder=ExtendedEncoder)
2018-10-29 15:16:28 +00:00
Tim NyborgandGitHub aca4947927 fix selectable breaking with custom formstyle
the recently added elif results in a 'function is not iterable' exception if you have a custom formstyle function
2018-10-19 16:36:13 +01:00
Tim NyborgandGitHub 5d9f17d414 correct rendering of jsonrpcerrors
Currently, JSONRPCErrors get spit into a console or ticket one line per character (due to the  '\n'.join(data) applying to a string).  This fixes that issue while preserving new lines for arrays.
2018-10-09 10:51:38 +01:00
Tim NyborgandGitHub 072311fd2c Revert
Committed in error
2018-02-02 11:23:48 +00:00
Tim NyborgandGitHub 5dcbae0b37 Update saml2_auth.py
Pass along any _next url var as part of the outstanding queries, so web2py will know where to send the user once they come back from singing on.  

Useful if the SAML auth is part of a CAS, because otherwise the user is sent from the CAS consumer -> CAS -> SSO -> CAS, and is never returned to the consumer application
2018-02-02 11:03:04 +00:00
Tim NyborgandGitHub 76f3384aae Allow choosing a saml entityid
Allows you to pick an entityid when using federation XML data or an MDQ with many entries.  Pysaml2's MDQ metadata is loaded lazily, after you provide a key, so it's necessary to pass the entityid as a key
2018-02-01 14:04:47 +00:00
Tim NyborgandGitHub b732ab6d53 Update SQLFORM deleted = False if readonly
fixes the following syntax:

form = SQLFORM(table, record, readonly=readonly, deletable=True)

form.process()

if form.deleted:
   pass
elif form.accepted:
   pass
2017-11-17 16:53:27 +00:00
Tim NyborgandGitHub 2e6f529dfd Fix setting 'ac' in request.vars 2017-10-12 17:18:06 +01:00
Tim NyborgandGitHub 0ae3ee506f Merge pull request #1 from web2py/master
rebase
2017-10-12 17:16:56 +01:00
Tim NyborgandGitHub d43604c3ff List comprehension rather than loop
I've now learned this is quicker
2017-07-24 10:15:12 +01:00
Tim NyborgandGitHub ec21f72ce3 Fixes #1691
Clone fields, but leave tables untouched in factory()
2017-07-21 10:20:08 +01:00
Tim Nyborg b942fc8f7a Fix IS_NOT_IN_DB to work with custom primarykey
Validator currently selects custom id properly, but then explicitly checks .id
2015-12-03 15:02:21 +00:00
Tim Nyborg 1b77c2294a Fix grid count when using groupby on MSSQL
Any query like SELECT COUNT(*) from (SELECT COUNT(*) FROM ...) will fail with 'No column name was specified for column 1 of '_tmp'', so I'm providing an alias for the subquery's field
2015-11-30 16:09:53 +00:00
Tim Nyborg 5030d3144f Update simplejsonrpc.py
Default best placed in method signature, 
Thanks to cassiobotaro for pointing it out
2015-08-19 11:59:40 +01:00
Tim Nyborg 5ee8c9c930 simplejsonrpc: Fix TypeError when data is none 2015-07-27 12:07:26 +01:00
Tim Nyborg 23ee6bd2cf Update rewrite.py 2014-12-16 12:00:23 +00:00
Tim Nyborg c0536d3b74 Allow map_hyphen to work for application names
1. Handle hyphen -> underscore replacement of the app name early in map_app(), so the application can be identified and its routing rules used (if they exist).  Without this, the rewriter fails to find the application with the hyphen in place, and reverts to the default.

2. Disable underscore -> hyphen mapping of app name when creating static URLs, as they will be invalid paths
2014-12-16 11:47:33 +00:00
timnyborg 886f84778c Update sqlhtml.py
Correcting some bootstrap3 icon classes
2014-12-15 11:03:47 +00:00