585 Commits
Author SHA1 Message Date
erbalitoandGitHub 178f48799a Merge branch 'master' into master 2018-11-26 11:46:59 -03:00
erbalitoandGitHub 9d8fce0687 fixes #2058
I've modified redis_cache.py to be able to optionally provide an application name to RedisCache constructor. This makes possible to share cache between different web2py applications if needed.
2018-11-21 09:40:19 -03:00
mdipierroandGitHub f119f1fcb2 Merge pull request #2053 from boriscougar/patch-1
redis_scheduler failing
2018-11-18 11:09:26 -08:00
erbalitoandGitHub 66f6549817 Update redis_cache.py to allow sharing cache between different applications
I'm not sure if this would help someone else. I've always had this scenario where some of my web2py applications share the models, and therefore, need to share the cache (I use Redis). In the past I've asked if there was any possibility to share cache between applications, but I got no answers:
https://groups.google.com/forum/#!searchin/web2py/share$20cache$20application%7Csort:date/web2py/iNCzMq8ADnw/ufyPBWajBQAJ

Anyway, I've noticed that I could make a simple change to redis_cache.py to achieve what I was looking for: I've added the optional argument "application" to RedisCache(). If you inspect the RedisCache() code, you will notice that previously it was forced to use current.request.application for the instance_name. With this simple change I did, it's possible to provide an application name to the RedisCache() constructor.

