Django Template tag for building alphabetical index
Link to repository: https://github.com/Arpaso/alphabetic-simple
Builds alpabetic index to navigate through collection sorted by firstletter. Supports english and russian groups of alphabets.
Usage
view.py:
from django.views.generic.list_detail import object_list
from alphabetic.utils import alphabetic_setup
from .models import MyModel
def myview(request):
...
queryset = MyModel.objects.all()
return object_list(request, alphabetic_setup(request, queryset, 'last_name'), template_name=template)
template.html:
{% show_alphabetic_filter %}
alphabetic_setup(request, queryset, ‘last_name’) - returns sorted queryset in alphabetical order by firstletter of the attribute name, e.g. last_name or whatever attribute of the model you specified.
show_alphabetic_filter - template tag shows clickable alphabet in the template.
Clicking on the letter will produce GET request to the current url with a tail ?firstletter=X, where X is the clicked letter.
Written by the development team of Arpaso company: http://arpaso.com
Metadata
Release files for alphabetic-simple 0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| alphabetic-simple-0.2.tar.gz | 6.4 kB | Without provenance | Details for alphabetic-simple-0.2.tar.gz |
Release files / alphabetic-simple-0.2.tar.gz
| Download URL | alphabetic-simple-0.2.tar.gz |
|---|---|
| Size | 6.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c44b5e9b98cc4c16584aa9b21995b94e4eed9107a694e28ab6bb02a33d57ef3d
|
|
BLAKE2b-256 checksum How to use checksums |
a439b1c35c8667d3ad6b3a292efca37ce26bc3952ddec876087d3c57ac82a76e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for alphabetic-simple 0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.