Creating Custom Managers For Repetitive Filters

September 30th, 2009

Today I was trying to do something in Django and I’ve noticed that I’m using lots of filter in my views. And most of the filters were same, but for different purposes. Then I felt like DRY principle is screaming at me. So I started to think that maybe there is a way to prevent these repetitions. And like all other problems in the world, the solution was just in front of my eyes :)

Django

No Comments

Generating Lorem Ipsums in Django Templates

September 19th, 2009

When we first attempt create our web applications, most of us use a common printing phrase which starts with Lorem Ipsum words in our templates. Today while I was reading something in the Django documentation, and surprisingly I came across with this very useful module. Honestly, I didn’t even know Django has such a thing. After seeing this module, I again thought about how much I love Django :)

Django

No Comments

Learning Site Packages Folder Under OSX

September 13th, 2009

Today I was browsing couple django extensions to check if there is any new useful stuff around. I saw couple questions in those WiKis/forums about site-packages folder under OSX. For those who don’t know which site-packages folder is active in your system, you must consider how your system is configured. Especially if you’re using MacPorts or any tool like that, your default site-packages folder that is shipped with OS X might be different than what you’re presuming.

Django

No Comments