"With same habits, you will end up with the same results. But with better habits, anything is possible". This book has changed my perspective in life about my goals, habits and behavior. It has inspired me to start new habits that matter to me the most. And to be consistent in doing it each day, … Continue reading Atomic Habits by James Clear
Amazing Lunch
Had a delicious Andhra meal at Subbayya Gari Hotel, Kukatpally branch today.
Custom Template Tags and Filters in Django
Custom Template Tags/Filters are necessary when there is a need to modify the object received from views context, such that it suits the needs of rendering them in the template. Django’s out-of-the-box tags/filters might not always suffice. The custom tag/filter can be registered in Django’s tags or filters Library and used in the templates. Let’s learn something about writing our own tags and filters. Let me start off from the beginning:
- Create a new Django Project:
django-admin startproject <proj_name>
- Create an app in the project:
python manage.py startapp temptags
- Add the App to INSTALLED_APPS in settings.py
- Create a templatetag folder inside the app folder.
- Create a __init__.py file to treat the folder as python package.
- Create a ‘templates’ folder to add the html files
- urls.py
from django.urls import pathfrom . import views
urlpatterns = [path('',views.sampleTemptag),]
- views.py
from django.shortcuts import render
def sampleTemptag(request):
context = {
"name": "My name is Agnes.000123",
"id": "89752358-1234",
"fullname": "Agnes George Sequera"}
return render(request,'main.html',context)
View original post 427 more words
Happy Ganesh Chaturthi!
Wish you all a very Happy Ganesh Chaturthi. Here's how our celebration looked today...
Bookmarks!!!
My new collection of bookmarks just arrived.!!❤ Can't wait to use them...
Book reading
The first book I read was a short story - Quiver Full of Arrows by Jeffery Archer. It is a very small book. Each short story is no more than a few pages long. I considered finishing this first book as a great achievement. 🙂 At first, my reading pace used to be very slow. … Continue reading Book reading
South Indian Filter Coffee
Having Coffee from this traditional brass cup tastes even better! My weekend began with this wonderful cup of magic. Hope you have a great weekend ahead!
Where the Sky meets the Ocean…
A memorable trip and a memorable picture…
This is from my trip to the Andamans, on a peaceful beach, away from the crowd, traffic and pollution. The tranquil waters has a great influence, making you feel one with the nature. I wish we had more of such clean, blissful places around us.
4 years!! Can you believe it!!
This blog's journey for 4 years with WordPress.
How to Talk so Little Kids will Listen By Joanna Faber & Julie King
If you have a toddler at home, this book is for you. There are lots of tools and techniques that could come handy while dealing with tantrums or handling kid's emotions. At the least, it makes you feel better when you know that you are not the only one going through all this!! The book … Continue reading How to Talk so Little Kids will Listen By Joanna Faber & Julie King