Skip to main content

Django Models Extensions

Project description

Django Models Extensions

Installation

pip install django-models-ext

Usage

from django_models_ext import BaseModelMixin, upload_path, upload_file_url

class MyModel(BaseModelMixin):
    upload = models.FileField(upload_to=upload_path)

    @property
    def upload_url(self):
        return upload_file_url(self.upload)

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-models-ext-1.1.1.tar.gz (2.0 kB view details)

Uploaded Source

Built Distribution

django_models_ext-1.1.1-py2.py3-none-any.whl (4.0 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file django-models-ext-1.1.1.tar.gz.

File metadata

File hashes

Hashes for django-models-ext-1.1.1.tar.gz
Algorithm Hash digest
SHA256 90dcec2162d8c8d847c8d75c9e8c0e4346c03587824b0ea9c82715df0259724d
MD5 08914b61587681f9ed8628b715f3a92c
BLAKE2b-256 e032a63025c5996f3c8ccdf80cbc525e1bd77870e6b7d9a44345ab1665fe961b

See more details on using hashes here.

File details

Details for the file django_models_ext-1.1.1-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for django_models_ext-1.1.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 bb066a46451e7f41804e695d1f270679827e863e22d0ddb056a578941fa4df46
MD5 1ff4c537791a9b09cfd4816ddedf51ed
BLAKE2b-256 3e11c551c5cbfcbe64b8c8bd700d53c7f31e939aa919ce4742405ef7e714cc98

See more details on using hashes here.

Supported by

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