Skip to main content

Django Model Path Converter

https://img.shields.io/pypi/v/django-model-path-converter.svg https://img.shields.io/travis/dhepper/django-model-path-converter.svg Documentation Status

The Django Model Path Converter package dynamically creates custom path converters for you models.

Quickstart

Install the latest version:

pip install django-model-path-converter

Import register_model_converter and your model in your urls.py:

from model_path_converter import register_model_converter
from .models import MyModel

Register a converter for your model:

register_model_converter(MyModel)

Use the new converter in your path definitions:

path('<my_model:obj>/', views.my_view, name='my-view')

Your view my_view will now receive a MyModel instance as argument.

Credits

This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.

History

0.1.0 (2018-05-11)

  • First release on PyPI.

Metadata

Release files for django-model-path-converter 0.1.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-model-path-converter 0.1.0
File Size Uploaded
django-model-path-converter-0.1.0.tar.gz 15.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for django-model-path-converter 0.1.0
File Interpreter ABI Platform
django_model_path_converter-0.1.0-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 18.7 kB

Release files / django-model-path-converter-0.1.0.tar.gz

Download URL django-model-path-converter-0.1.0.tar.gz
Size 15.7 kB
Tags Source
SHA-256 checksum
How to use checksums
12b1114bc266feb03bac25fbb3a85fbecf7c5c64a3d5747db92021e401f9f6e8
BLAKE2b-256 checksum
How to use checksums
3c3cc5ed457c1497ba965aca225563f48b2d9533aa152973c0e0be15138a4c6e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / django_model_path_converter-0.1.0-py2.py3-none-any.whl

Download URL django_model_path_converter-0.1.0-py2.py3-none-any.whl
Size 3.0 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
7f3592599905fd5f01340152c8547f191173715cb2cf5f31b165112f4a0d13b6
BLAKE2b-256 checksum
How to use checksums
316cd8dec74e71e85a2f2c871168f0720a555b5ff5c61c0b8b5d2e5a0306a052
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.1.0 This release

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