Skip to main content

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

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-model-path-converter-0.1.0.tar.gz (15.7 kB view details)

Uploaded Source

Built Distribution

django_model_path_converter-0.1.0-py2.py3-none-any.whl (3.0 kB view details)

Uploaded Python 2Python 3

File details

Details for the file django-model-path-converter-0.1.0.tar.gz.

File metadata

File hashes

Hashes for django-model-path-converter-0.1.0.tar.gz
Algorithm Hash digest
SHA256 12b1114bc266feb03bac25fbb3a85fbecf7c5c64a3d5747db92021e401f9f6e8
MD5 120af15baf8abe6fc39ba813561f0dd2
BLAKE2b-256 3c3cc5ed457c1497ba965aca225563f48b2d9533aa152973c0e0be15138a4c6e

See more details on using hashes here.

File details

Details for the file django_model_path_converter-0.1.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for django_model_path_converter-0.1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 7f3592599905fd5f01340152c8547f191173715cb2cf5f31b165112f4a0d13b6
MD5 813081a51a06a369f485412d350a816a
BLAKE2b-256 316cd8dec74e71e85a2f2c871168f0720a555b5ff5c61c0b8b5d2e5a0306a052

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page