Skip to main content

Django-Vertical-Multi-Columns

build docs codecov pypi pyvers licence black

Django-Vertical-Multi-Columns (VMC) is a reusable Django application allowing you to easily display a list of items in vertically sorted side-by-side columns rather than in one long list. It supports all JSON data types … string, number, boolean, object, array, and null/empty.

Comparison

Requirements

  • Python: 3.7, 3.8, 3.9

  • Django: 2.2, 3.0, 3.1, 3.2

Installation

Install using pip:

pip install django-vertical-multi-columns

Add ‘vertical_multi_columns’ to your INSTALLED_APPS setting.

INSTALLED_APPS = [
    ...
    'vertical_multi_columns',
]

In your Django settings, you can optionally specify a default number of columns to be generated.

VERTICAL_MULTI_COLUMNS = [
        {NUMBER_OF_COLUMNS=3}
]

Why You May Need This

Displaying a long list of items in a template is quite easy.

{% for row in rows %} ... {{ row.<field> }} ... {% endfor %}

This comes at a cost for your end user though. Searching through a long list can test someone’s patience if it requires a lot of scrolling or paging.

What VMC Does

  • VMC views let you generate rows that can easily be displayed in multiple side-by-side columns in your templates. The columns retain your sort order so your users can still scan the data in a natural up-and-down way. And because the items are spread across the screen, your content takes less vertical space, reducing the amount of scrolling/paging a user must do.

  • You specify the number of columns you want generated.

  • VMC views are sub-classes of ListView so all its capabilities are still available to you.

View Options

There are 3 views available.

EvenView spreads your data across the number of columns you specify, keeping the length of the columns as even as possible.

EvenView

CriteriaView lets you provide a list of functions, one per column, that VMC uses to determine which column an item will be placed in.

CriteriaView

DefinedView lets you provide the columns you want displayed. VMC does the rest.

DefinedView

Documentation

For more extensive document see the docs folder or read it in readthedocs.

Comments & Support

If you have questions about usage or development you can open an issue on GitHub. You can also contact Susan Wright directly.

Special Thanks

  • To Graham Wright for his guidance and support in publishing this.

Metadata

Release files for django-vertical-multi-columns 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-vertical-multi-columns 1.0.0
File Size Uploaded
django-vertical-multi-columns-1.0.0.tar.gz 229.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for django-vertical-multi-columns 1.0.0
File Interpreter ABI Platform
django_vertical_multi_columns-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 236.8 kB

Release files / django-vertical-multi-columns-1.0.0.tar.gz

Download URL django-vertical-multi-columns-1.0.0.tar.gz
Size 229.8 kB
Tags Source
SHA-256 checksum
How to use checksums
c53e49d2d3c5633f7c995a997e35de81bae1b1953a07f0ef8ad476b6313131c3
BLAKE2b-256 checksum
How to use checksums
8624cc53cc9ea4c8b9380348b11241a306ff6b8962776373c0640e2c9e95eeb1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4

Release files / django_vertical_multi_columns-1.0.0-py3-none-any.whl

Download URL django_vertical_multi_columns-1.0.0-py3-none-any.whl
Size 7.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3af4427bee3243566b94a5ea7168d3878c53ea856324635ac68061df39003aba
BLAKE2b-256 checksum
How to use checksums
6f98aea2bd3514891d46b9c5ef71ccaca38b4d2225af4ab2a6219be6fd7d1d37
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

0.9.4

2 release files

0.9.3

2 release files

0.9.2

2 release files

0.9.1

2 release files

0.9.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page