Circular dependency in forms+views+models

2013-09-01 Thread Jorge Cardoso Leitao
The way I stumbled across this problem was: 1. views imports models and forms (both are normally needed) 2. forms imports models (for ModelForm) 3. models imports views (for get_absolute_url), e.g.: import views class MyModel(models.Model): get_absolute_url(reverse(views.myview))

Re: Circular dependency in forms+views+models

2013-09-01 Thread Curtis Maloney
Given both the docs for get_absolute_url and reverse demonstrate using string references only, I think adding in clarification of why it's preferred is worthwhile. I still find it surprising how often I need to tell people on #django to not import models just to reference them in relation

Re: get_cache and multiple caches

2013-09-01 Thread Florian Apolloner
Hi, On Sunday, September 1, 2013 4:34:54 AM UTC+2, Curtis Maloney wrote: > > I've a possible solution - > https://github.com/funkybob/django/compare/simple_caches > > Basically, the existing API and behaviours are still available through > get_cache, but you can avoid duplicate instances of

Re: Order of INSTALLED_APPS

2013-09-01 Thread Kevin Christopher Henry
Sorry to be late to this thread, I just came across it. There's another place where the order of INSTALLED_APPS matters: management commands. Management commands associated with apps that come later in INSTALLED_APPS will replace those with the same name that are listed earlier. I can't find

Re: Order of INSTALLED_APPS

2013-09-01 Thread Marc Tamlyn
I don't think it would break South installations as custom app commands will always override builtins. Could you open a ticket for that? The inconsistency is problematic. Obviously it would be backwards incompatible, but we need to gauge the size of the impact. Marc On 1 Sep 2013 21:31, "Kevin

Re: get_cache and multiple caches

2013-09-01 Thread Curtis Maloney
Bit of a rambling, thinking-out-loud-ish post... Whilst it's conceivable some cache backend will have the smarts to multiplex requests on a single connection, I suspect that's more the exception than the case. However, that doesn't mean the cache backend can't be left with the opportunity to