+1
Russell makes some very good points. Comments should always be
encouraged in code and should be easy to insert in code for debugging
purposes. The current {% comment %} blocks are a bit of a pain to
write for both of these purposes.
For those that seem to like the idea of shorter comments, I whipped up
this piece of middleware for your projects. It's my first attempt at
middleware so the code might seem a bit immature for you advanced
djangoers out there. I opted to use the {# #} syntax, but that can
easily be changed in th
> Also its not very
> clear when modifying templates what all variables are available, and I had
> to regularly go back to view code to reconfirm the variable names etc.
You may find the built-in view/model docs (hit "/admin/doc/" with admin
installed) very helpful.
On 12 Jan 2006, at 07:23, Amit Upadhyay wrote:
Another request: if debug is on, and if the url contains ?
dumpTemplateContext, and client IP in settings.trusted_hosts [and
blah blah blah depending on how paranoid you are],
render_to_response, and family, ignores the actual template, and
On 1/12/06, Russell Keith-Magee <[EMAIL PROTECTED]> wrote:
Crap. Lets try this again without tabbing onto the send button.
On 1/12/06, Adrian Holovaty <
[EMAIL PROTECTED]> wrote:
On 1/11/06, scum <[EMAIL PROTECTED]> wrote:> Could the comment tag be simplified to something like {! !} or {# #}.
We've
Crap. Lets try this again without tabbing onto the send button.
On 1/12/06, Adrian Holovaty <[EMAIL PROTECTED]> wrote:
On 1/11/06, scum <[EMAIL PROTECTED]> wrote:> Could the comment tag be simplified to something like {! !} or {# #}.We've already got two different types of tags -- {% %} and {{ }} -
On 1/12/06, Adrian Holovaty <[EMAIL PROTECTED]> wrote:
On 1/11/06, scum <[EMAIL PROTECTED]> wrote:> Could the comment tag be simplified to something like {! !} or {# #}.We've already got two different types of tags -- {% %} and {{ }} --
and introducing a third would be too complex for my tastes.Adr
On 1/11/06, scum <[EMAIL PROTECTED]> wrote:
> Could the comment tag be simplified to something like {! !} or {# #}.
We've already got two different types of tags -- {% %} and {{ }} --
and introducing a third would be too complex for my tastes.
Adrian
--
Adrian Holovaty
holovaty.com | djangoproj
Could the comment tag be simplified to something like {! !} or {# #}.
The current convention is a bit bulky for my taste.
{% comment %}
{% if 1 %}{% endif %}
{% endcomment %}
could be simplified to...
{! {% if 1 %}{% endif %} !}
or
{% comment %} Short comment about following code {% endcomme