Commit Graph
100 Commits
Author SHA1 Message Date
niphlod 1b15b0c6dc fixes just docstrings about usage 2016-03-14 23:32:53 +01:00
niphlod 038d0d17a4 fixes the same bugs reported in #1191 for the "standard" scheduler 2016-03-10 00:01:39 +01:00
niphlod 642ec2b934 fixes #1191
fix is in lines 828-835 . needed to backport total_seconds for py2.6
(694-701).
everything else is just pep8.
2016-02-25 02:46:36 +01:00
niphlod 12acdb51d7 new redis toolset to use with web2py
This is a refactor of everything web2py uses with redis.
Specifically:
- a refactored redis_cache.py that fixes #958, allowing a "fail
gracefully" behaviour in case redis is not available
- a refactored redis_session.py that blocks less with with_lock=True
(although still not optimal)
- a new (and NEEDED) redis_utils.py that serves as the base for
everything else, allowing an RConn object that you can freely use as a
redis.StrictRedis connection, and that you can override in case you're
using a different library (or that web2py will use in case redis-py
won't be the de-facto standard around)
- a newly - and much anticipated - redis_scheduler.py. It's a slip-in
replacement for the standard scheduler that uses redis for workers
coordination. Feel free to dig in the code and improve it.

For redis_cache and redis_session changes are BREAKING. It means that
users will need to change the import locations and tune a bit the code.
Now every module depends on an gluon.contrib.redis_utils.RConn object
(or similar) that in turns is very similar to a redis.StrictRedis one.
The redis instance is EXTERNAL to the modules themselves (no more "host,
port, db, password" parameters in RedisCache or RedisSession)
See the relevant docstrings for usage examples
2016-01-02 23:15:00 +01:00
niphlod 918590d1f3 fix for STOPPED tasks via stop_task()
they previously killed the main process
2016-01-02 22:50:27 +01:00
niphlod d57428e8f0 fixes #1156 and other few issues 2016-01-01 20:48:55 +01:00
niphlod 13e3adf22d tests for modules NEED to be in a separate unittest 2015-12-30 21:20:24 +01:00
niphlod d4ffcaf1b1 fixes #1044
This shouldn't have took that much to solve. Really sorry for the delay
2015-12-30 16:38:43 +01:00
niphlod 17f1a51133 fixes #1100
now elements with data-w2p_disable are not disabled.
in addition, for non-ajax forms, disabled submit buttons are reenabled
after 5 seconds

plus reindented, refactored AND jslinted
2015-12-30 16:19:39 +01:00
niphlod d4bca008a8 better docstrings 2015-12-30 14:55:37 +01:00
niphlod 90c33911ab fixes #1143
don't even get me started about the current messy status of admin
2015-12-30 12:07:18 +01:00
niphlod 0a263ffc8d better test_utils and reorg to compileapp 2015-12-30 11:42:49 +01:00
niphlod e94946d3d5 bultin constant time checking
- if hmac.compare_digest is there, we should use it instead of our own
fallback.
- jwt handler has been updated to use utils.compare (reported in
#web2py-users)
- includes the same mods as https://github.com/web2py/web2py/pull/1146
2015-12-30 10:37:14 +01:00
niphlod eb49831726 fixes #1142 2015-12-28 15:05:51 +01:00
niphlod b517c898b8 better support for -f
as exposed in
https://groups.google.com/d/msg/web2py-developers/uJoQeUlCABw/-MCXocwGAgAJ
2015-12-28 14:48:29 +01:00
niphlod 64a8880c80 fixes #1090
removed timezone for IS_DATE* validators
2015-10-26 09:50:09 +01:00
niphlod 12f848c899 fixes #1083 2015-10-19 21:50:34 +02:00
niphlod 353db90a64 fixes #1043 , thanks @bobstjon 2015-09-21 22:24:59 +02:00
niphlod 827e663ac4 better list: widget 2015-09-21 22:18:18 +02:00
niphlod de399691ce fixes #1039
It was a REEEAALLY good catch :-)
2015-09-21 22:09:17 +02:00
niphlod 46f081c45c fixes #1068
threw in also a better list:string widget repr for bs3

Updated also the bootswatch theme because something was wrong
2015-09-21 21:38:28 +02:00
niphlod 1c74afc01b fixes issue #735 2015-09-03 18:33:54 +02:00
niphlod 5dbcda9f38 fixes #823 2015-09-03 18:08:33 +02:00
niphlod ac02d52f05 fixes typo in wiki. As usual, lack of unittests made this possible.
We should really make each developer "adopt" a piece of web2py to test
and care if we don't want to write unittests.
2015-09-03 17:56:45 +02:00
niphlod 8a7612c976 after appveyor hooks have been defined... 2015-06-17 21:23:29 +02:00
niphlod 2ce53e9957 move to codecov and enable appveyor too 2015-06-14 21:17:52 +02:00
niphlod d61c372c95 fix display of checkboxes in search form of grid 2015-06-11 21:54:21 +02:00
niphlod 509b0a6987 fixes is_in_set repr too 2015-06-06 09:50:44 +02:00
niphlod e0074ebcac fixes #994
we were overriding default classes for specific widgets
2015-06-05 22:10:33 +02:00
niphlod 4f316d0294 thanks @wmunguiam for spotting 2015-05-24 21:25:27 +02:00
niphlod cd1d6c5af1 redis multi-app. Thanks Lisandro for spotting it
redis_cache didn't play well with multiple apps for a silly mistake.
Glad that Lisadro pointed out
2015-05-21 22:26:04 +02:00
niphlod cadf38b4f6 fixes #962 2015-05-11 21:24:20 +02:00
niphlod 5c167907eb fixes #628
response.include_files is now cleaner and easier to maintain

You can specify a tuple of (type, url) to include external assets
without extension (such as the usecase described in #628)

Added tests for include_files, that was never included in CI tests
2015-05-08 21:51:56 +02:00
niphlod 32b9b5c799 fixes issue #691 2015-05-03 16:06:10 +02:00
niphlod 340d7b5e6f fixes #734 2015-05-03 15:51:13 +02:00
niphlod 302f56ecc1 more tests, general cleanup 2015-05-03 15:33:19 +02:00
niphlod 77f154a56b added newer Recaptcha2 class to deal with v2.0. Fixes #919
Improvements over the "old" v1.0
- behaves well also without javascript
- use_ssl is redundant, v2.0 works only in https mode
- ajax is not useful anymore as the newer API is a lot easier

Adjusted also the addrow() method that was missing newer formstyles.
2015-04-22 00:10:05 +02:00
niphlod 2b0bfba649 extend underline for proper sphinx formatting 2015-04-21 23:59:07 +02:00
niphlod 9f1edf267d fixes #931 . Thanks @butsyk for spotting the bug 2015-04-21 21:59:42 +02:00
niphlod ac80adc9b4 small typo. Fixes #920 2015-04-19 19:49:25 +02:00
niphlod 888fa3dfc8 added setup script 2015-04-19 19:00:59 +02:00
niphlod f3d815e84b added web.config to deploy web2py on IIS 2015-04-19 15:51:17 +02:00
niphlod 0784680c90 added waitress to anyserver 2015-04-15 23:55:44 +02:00
niphlod cefa30841b file is already open at this point... fixes #895 2015-04-08 21:47:04 +02:00
niphlod e441e15907 fix windows build 2015-04-01 21:35:52 +02:00
niphlod e6c3410639 not needed anymore module 2015-04-01 20:55:47 +02:00
niphlod 6a3bd509e0 bootstrap 3.3.4 is out. 2015-03-25 21:25:29 +01:00
niphlod 3291075384 fixes issue with deleting sessions 2015-03-21 21:54:29 +01:00
niphlod 4f1606fcf2 fixes #679 2015-03-20 23:16:30 +01:00
niphlod cec0f8a0cf fix app packaging 2015-03-19 00:04:24 +01:00
niphlod 0086f7d28a first iteration on bs3 cleanup 2015-03-18 23:11:55 +01:00
niphlod d1ec005924 caches recursive selects for references
Why didn't we think before ? References are lazy, but when asked 
for representation why should we fetch the same referenced record
over and over ?

NB: the code caches only represent() fetching records from tables, that
are the only idempotent represent() calls out there. We could cache
every representation only asking for every represent() call to be 
idempotent. As I feel there will be someone returning random values,
I left it out.

I'll make a PR soon for pyDAL to fix the same behaviour.
2015-03-11 00:48:51 +01:00
niphlod c4a703eb84 fix docs at the top to honor correctly expiration when used in models
Thanks @KabluBR  for spotting it
2015-03-03 20:30:40 +01:00
niphlod 421c905621 fixes #656 2015-03-02 23:00:45 +01:00
niphlod e62bead5e2 fixes issue #773
Removed redundant tests in test_validators.py since there's test_isurl.py
Added allowed_tlds from http://data.iana.org/TLD/tlds-alpha-by-domain.txt
Added script to easily update the official_top_level_domains for the future
2015-02-24 23:34:27 +01:00
niphlod fb49327e93 fixes issue #635
since there is no more a proper place to put the new regex, it's on top
of the module for speedup. The patch leaves open a few corner-cases,
but since we have "headers" to alter the headers in SQLTABLE, any
corner case can be fixed passing properly filled "headers" parameter.
This just makes the simple case described on the issue work fine, that
should accomodate the 99% of the usecases for with_alias() needs
at the field level.
2015-02-23 23:00:59 +01:00
niphlod 69e9f9867a updated ipaddr to the latest version
The API changed just a little bit, so a small refactor of validators.py 
was needed
2015-02-23 21:49:00 +01:00
niphlod 17f4e46423 fixes issue #742 2015-02-23 21:34:23 +01:00
niphlod 74cac47d43 fixes #806 2015-02-22 18:04:48 +01:00
niphlod 9f827df914 fixed sessions2trash.py not removing empty dirs 2015-02-19 22:56:27 +01:00
niphlod 3fed961c20 adjusted docs to newer structure 2015-02-15 23:13:57 +01:00
niphlod 4d9548b1f5 fixes #735. Review CAREFULLY before merging 2015-02-13 22:54:27 +01:00
niphlod d7a0e6c4d7 this somehow got merged wrongly (came from #762) 2015-02-06 21:28:47 +01:00
niphlod 1b34216072 fixes #769
- fixed response.include_files() to behave correctly with 
  response.static_version_urls
- added response.static_version_urls to admin
- refactored admin URL() usage passing always and correctly 'static'
  as the controller
2015-02-04 22:18:42 +01:00
niphlod 46c4b1af27 pep8ized a taddle bit sqlhtml.py 2015-01-28 22:34:04 +01:00
niphlod f503750b6a exploiting new travis-ci environment 2015-01-27 22:13:13 +01:00
niphlod 440fa16bec fixed issue report link 2015-01-27 21:26:33 +01:00
niphlod 7e07ff8b39 we should always avoid importing "optionals" without a try:except.
one clear case of "should never happen"... that happened.
in this case docs were failing builds on readthedocs because of 
pypyodbc not being able to load any odbc library.
2015-01-27 00:13:45 +01:00
niphlod c0b32eaeec more consistent badges with shields.io 2014-12-23 21:24:27 +01:00
niphlod ce025a6b8e new module appconfig.py 2014-12-21 20:30:18 +01:00
niphlod 9132343820 better assignment (tasks go to not running workers only). Thanks @PengfeiYu
- pep8 adjustments
- tasks were assigned to all ACTIVE workers... if a worker is busy processing a task, 
  there's no point on assigning tasks to it
2014-12-18 23:48:10 +01:00
niphlod dafe900629 timeout = 0 leads to erratic behaviour. Allowing timeout = 0 is considered unsafe 2014-11-25 21:17:53 +01:00
niphlod 22506a6b03 fix issue with rname and oracle. Thanks @fernando. Fixes #2013 2014-11-16 18:50:53 +01:00
niphlod a6b50dcdcd streamline behaviour of component (trapped) forms with multiple submit buttons
this is because jquery can't know what button was pressed when the 
submit event is triggered. We circumvent it adding an hidden field before
triggering the submission

BTW: don't know why the commit seems huge. I just changed a bit the trap_form
function to handle the corner case and streamlined what disableElement, 
enableElement, disableFormElements, enableFormElements do, 
along with formInputClickSelector
2014-11-08 23:04:58 +01:00
niphlod c071bc964b update dependencies only if COMPLETED, allow to set status on a specific worker 2014-10-30 21:54:36 +01:00
niphlod 98f245655b some freezers publish also __file__ in globals() 2014-10-22 22:04:52 +02:00
niphlod fc38f460eb fixes issue 1998 2014-10-21 21:33:43 +02:00
niphlod 794979abe1 pg8000 doesn't support json at all 2014-10-18 20:20:34 +02:00
niphlod 7e0e7eb6c8 ilike was wronlgy defined 2014-10-16 22:27:40 +02:00
niphlod b43ef65eb1 while we wait for a sane "prefixing", use a much more efficient way to find errors
This comes from an unfortunate choice of naming conventions and the fact that 
manage errors gets called even on the full document on page load.
I had a table full of .error-"classed" elements and it took nearly 30 seconds for that
snippet to hide and fade them in. We should definitevely prefix every css class with
something that won't clash with everything else.
2014-10-16 21:08:55 +02:00
niphlod b616ee6a32 fix for GAE tests often failing for no apparent reason 2014-10-16 20:56:24 +02:00
niphlod 15fe54bdca refactor main_hook to a function 2014-10-14 23:42:41 +02:00
niphlod 97e1d1cd9b added coverage template in makefile 2014-10-01 22:01:37 +02:00
niphlod 88113637ae with dal new structure, API doc generation was left out of the picture. GROAN! 2014-09-30 23:37:54 +02:00
niphlod 1e35262e67 fixes issue 1980
pyflaked the module, at least a bit. Sometimes I feel developers are in a contest
where less characters and lines win. Concise implementation wins over verbose one,
but less SLOC DON'T mean somewhat better code. Just reading through
this module makes my brain hurt a bit
2014-09-30 21:37:04 +02:00
niphlod db68a2a10e fixes issue 1985
plus made a pass to jsbeautifier for improved reading
plus fixed an annoying trailing comma that could cause issues with IE >= 8
2014-09-25 22:49:40 +02:00
niphlod b2d5775f82 always stringify decimals. Better docstrings and a few PEP8. 2014-09-25 21:28:55 +02:00
niphlod 0721988b65 added tests for gluon/html.py and gluon/serializers.py
uhm
2014-09-24 22:14:55 +02:00
niphlod 4d42442c31 better types by default, given that we're on 2005 at least 2014-09-23 00:04:42 +02:00
niphlod 34a417cfa0 fix for StorageList and tests added
gluon/storage.py
StorageList had a recursion error (please check the implementation before committing)

gluon/tests*
added the fix_path module to avoid those ugly lines at the beginning of each test file
added tests for gluon.contenttype and test_fileutils
added tests for missing Storage methods
2014-09-21 08:26:38 +02:00
niphlod 8bbd22eba8 improved coverage, fix bug with IS_LIST_OF and items not being strings 2014-09-19 00:15:25 +02:00
niphlod 50f16744a7 fix cache.increment, added tests 2014-09-16 23:50:10 +02:00
niphlod 05a92e86f7 fixed wording and bug on contains(), made smart_query use ilike instead of like 2014-09-14 22:45:19 +02:00
Niphlod c4a4ee27c4 postgresql: identifies what adapter auto-loads json values 2014-09-14 16:39:54 +02:00
Niphlod ecc6e5dc5e added more tests for json Field 2014-09-14 16:01:22 +02:00
niphlod 5c9796ac72 refactored pickling of sessions 2014-09-11 22:51:23 +02:00
niphlod 6403878f95 refactored pickle everywhere but Session, removed unused imports 2014-09-10 19:12:10 +02:00
niphlod bd87879cde added test for storage pickling 2014-09-10 18:24:52 +02:00
niphlod 61d5a776d4 new structure in revised README 2014-09-10 18:08:09 +02:00
niphlod 1456c0da1e references can be long too 2014-09-03 21:23:24 +02:00