Commit Graph

167 Commits

Author SHA1 Message Date
mdipierro
35eaba1096 removed duplicated code, using pydal's _compat.py 2016-08-01 03:39:22 -05:00
ilvalle
1f013d76f3 minor few fix 2016-06-10 14:14:40 +02:00
ilvalle
fd850ab46f fix validators, updated gluon/contrib/ipaddr 2016-06-07 19:50:49 +02:00
ilvalle
a1fd92b7f8 updated imports in tests 2016-06-02 14:28:21 +02:00
ilvalle
01bab81432 manually adapt few imports 2016-06-01 20:16:30 +02:00
ilvalle
a5599f3eab running lib2to3.fixes.fix_idioms 2016-05-29 08:31:20 +02:00
ilvalle
d22222ebea running lib2to3.fixes.fix_reduce 2016-05-29 08:31:19 +02:00
Leonel Câmara
a9ee9a6b58 remove simplejson 2016-05-11 00:47:23 +01:00
Giovanni Barillari
78bb8e9b26 Updated to latest pydal, fixed IS_IN_DB validator for new pydal 2016-04-19 17:24:09 +02:00
Leonel Câmara
d746d43be5 pep8 and make travis run again 2016-04-14 01:21:23 +01:00
Leonel Câmara
9a3e73031b fixes #1266 and adds tests to make sure it doesn't happen again 2016-04-14 01:02:25 +01:00
Leonel Câmara
5c292640ba Complete coverage for IS_IN_SET
Removed unreachable code in IS_IN_SET
        if failures and self.theset:
            if self.multiple and (value is None or value == '')
It's impossible to have *failures* and have value be None or '' at the same time
2016-03-28 14:47:58 +01:00
Leonel Câmara
5cbf381a2c More test coverage for validators.py
Fixed a bug in IS_EMAIL throwing exceptions when asked to validate anything other than a string which was problematic for ANY_OF
Fixed a bug in ANY_OF.formatter where it was trying to format with a validator that didn't validate
2016-03-27 14:23:24 +01:00
Leonel Câmara
fbb5776432 test_IS_IMAGE
Removed unused and undocumented IS_IN_SUBSET
Fixed _options IS_EMPTY_OR not passing arguments to the other options method
Some tests for formatters
2016-03-19 12:52:48 +00:00
mdipierro
bcc4ae2ec6 remporarily addressing issue #1203, thanks Simone 2016-03-08 17:22:02 -06: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
mdipierro
71fba07e3a some sqlhtml renaming 2015-12-27 07:12:56 -06:00
mdipierro
2a7a4a3d04 removed print statements 2015-12-27 05:39:08 -06:00
mdipierro
999f235b75 IS_IN_DB(...,delimiter=',',auto_add=True) 2015-12-27 05:33:29 -06:00
mdipierro
da22554aed allow for IS_IN_DB(db,db.thing.id,db.thing.name) 2015-12-27 02:46:23 -06:00
mdipierro
22c89d8dcc version 2.13.1 2015-12-17 21:19:08 -06:00
mdipierro
d2910327c0 temp fix for IS_DATETIME with timezone info & record versioning causes TypeError: can't compare offset-naive and offset-aware datetimes #1094 2015-12-04 11:31:55 -06:00
mdipierro
0520770a7e fixed #1111, Validator IS_IPV4: options is_private=False not working, thanks Nbushkov 2015-12-04 11:12:44 -06: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
mdipierro
db37cf6a58 Revert "Labels should get their information from the render function of the records."
This reverts commit 65c87386c1.
2015-11-12 18:25:48 -06:00
niphlod
64a8880c80 fixes #1090
removed timezone for IS_DATE* validators
2015-10-26 09:50:09 +01:00
mdipierro
bbed326c20 fixed commit error 2015-10-07 13:15:39 -05:00
mdipierro
b8c2bd7303 fixed LazyCrypt and fixed git problem 2015-10-07 13:02:30 -05:00
mdipierro
1387b26606 fixed LazyCrypt, thanks Denes 2015-10-07 12:57:20 -05:00
Nik Klever
65c87386c1 Labels should get their information from the render function of the records. 2015-09-05 14:57:55 +02:00
cassiobotaro
a378ab3e51 fix validations IS_IPV6 and IS_IPADDRESS 2015-07-10 01:11:16 -03:00
mdipierro
fbb5a8b9bb fixed issue #968, IS_MATCH validator bug with unicode, thanks alex0834 2015-06-25 04:36:16 -05:00
Jeremie Dokime
33295e516f Fix crash with list:reference field
When using validate_and_update() or validate_and_insert() on a table with a list:reference field, the request crashes after timeout with:
  File "web2py/gluon/globals.py", line 270, in body
    raise HTTP(400, "Bad Request - HTTP body is incomplete")

