Login

Tag "tab"

Snippet List

Convert tab indented string to dictionary

output: ``` {u'Ogrenci': [u'Tum okullar', u'Lisans', u'Onlisans', u'Yuksek Lisans / Doktora', u'Ingilizce Hazirlik'], u'Ogretim Elemani': [u'Tum okullar', u'Lisans', u'Onlisans', u'Yuksek Lisans / Doktora', u'Ingilizce Hazirlik']} ```

  • python
  • tab
Read More

Active page class for selected menu items

Simple tag to check which page we are on, based on resolve: useful to add an 'active' css class in menu items that needs to be aware when they are selected. Typical usage is like: ` <ul> <li class="{% active request "myapp:myview1" %}">My View 1</li> <li class="{% active request "myapp:myview2" %}">My View 2</li> </ul> `

  • templatetag
  • menu
  • tab
Read More

Simple DRY Tabs using Django 1.3

I was just playing around with Django 1.3 and came across the new 'with' addition to the include tag. I thought this was a super elegant way to implement a DRY tab menu without having to move menu code into the views. Enjoy!

  • menu
  • dry
  • tabs
  • menus
  • tabbed
  • tab
Read More

3 snippets posted so far.