Cache framework

2020-08-17 Thread Jure Erznožnik
Apologies for wall of text, but it's a complex issue I'm raising. Hopefully you will see something you thought about in the recent past. I have also indented the rationalisation part, so if it's TL;DR, don't read it. Well, on with it: I've lately had some dealings with Django caching framework

Re: Making max_length argument optional

2020-08-17 Thread Tom Carrick
I'm not a fan of any solution either, really, even the one I suggested. I think adding a new kwarg, "unlimited" seems okay to me, though it feels a little redundant. I don't like the idea of using TextField, I find them semantically different. An unlimited varchar says to me "one possibly very lo

Re: Making max_length argument optional

2020-08-17 Thread Carlton Gibson
Would the subclass in contrib.postgres suggestion be acceptable? On Mon, 17 Aug 2020 at 10:31, Tom Carrick wrote: > I'm not a fan of any solution either, really, even the one I suggested. > > I think adding a new kwarg, "unlimited" seems okay to me, though it feels > a little redundant. > > I do

include_block template tag

2020-08-17 Thread Jure Erznožnik
While rendering templates we often come into situations where data remains the same, but sometimes we want to render it one way, other times - another. Examples: a library supporting various CSS frameworks. You would always render panel

Re: Making max_length argument optional

2020-08-17 Thread Tom Carrick
It would work for my use-cases. It was mentioned that it's maybe not the best as a lot of fields subclass CharField, but I don't see a compelling argument for an unlimited email or slug field. The one problem I see is CICharField, you might want to make that unlimited - but the CI fields are more o

Re: Cache framework

2020-08-17 Thread Adam Johnson
Hi Jure The caching framework exists mostly to provide a memcached-like API. Memcached does not support either of your two first options - there's no efficient way to list keys, nor does it make any atomicity guarantees (outside of a single key). I think for most applications you'll find it easier

Re: Cache framework

2020-08-17 Thread Carlton Gibson
> On 17 Aug 2020, at 11:32, Adam Johnson wrote: > > Channels can use other layers backends - I'm not sure of existing > alternatives, but they could use e.g. Postgres' NOTIFY, Google PubSub, AWS > SNS, etc. The only other active channel layer backend that I’m aware of is for RabbitMQ: https

Pickling - Re: Cache framework

2020-08-17 Thread Roger Gammans
On Mon, 2020-08-17 at 10:30 +0200, Jure Erznožnik wrote: > While at it, I have seen that various backends now implement > their own pickling. With the exception of memcached, they > all > implement the same thing. Perhaps it would be beneficial to > move pickling funct

Re: Fellow Reports - August 2020

2020-08-17 Thread Mariusz Felisiak
Week ending August 16, 2020. *Triaged:* https://code.djangoproject.com/ticket/31870 - App with default_app_config and without apps.py or with an empty apps.py crashes. (accepted) https://code.djangoproject.com/ticket/31872 - Postgres DecimalRangeField ignores bounds (wontfix) ht

Re: include_block template tag

2020-08-17 Thread Curtis Maloney
Interesting ideas... and looks similar to some of the features I put into Sniplates: https://sniplates.readthedocs.io/en/latest/ If you like we can work on adding this to sniplates, if it's not accepted into core. -- Curtis On Mon, 17 Aug 2020, at 19:05, Jure Erznožnik wrote: > While renderin