The request crashes because there is an hidden exception with the isinstance function:
isinstance() arg 2 must be a class, type, or tuple of classes and types

When no using GAE, the GoogleDatastoreAdapter variable is None, so isinstance crash.
See the last line of pydal/adapters/__init__.py

This is a regression intruduced after the v2.9.12.
2015-04-18 02:15:45 +02:00
Richard Vézina
bbd6a081eb Improve PEP8 gluon/validators.py 2015-03-31 14:03:38 -04: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
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
gi0baro
f60c1dff93 Fixing imports for new pydal 2014-12-15 22:24:04 +01:00
gi0baro
dcadcf0ffb Added pyDAL from repository, adapted web2py code 2014-12-15 20:13:40 +01:00
gi0baro
5c07c511fa Merge branch 'master' into DAL-modular
* master: (58 commits)
  changed version number
  better types by default, given that we're on 2005 at least
  fix for StorageList and tests added
  improved coverage, fix bug with IS_LIST_OF and items not being strings
  fix cache.increment, added tests
  R-2.9.11
  reverted simplejson
  R-2.9.10
  upgraded memcache and markdown2
  upgraded pypyodbc.py
  upgraded simplejson
  no more split in contains, thanks Niphlod
  fixed wording and bug on contains(), made smart_query use ilike instead of like
  ilike, thanks Niphlod
  CROSS JOIN, thanks jotbe
  added custom represent to GoogleDatastoreAdapter, thanks Alan
  postgresql: identifies what adapter auto-loads json values
  added more tests for json Field
  fixed typo in driver_auto_json
  Improve the graphing to show the name of the application.
  ...

Conflicts:
	gluon/dal.py
	gluon/globals.py
	gluon/tests/test_dal.py
2014-09-25 12:49:16 +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
mdipierro
d29a108ad7 better native_json naming convention 2014-09-12 20:28:46 -05:00
gi0baro
5e5e649c28 Added modular DAL, updated gluon imports to new structure 2014-09-03 12:48:03 +02:00
niphlod
b20b7ecb19 sphinx-compatible docstring (only DAL remains) 2014-03-24 22:30:50 +01:00
mdipierro
c1e797fe24 removed gluon/contrib/translitcodec because of backward compatibility issues and because it breaks Pypy 2014-03-15 10:54:48 -05:00
mdipierro
883909af4b reverted s.encode('translit/long') which breaks Pypy 2014-03-12 13:31:09 -05:00
mdipierro
6cd2bf9fea better transliteration in slugs, thanks winniehell 2014-03-02 17:45:45 -06:00
mdipierro
cb75a96e2c Merge pull request #315 from winniehell/patch_urlify_translitcodec
Use translitcodec for urlify
2014-03-02 17:24:07 -06:00
mdipierro
caee53e778 fixed IS_TIME()('12:00 am') 2014-02-11 08:12:12 -06:00
Kiran Subbaraman
e3aa776f5a Update error_messages; capitalize first character
Result of a discussion: https://groups.google.com/forum/#!topic/web2py/IDkr4w_wKv4
The intent is to convert the first character of all error messages to a capital letter.
2014-01-16 10:57:34 +05:30