No project description provided
Project description
djangondor
Table of Contents
Installation
pip install djangondor
Functions
Collections package
dict_values
dict_values can be used to access data in a dict as a tuple
from djangondor.collections import dict_values
data = {'name':'Joseph','age':30,'height':1.7}
name, height = dict_values(data,'name','height')
value_list
Complements the builtin
Queryset.values_list
returning one data item per entry in the list. However, it only allows you to retrieve one field per item in the queryset.
from djangondor.collections import value_list
queryset = User.objects.all()
# data would have => ['sam', 'musonda', 'waza', 'chilu']
data = value_list(queryset, 'first_name')
Templatetags
Path tags
{% load djangondor_path_tags%}
<a href="{% url 'index:index' %}" class="{% active_app 'index'%}">Index App</a>
<a href="{% url 'index:home' %}" class="{% active_path 'home'%}">Home</a>
<a href="{% url 'index:about' %}" class="{% active_path 'about'%}">About</a>
<a href="{% url 'index:settings' %}" class="{% active_path_in 'home_settings' 'profile_settings' %}">Settings</a>
<!-- Would produce the following if navigation matched 'index:home': -->
<a href="/" class="active">Index App</a>
<a href="/" class="active">Home</a>
<a href="/about" class="">About</a>
<a href="/settings" class="">Settings</a>
License
djangondor
is distributed under the terms of the MIT license.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
djangondor-0.0.4.tar.gz
(6.8 kB
view hashes)
Built Distribution
Close
Hashes for djangondor-0.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cc32ae5f5571b75d584deabdd523d3da5e98c7ab25e598e9a906eaa7e8b00f8d |
|
MD5 | 96214178920015a247a0d830f66d2ea4 |
|
BLAKE2b-256 | 3ba14ee66beed54953253cb64fa6d48f92ad7fe5b5883ee729271898059692b8 |