Re: delegating our static file serving

2015-12-30 Thread Florian Apolloner
On Tuesday, December 29, 2015 at 6:31:02 PM UTC+1, David Evans wrote: > > 2. Serving media files is a slightly different case. WhiteNoise was > designed around the assumption that it's serving a set of > developer-supplied, public files which remain unchanged during the lifetime > of the

Re: Help needed with the MySQL max index length problem for Django 1.10

2015-12-30 Thread Florian Apolloner
On Monday, December 21, 2015 at 5:32:43 PM UTC+1, Tim Graham wrote: > > "This patch breaks on MySQL installations using the utf8mb4 charset, > because it breaks the index length limit - it comes out at a maximum of 254 > * 4 = 1016 bytes whilst by default InnoDB can only index 767 bytes. I

admin: implementing list_prefetch_related

2015-12-30 Thread Riccardo Magliocchetti
Hello, the need to list an m2m relationship serialized in the admin list view happens quite often to me and overriding the queryset may not be as trivial as a ModelAdmin attribute. It makes sense to me to match what is possible with foreign keys and list_select_related. Any opinion on

Backwards-compatibility import shims

2015-12-30 Thread Marten Kenbeek
As noted by Collin on deprecating old import paths: I personally wouldn't mind if we didn't actually deprecate this, and left > these shims in a bit longer :). (Makes it just a hair easier for people > upgrading.) But that's just

Re: Help needed with the MySQL max index length problem for Django 1.10

2015-12-30 Thread Collin Anderson
I think mysql used to just give a warning and maybe now it's an error? It can currently be reproduced with just a blank project (using django master, mysql 5.5.46-0ubuntu0.14.04.2): mysql -e'create database mb4test charset utf8mb4' django-admin startproject mb4test cd mb4test vi

Re: Backwards-compatibility import shims

2015-12-30 Thread Tim Graham
To save a link click, the question is about moving django.core.urlresolvers to django.urls and whether or not to start the deprecating of django.core.urlresolvers immediately. I don't have a strong opinion myself. On one hand, delaying gives projects more time to update, on the other, I

Re: Backwards-compatibility import shims

2015-12-30 Thread Marten Kenbeek
One solution is to create a RemovedInFutureVersionWarning to allow projects to catch the change when running with -Wall, without committing to a specific release. On Wednesday, December 30, 2015 at 3:05:32 PM UTC+1, Tim Graham wrote: > > To save a link click, the question is about moving >

Re: Backwards-compatibility import shims

2015-12-30 Thread Tim Graham
Given that alternate, I guess I'm not really enthusiastic about making our deprecation policy more complicated. While urlresolvers is a commonly used module, updating should be a simple find and replace for the imports. On the other hand, I thought of a slight flaw in our current deprecation

Re: Revisiting multiline tags

2015-12-30 Thread Flimm
+1 from me. blocktrans is really ugly if it has to fit in one line. On Saturday, February 18, 2012 at 7:04:33 AM UTC+1, Glenn Washburn wrote: > > Hello django devers, > > I'd like to reopen discussion on the multiline tag issue (see: > https://code.djangoproject.com/ticket/8652) which was closed

Re: Backwards-compatibility import shims

2015-12-30 Thread Michael Manfre
On Wed, Dec 30, 2015 at 11:52 AM, Tim Graham wrote: > For that reason, I think we should reconsider making Django's deprecation > warnings loud by default (at least in LTS versions) [1]. Otherwise, users > will pester library authors to fix those warnings and we haven't

Working with Django signals

2015-12-30 Thread Bernardo Garcia
Hi Django developers community A great greetings I want share with you the following question: I have a custom users schema in Django for work with roles or users type, creating an application named userprofile which will be or will setup my custom user model. In my settings.py I have the

Re: Adding name to fieldsets to improve their validation error text

2015-12-30 Thread Tim Graham
Hi Ben, >From a quick look, I'd suggest trying an approach similar to how form fields work, with a `default_error_messages` class attribute which can be override by an `error_messages` parameter provided to __init__(). Tim On Thursday, December 17, 2015 at 5:46:04 PM UTC-5, Benjamin W Stookey

Re: Working with Django signals

2015-12-30 Thread Tim Graham
Please write to django-users as this mailing list is for the development of Django itself. On Wednesday, December 30, 2015 at 5:28:22 PM UTC-5, Bernardo Garcia wrote: > > Hi Django developers community > A great greetings > > I want share with you the following question: > > I have a custom

Re: FK constraints are not checked at the end of nested atomic blocks

2015-12-30 Thread Shai Berger
Hi, On Tuesday 29 December 2015 19:40:44 Gavin Wahl wrote: > What does it even mean for constraints to be checked at savepoint commit? I > would expect this to not cause any errors: > > with atomic(): > # insert invalid fk > with atomic(check_deferred_constraints=True): >

Re: admin: implementing list_prefetch_related

2015-12-30 Thread Marc Tamlyn
Hi Richard, Overriding the queryset is a pretty simple method override, I'm not sure there is sufficient need for prefetching here. In particular, the syntax for prefetch related is much more complex than for select related, so it's less well suited to this kind of shortcut. Marc On 30 Dec 2015

Re: delegating our static file serving

2015-12-30 Thread Chris Cogdon
Also consider the media files could number into the millions (or bajizillions?). Particularly for, say, a image hosting application. Clearly it would not be feasible to enumerate all the files, and there would clearly be regular additions. It might be that this use case is simply "beyond the

Re: delegating our static file serving

2015-12-30 Thread Chris Cogdon
Also consider the media files could number into the millions (or bajizillions?). Particularly for, say, a image hosting application. Clearly it would not be feasible to enumerate all the files, and there would clearly be regular additions. It might be that this use case is simply "beyond the

Re: delegating our static file serving

2015-12-30 Thread Cristiano Coelho
Just curious, about PaaS, I know AWS (Amazon) deploys python/django on apache (which is quite decent), and apache also serves static files decently. What would be wrong with this? The idea of having Python serving static files (and potentially gziping it), when python is one of the slowest

Re: delegating our static file serving

2015-12-30 Thread Florian Apolloner
You are free to use what your PaaS provider supplies, but if you are using heroku (and many others) you do not have a choice. If AWS allows you to use apache 2.4 in event mode, then by all means use it! But there are plenty of platforms out there where you cannot easily serve static files

Re: FK constraints are not checked at the end of nested atomic blocks

2015-12-30 Thread Gavin Wahl
I understand that a database is invalid or invalid as a whole, which is why you don't need to check constraints until transaction commit (when the transaction becomes visible to the world). Why do you want to bundle constraint checking with a savepoint release though? They seem logically

Re: FK constraints are not checked at the end of nested atomic blocks

2015-12-30 Thread Shai Berger
On Thursday 31 December 2015 06:31:40 Gavin Wahl wrote: > I understand that a database is invalid or invalid as a whole, which is why > you don't need to check constraints until transaction commit (when the > transaction becomes visible to the world). Why do you want to bundle > constraint