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.4.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

django_models_ext-1.1.4-py2.py3-none-any.whl (4.9 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

File hashes

Hashes for django-models-ext-1.1.4.tar.gz
Algorithm Hash digest
SHA256 1be64b7d11bd2f689a74c166cdcc807d213d0a15163ca7e6ddbe52c3a0c44c94
MD5 cdec37591a9f91a4f556f6745a3525ea
BLAKE2b-256 2b927bb2d81a64163f437ae2ab613cc34fd3e599e84209d244ceaa66b9e7ea21

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for django_models_ext-1.1.4-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 61de095300ae32d6dbdbb422f9dea770141248de8649388dcdae549ba22e2848
MD5 009a9d11085a808d2c3e04cd1cb7402a
BLAKE2b-256 deb625c1fc69ae5e2086ccba3f3f59e3a32eaa016d1c77fac9b2439426559b9a

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