Ticket #28609 - Making REQUEST_URI available in runserver

2017-09-28 Thread Jay Lynch
Hi all! Apologies if this I miss any conventions here, I've been working with Django for a long time now but this is my first message here. I'm here to chat about... *(Closed) Ticket #28609 - Request URI* I recently submitted a PR for a change

Re: about ticket 28588- has_perm hide non-existent permissions

2017-09-28 Thread Tim Graham
I suppose we can tentatively accept the ticket, but I looked at the code briefly and agree with Florian's assessment. If someone proposes a patch, we can evaluate it, however, I don't see a simple way forward that wouldn't have a security risk or an adverse effect on performance. Given the phil

Re: about ticket 28588- has_perm hide non-existent permissions

2017-09-28 Thread Shai Berger
Can we define a new API on the permission backend, "verify_permission_exists()" or some such, and just call it if settings.DEBUG and it is provided? That doesn't seem very complex to me, and doesn't necessarily imply a huge performance hit (even in DEBUG). On Thursday 28 September 2017 15:50:04

bulk_create on Postgresql: on conflict do nothing / post_save signal

2017-09-28 Thread Дилян Палаузов
Hello, I want after a user request to be sure that certain objects are stored in a Postgres database, even if before the request some of the objects were there. The only way I can do this with django, not talking about raw sql, is with "for obj in objects: Model.objects.get_or_create(obj)".

Re: bulk_create on Postgresql: on conflict do nothing / post_save signal

2017-09-28 Thread Tom Forbes
I've been in similar situations before, you can usually get away with using a single query to fetch existing records and only pass data that doesn't exist to bulk_create. This works great for a single identity column, but if you have multiple it gets messy. It seems all supported databases offer a