This has worked like a charm for my specific scenario, and I think I can say that it has backwards compatibility. Still, if this proposal isn't accepted, I would like to hear about some alternative to share cache between applications. Thanks!
2018-11-14 12:47:04 -03:00
Boris Aramis Aguilar RodríguezandGitHub a79ad25001 redis_scheduler failing
redis_scheduler failed when calculating next_run_time (method total_seconds() belongs to timedelta)
2018-11-01 15:04:22 -06:00
mdipierroandGitHub bf27c8c394 Merge pull request #2048 from timnyborg/patch-3
Allow custom json encoder
2018-11-01 08:24:53 -07:00
mdipierroandGitHub bbaf151f25 Merge pull request #2047 from kvanzuijlen/fix_issues_for_python3
'unique_key' shouldn't be saved as bytes
2018-11-01 08:24:27 -07: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
Koen van Zuijlen ec41d49454 'unique_key' shouldn't be saved as bytes 2018-10-29 13:47:35 +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
Faelysse c5547091cf Python3 redis compatibility
Redis expects int, Python3 <int>/<int> operation returns floatgit
2018-08-17 16:35:54 +02:00
mdipierroandGitHub 65b9c9ce17 Merge pull request #1960 from daniellibonati/master
Proposed Fix for #1959 "Can't initiate simplejsonrpc service object"
2018-08-05 17:18:29 -07:00
mdipierroandGitHub 5f9a097505 Merge pull request #1956 from marian-vignau/master
Proposed fix to solve crash on markdown2 module
2018-08-05 17:18:00 -07:00
mdipierroandGitHub 077eb4263d Merge pull request #1946 from leonelcamara/patch-17
Import urllib stuff from _compat
2018-08-05 17:14:43 -07:00
mdipierroandGitHub 2904dae2c3 Merge pull request #1945 from leonelcamara/patch-16
Import urllib stuff from _compat
2018-08-05 17:14:29 -07:00
mdipierroandGitHub 225380d00b Merge pull request #1944 from leonelcamara/patch-15
PY3 compatibility
2018-08-05 17:14:16 -07:00
mdipierroandGitHub fc295bb617 Merge pull request #1943 from leonelcamara/patch-14
fixed XML import
2018-08-05 17:14:03 -07:00
jvanbraekel 68284be7b0 Fix pdf export , make it python3 compatible, Fix markmin2latex import 2018-08-02 11:04:14 +02:00
jvanbraekelandGitHub e73029ce37 fix markmin2latex import
Add full path name in markmin2latex import
2018-07-31 10:13:21 +02:00
Daniel Libonati ea1d9acfad Fix #1959 2018-06-30 21:55:16 -03:00
mavignau@gmail.com e6b7388758 Fix proposed to crash in linux on import markdown module 2018-06-19 21:18:33 -03:00
Leonel CâmaraandGitHub c97cac19f0 Import urllib stuff from _compat 2018-06-08 10:54:57 +01:00
Leonel CâmaraandGitHub b5e8cad672 Import urllib stuff from _compat 2018-06-08 10:45:36 +01:00
Leonel CâmaraandGitHub d502275fc8 PY3 compatibility 2018-06-08 10:41:13 +01:00
Leonel CâmaraandGitHub 98c70d8a70 fixed XML import 2018-06-07 23:17:07 +01:00
Leonel CâmaraandGitHub 18414ab8c2 Fixes #1918
Took the chance to also update the syntax from the old style "except socket.error, e:" to "except socket.error as e"
2018-05-03 17:15:53 +01:00
mdipierroandGitHub a79ec41b3b Merge pull request #1908 from leonelcamara/make_sure_to_unlock_redis
Release the lock even if function call fails
2018-04-29 19:50:33 -05:00
mdipierroandGitHub f0eb120bba Merge pull request #1904 from n1k9/master
Modify dispacher for differente response element name
2018-04-29 19:49:10 -05:00
Leonel CâmaraandGitHub d6f426ed29 Update redis_cache.py
fix comment position
2018-04-20 17:00:13 +01:00
Leonel CâmaraandGitHub ea5ea6a307 Release the lock even if function call fails 2018-04-20 16:55:05 +01:00
Nicola Gramola 43e2ed2fc7 Modify dispacher for differente response element name 2018-04-19 08:57:25 +02:00
mdipierroandGitHub ddb2f0ebc3 Merge pull request #1897 from rif/master
Python3 fixes
2018-04-18 22:00:53 -05:00
mdipierroandGitHub 2d500d4cc8 Merge pull request #1896 from cccaballero/set_ldap_python_log_levels
Add support for Python logger logging levels in LDAP auth
2018-04-18 22:00:07 -05:00
Radu Ioan Fericean 0900a3ddb9 discovered and use _compat to_bytes and to_native functions 2018-04-14 14:58:53 +03:00
Radu Ioan Fericean 086bfb5851 fix redis sessions and redis for python3 2018-04-14 14:33:37 +03:00
Carlos Cesar Caballero Díaz de0e63469c Add support for Python logger logging levels in LDAP auth 2018-04-13 14:35:52 -04:00
Carlos Cesar Caballero Díaz 9b4b412239 Fixed Python 3.x LDAP bug on user fistname and lastname part 2018-04-12 12:25:30 -04:00
Richard Vézina 1452fd3851 Would make more sens there 2018-03-13 13:35:44 -04:00
Richard Vézina 0fc6bbc744 Install wiht pip not easy_install 2018-03-13 10:22:36 -04:00
mdipierro 2bcd0c2f10 no more pg8000 2018-02-24 20:59:51 -06:00
mdipierroandGitHub f161cc4f3b Merge pull request #1845 from ilvalle/fix_urllib_urlencode
fix few py3 urllib.urlencode
2018-02-09 12:27:29 -06:00
ilvalle ad3c69155b fix few urllib.urlencode, close #1841 2018-02-04 09:58:16 +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
abastardi 071622b9d9 Fix Janrain due to change in behavior
Janrain has started providing the login token via a POST request
in addition to including it in the query string. This results
in request.vars.token being a list containing two copies of the
token, which breaks the web2py code. This change keeps just a single
copy of the token.
2017-11-15 14:52:19 -05:00
mdipierro 2f5eb409b6 show computed fields in readonly mode in appadmin 2017-11-08 00:40:47 -06:00
mdipierroandGitHub de8b2a477b Merge pull request #1722 from leonelcamara/patch-5
mobilize is back
2017-08-07 23:29:06 -05:00
Leonel Câmara 8533fa0d00 put is_mobile and is_tablet in the result of user_agent() 2017-08-08 00:50:55 +01:00
mdipierro a29947f298 websocket_messaging in Python 3 #1696, thanks hirolau 2017-08-07 07:27:28 -05:00