djangosnippets.org: Latest snippets tagged with 'tab'https://djangosnippets.org/tags/tab/2017-09-21T06:45:04.257132-05:00Convert tab indented string to dictionary
2017-09-21T06:45:04.257132-05:00ekinertachttps://djangosnippets.org/snippets/10623/<p>output:</p>
<p><code>{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']}</code></p>
Freely redistributableActive page class for selected menu items
2012-09-26T02:10:26.645215-05:00kunitokihttps://djangosnippets.org/snippets/2825/<p>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.</p>
<p>Typical usage is like:</p>
<p><code><ul>
<li class="{% active request "myapp:myview1" %}">My View 1</li>
<li class="{% active request "myapp:myview2" %}">My …</code></p>
Freely redistributableSimple DRY Tabs using Django 1.3
2011-04-28T01:38:54.456970-05:00Voightkampffhttps://djangosnippets.org/snippets/2421/<p>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!</p>
Freely redistributable