Re: django.contrib.auth CLI

2018-10-11 Thread Jamesie Pic
Hi Adam, Yeah it would be funny, maybe I'm even the only Django user that automates deployments with a CM, or to take "ootb automation experience" up to that point (maybe because I have extreme DevOps expertise ?). Implementing this in a third party app is pointless: it will be more useful as scr

Re: django.contrib.auth CLI

2018-10-11 Thread Jamesie Pic
Sorry, I forgot to answer about the loaddata proposal. So, loaddata will not do user removal for one thing. About user creation, the process we have is: - add the user to the users list, - set the password in `ansible-vault create passwords/username` - CM will execute createsuperuser for users,

Re: django.contrib.auth CLI

2018-10-11 Thread ludovic coues
I'm sure your extreme DevOps expertise can find a way to automate the deployment of a pip package. I mean, you are argument about manual step for an automatic step is a straw man. Let's say you make two deployment of your app. One on your system, one on premises on a customer system. You want bot

Re: django.contrib.auth CLI

2018-10-11 Thread Jamesie Pic
Hello Ludovic, I'm glad this little joke tickled you, sorry for being that childish but sometimes I can't help it (I don't see how anybody could feel rationnaly offended since this joke talking about me). In reality, I've just been automating Django deployments for 10 year. So, if it takes 50 year

Re: django.contrib.auth CLI

2018-10-11 Thread Jamesie Pic
Forgot a note about extreme devops: It's when you have an automatic deployment per feature branch (example ). GitLab even has a feature to help it called dynamic environments

QuerySet.iterator together with prefetch_related because of chunk_size

2018-10-11 Thread tobias . kroenke
Hi everyone! The docs (https://docs.djangoproject.com/en/2.1/ref/models/querysets/#iterator) state that the use of iterator() causes previous prefetch_related() calls to be ignored > since these two optimizations do not make sense together. I am wondering, if this is still true with the int

Re: QuerySet.iterator together with prefetch_related because of chunk_size

2018-10-11 Thread charettes
Hello Tobias, >From my understanding the introduction of chunk_size doest't help here. The fundamental reason why iterator() cannot be used with prefetch_related() is that the latter requires a set of model instance to be materialized to work appropriately which chunk_size doesn't control at a

Re: QuerySet.iterator together with prefetch_related because of chunk_size

2018-10-11 Thread Curtis Maloney
On 10/12/18 10:51 AM, charettes wrote: Hello Tobias, From my understanding the introduction of chunk_size doest't help here. The fundamental reason why iterator() cannot be used with prefetch_related() is that the latter requires a set of model instance to be materialized to work appropriate

Re: django.contrib.auth CLI

2018-10-11 Thread Jamesie Pic
Hi smart nerds, I'm sorry if my sense of humour was too much to handle for you. But to compensate I offer the unfrustrating python CLI package, and at the same time most awesome CLI CRUD for Django to my knowledge, on yourlabs.io/oss/clilabs One last thing, verrry important for the record, in ca