Commit graph

53 commits

Author SHA1 Message Date
Camilo Nova
5e91a92431
Allow concurrent calls to set() method (#384) 2020-03-05 18:04:55 -05:00
Yurchenko Sergey
fa6ae65594
delete south migrations (#371) 2020-01-30 11:56:12 -05:00
Elisey Zanko
b62206da57 Resolve #367: Set pickle protocol version for the Redis backend (#369) 2020-01-14 15:46:27 -05:00
Alexandr Artemyev
590fa02eb3 Drop support py<3.5 django<2.2 (#359)
* Drop support py<3.5 django<2.2

* Remove admin_static
2019-12-23 16:20:41 -05:00
Alexandr Artemyev
e069ddb91a
Fix #341 2019-09-16 11:51:18 +03:00
Kirill Goncharov
1e751f1afa Optimizations for database backend (#329)
* Add test for database backend with query count assertions

* Rewrite set() method of database backend to reduce number of queries
2019-06-08 09:14:58 -05:00
Tyler Kennedy
5e422cfd54 Allow null & blank for PickleField. (#315)
The default behaviour of PickleField was changed from null=True to
null=False. This causes issues with fields such as an image_field which
will try storing a NULL when unset.
2019-03-16 09:47:43 -05:00
Manatsawin Hanmongkolchai
0e38ae7ce1 database: Allow running set while database is not created 2017-08-20 19:44:16 +07:00
Manatsawin Hanmongkolchai
f8aad0c7f6 Also ignore ProgrammingError for Postgres 2017-08-08 18:39:01 +07:00
Manatsawin Hanmongkolchai
bbfa8fa7dc database: Ignore operation errors (#229) 2017-08-07 23:56:20 +07:00
Jon Dufresne
9725bb2a94 Use dict comprehension; available since Python 2.7 (#217) 2017-06-02 10:53:08 +02:00
Jon Dufresne
3a1f8a898b Remove unnecessary calls to dict.keys
iter(dict) is equivalent to iter(dict.keys()). Can simply act on the
dict instead. Provides a more concise, Pythonic syntax and avoids an
unnecessary function call.

Inspired by Lennart Regebro's presentation "Prehistoric Patterns in
Python" at PyCon 2017. Available at:

https://www.youtube.com/watch?v=V5-JH23Vk0I
2017-06-02 10:23:21 +02:00
Camilo Nova
2fde4f4d83 Added the old value to the config_updated signal 2017-01-31 10:41:55 -05:00
Camilo Nova
bebc279edc Send the config parameter as sender for the signal 2016-09-15 09:24:30 -05:00
Camilo Nova
1d746c080f Rename signal to config_updated 2016-09-14 14:53:52 -05:00
Camilo Nova
395efc992f ☀️ Moved the signal to its own file to avoid import errors 2016-09-14 14:50:39 -05:00
Camilo Nova
94fabdf7c3 Added signal on change, refs #158 2016-09-14 12:22:32 -05:00
Jan Nakladal
e95f372b2f autofill cache if key si missing. 2016-07-12 16:31:11 +12:00
Maxim Filipenko
1b6730d2c5 Invalidate cache 2016-06-03 17:40:32 +03:00
Jannis Leidel
19109b98bc Merge remote-tracking branch 'vinnyrose/compat_changes' 2015-09-24 11:02:45 +02:00
Mario Rosa
e1f9e52a08 Compatibility changes.
Drop python 2.6, 3.2
Drop Django 1.4, 1.5, 1.6
Remove models.py under constance and move to an appconfig imported file.
2015-08-25 08:14:01 -04:00
Dan Poirier
b44f5f5409 Some fixes for recent Djangos
* Add Django 1.8 to test environments in tox.ini
* Update python versions supported by Django master in tox.ini
* Don't load 'url' from template library 'future' - it is no longer
  available in Django master, and is not needed in Django 1.4 and later,
  which is as far back as django-constance tests
  * get_cache dropped from Django master
  * post_syncdb signal dropped
  * django.utils.importlib dropped

There are still errors on some environments that I didn't try to
address:

* coverage seems broken on py32
* django-master seems currently broken on py27 (non-ASCII character
somewhere,
I expect django-master will be fixed soon since they still claim py27
support)
* django14 seems broken: "NoReverseMatch: u"'admin" is not a registered
namespace"
2015-08-07 08:14:26 -04:00
Jannis Leidel
52cbce7a08 Stop requiring six as a depdendency.
This is possible now that we require at least a version of Django that ships with six.

Signed-off-by: Jannis Leidel <jannis@leidel.info>
2014-11-27 17:53:01 +01:00
Jannis Leidel
fc930442a2 Simplified settings. 2014-11-25 22:20:06 +01:00
Jannis Leidel
cd05239626 Because computers. 2014-11-21 21:19:14 +01:00
Jannis Leidel
6e2c4503e5 Moved South migrations out of the way and added Django migrations. 2014-11-21 20:21:17 +01:00
Jannis Leidel
69221ba2b4 Renamed config module to base to prevent ambiguity
This should fix #80 that is triggered by Django's new strickter import time loading process.
2014-11-21 20:16:39 +01:00
Jannis Leidel
8b0ed361d6 Added database cache autofill feature.
This refs #47 and #45.
2014-11-21 20:08:20 +01:00
Jannis Leidel
51c25f5208 Fix an import error on Django master. 2014-11-21 17:48:40 +01:00
Yin Jifeng
498d9f7b3e fix basestring in python 3 2014-04-01 13:35:40 +08:00
Pierre-Olivier Marec
a72603800e Fixed discard cache on set value (key prefix was missing) 2013-12-16 17:24:16 +01:00
Les Orchard
ae92c447ec Migration tweak to fix a failure in switching column types for key 2013-07-30 16:04:44 -04:00
Jannis Leidel
90da7981e5 Please the PEP8 gods. 2013-04-12 17:39:10 +02:00
Jannis Leidel
36a9c23500 More py3k changes. 2013-04-12 17:34:48 +02:00
Bouke Haarsma
847ba5a060 Robust key fetching
Fixes #31
2013-03-19 11:38:37 +01:00
Jannis Leidel
5c039e5744 Added South migration to make the key field an unique CharField. 2013-03-02 15:46:42 +01:00
Jannis Leidel
1e2e902061 Added initial South migration. 2013-03-02 15:44:19 +01:00
Jannis Leidel
a8b158ad1c Fixed the prefix handling. 2013-02-21 19:33:12 +01:00
Jannis Leidel
e9d937be5a Added ability to prefix database values. Fixes #24. 2013-02-21 19:27:56 +01:00
Jannis Leidel
21344d9168 Added ability to specify the redis connection parameter as an URL. Fixes #26. 2013-02-21 19:00:26 +01:00
Janusz Harkot
6dfbb7e462 remove unused import 2012-09-03 02:25:14 +02:00
Jiri Barton
0d0ab22e88 solved the unique key/index for the database backend 2012-06-05 16:05:14 +02:00
Marcin Baran
647a8627c0 Fix DatabaseBackend clear 2011-09-21 22:18:05 +08:00
Jiri Barton
482d8ff78b fixed a serious bug with the default values 2011-09-21 22:17:34 +08:00
Sławek Ehlert
d055821b59 fixed? problem with loads and None values 2011-03-11 12:03:28 +01:00
Jannis Leidel
ada157c7df Fixed a minor issues with redis-py insistence on a args as lists. 2010-12-11 22:42:41 +01:00
Jannis Leidel
3ef39d9185 Enabled database backend to properly require a cache backend that works in cross-process environments. This adds an optional setting CONSTANCE_DATABASE_CACHE_BACKEND. 2010-12-11 16:43:31 +01:00
Jannis Leidel
1dd0a8b7c9 Added mget method to base backend to fetch all keys in one fell swoop, instead of one by one. Especially useful in the admin. 2010-12-11 16:38:40 +01:00
Jannis Leidel
240ef14015 Refactored prefix handling in redis backend slightly. 2010-12-11 16:32:03 +01:00
Jannis Leidel
d6e9521ffb Added __unicode__ to Constance model. 2010-12-03 20:36:56 +01:00