Re: suggestion: Don't make the tag "url" dirty in Django1.5

2012-03-27 Thread Jonathan French
That example is incorrect. {% url app_views.client %} will not change to {% "url app_views.client" %} it will change to {% url "app_views.client" %} which, as you can see, enables passing the view from something other than a literal string. On 27 March 2012 09:22, gs412 wrote: > In Django1

Re: [GSoC 2012] Schema Alteration API proposal

2012-03-19 Thread Jonathan French
On 18 March 2012 23:33, Russell Keith-Magee wrote: > > 2. An inspection tool that generates the appropriate python code after > >inspecting models and current state of database. > > The current consensus is that this shouldn't be Django's domain -- at > least, not in the first instance. It mi

Re: Class based views: A standard hook for http-method-independent code

2012-03-02 Thread Jonathan French
ak the rules. > > > Cheers, > AT > > > On Fri, Mar 2, 2012 at 11:53 AM, Jonathan French > wrote: > >> That's true, but I agree it seems a useful enough hook to make it a hook, >> rather than needing to do it yourself like that. I would vote for it being >

Re: Class based views: A standard hook for http-method-independent code

2012-03-02 Thread Jonathan French
That's true, but I agree it seems a useful enough hook to make it a hook, rather than needing to do it yourself like that. I would vote for it being called 'preprocess', to make it clear that it's both optional and run before the method-specific function. - ojno On 2 March 2012 13:40, Michael van

Re: make the File Storage API works with a file-like object instead of the Django File object.

2012-02-28 Thread Jonathan French
You can create a Django file object from any file-like object just by passing it to the constructor. django.core.files.File(my_file_like_object) This is basically what all the storage backends do where there is an existing file object from whatever source, and what you have to do if you want to s

Re: Newline stripping in templates: the dnl way

2012-02-25 Thread Jonathan French
Let me make sure I've got this right --- The situation being discussed is not where whitespace is insignificant and can be stripped, but where whitespace is important and you want to control the exact amount of it, e.g. plain text emails. In this case, just using stripwhitespace is not enough. Righ

Re: Revisiting multiline tags

2012-02-24 Thread Jonathan French
On 24 February 2012 17:16, Alex Gaynor wrote: > > > On Fri, Feb 24, 2012 at 12:06 PM, h3 wrote: > >> > If you'd like to make an argument as to *why* it's useful, that's >> useful, but we don't take polls. >> >> I think the argument as to why it's useful as been made quite >> extensively. >> >> O

Re: Newline stripping in templates: the dnl way

2012-02-24 Thread Jonathan French
Jinja implements whitespace control by putting a minus sign after/before the % in a tag - http://jinja.pocoo.org/docs/templates/#whitespace-control - I haven't tried it myself, but it looks like {% tag -%} is equivalent to your {% tag %}{# . On 24 February 2012 17:37, Tobia wrote: > Tai Lee wrot

Re: Revisiting multiline tags

2012-02-24 Thread Jonathan French
Since we're consensus building or whatever the fancy term is, another +1. Mainly for comments, since {# #} is far, far more readable than {% comment %}{% endcomment %} even with syntax highlighting, but also for other tags too, particularly long i18n ones -- or even relatively short ones where you