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
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
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
>
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
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
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
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
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
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