Skip to content

aprendía

(I was learning)

My mistake

Correcting a previous position

I have now taken a note not to write anything at 2:00 am. Why? Well, the whole premise of my last great idea is bogus. There is no need to use firstof like so:

{% firstof form.first_name.errors %}

That is wasteful because the following does the same thing. Only, ya know, better.

{{ form.first_name.errors }}

As long as TEMPLATE_STRING_IF_INVALID is set to and empty string, which it is by default the bare variable will put out nothing if it is False. The stupid thing is that I knew all of this and had used the the techniques before. So, no more writing when I am low on sleep.

Thanks to my friend and mentor Christian for kindly pointing out my error. Now I think I am going to go take a nap…