Re: Proposal: A diagram showing Class Based View inheritance and mixins.

2013-08-20 Thread mjl Martin J. Laubach
I've used this one http://epydoc.pythondiary.com/generic-views/ with good results. Very low-level but totally useful. mjl -- You received this message because you are subscribed to the Google Groups "Django developers" group. To unsubscribe from this group and stop receiving

Re: manage.py and pyc's

2013-07-24 Thread mjl Martin J. Laubach
Well, the sneaky workaround would probably be to ship a totally simple management/commands/foo_command.py that does nothing more than "from only_as_pyc import *". Would that work for your use case? mjl -- You received this message because you are subscribed to the Google Groups

Re: Proposal: make Model __unicode__() default to self.name

2013-07-11 Thread mjl Martin J. Laubach
> In addition to the previous answers, I find it important to have an unambiguous __unicode__ / __str__, and name isn't necessarily unique. Perhaps to have it a tiny little bit more useful, have it default to "MyModel object (object_pk)" ? mjl -- You received this message because

Re: django and paramstyle: what's the actual story?

2013-05-16 Thread mjl Martin J. Laubach
As for the death of '%s' style -- yes please, with sprinkles on top. It is totally violating the principle of least astonishment as anyone will expect '%s' to expand to a parameter string; yet that's not what it does, it magically adds quotes and whatnot. The other two variants are widely

Re: Feature request: collectstatic shouldn't recopy files that already exist in destination

2012-09-27 Thread mjl Martin J. Laubach
Good idea, but shouldn't it be a per-storage thing? Perhaps this could be done with a couple of callbacks in the collectstatic run: - Before collectstatic starts, so the storage backend can pick up its inventory from the remote - One called for each file that would be copied, and that

Re: Django's CVB - Roadmap?

2012-06-03 Thread mjl Martin J. Laubach
> > This is the real issue. The docs. It's one of the issues, but I'm not really convinced it is the only one. My experience with CBV usually has gone like this: 1. "I need a view, let's do it with CBV" 2. "Oh hey, that was easy!" 3. "I need some more functionality"

Re: discrepancy in default CSRF settings

2012-04-09 Thread mjl Martin J. Laubach
> > However, it seems that the defaults are to add the middleware, but not the > context processor. Is there a specific reason for this? > The docs say: In the corresponding view functions, ensure that the 'django.core.context_processors.csrf' context processor is being used. Usually,

Re: Newline stripping in templates: the dnl way

2012-02-25 Thread mjl Martin J. Laubach
> > foo bar {# >> #}baz >> >> >> You just made a strong argument against multiline tags: I wouldn't want > to see them abused this way! > Ah, I fully expected to be shot down on "aesthetic" reasons. I still think it's better to have some (maybe slightly ugly) way to do things than no way

Re: Newline stripping in templates: the dnl way

2012-02-24 Thread mjl Martin J. Laubach
For this (avoiding newlines) the currently discussed multiline tags would work pretty well too without adding more cruft to the template language: foo bar {# #}baz mjl -- You received this message because you are