Wednesday, April 25, 2012

Waking up early and some django templating stuff

Ah, another long break. I have been waking up at 7am and reaching office before 9am. This gives me a lot of time to finish my day job. I have a feeling that it is easier to incorporate new habits one or two at a time. Earlier, I used to try to bring too many changes to the daily routine. That never worked and made me feel like I lacked the will to change. This time, I am not biting off more than I can chew. So, for the next month, the resolution is -
I will wake up at 7am and hit the pillow by 12pm
I have been writing a lot of Django templates at work. Recently came across firstof which is a good way to avoid the if-else-endif template. I have always wanted to have a neater way to add context to include templates. So, I used to surround include templates with the with tag. I found that the include tag takes arguments which will be added to the context.

{% include "templates/search_form.html" with placeholder="Search projects.." %}

looks much cleaner than

{% with placeholder="Search projects.." %}
    {% include "templates/search_form.html" %}
{% endwith %}

My ordered-lists were showing with bullets instead of numbers. Learned about list-style css property. I need to understand list styling better.

Phaneendra gave a talk introducing Sencha for mobile app development. Thanks to the framework, he had been pulling his hair almost everyday since he started using it. After the talk, Theju demoed kvm and discussed the problems he had faced getting git and a django project working on Windows. We discussed several ways to make it easy for new people to get started with an old project, but couldn't come to a good conclusion.

No comments:

Post a Comment