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

Uploaded Source

Built Distribution

django_models_ext-1.1.9-py2.py3-none-any.whl (5.4 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

  • Download URL: django-models-ext-1.1.9.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/18.5 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/2.7.10

File hashes

Hashes for django-models-ext-1.1.9.tar.gz
Algorithm Hash digest
SHA256 58335c1b97aab95484d6ca6240d2e2cd7062559a024d97d3f448a337764a6664
MD5 1b6ec5f0e67335a7e1054c224e3a074c
BLAKE2b-256 fd67a809890751b33ebcee3d0a4cde697d244ca85c89a1429561b7b6d155141a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: django_models_ext-1.1.9-py2.py3-none-any.whl
  • Upload date:
  • Size: 5.4 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/18.5 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/2.7.10

File hashes

Hashes for django_models_ext-1.1.9-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 d8004f0875661e361e41459aa6cce939f51c089a45b7ae8b8d38b48076d3b05c
MD5 85250bf15bc9df8c43f3deab8d107ac9
BLAKE2b-256 5b0c1fa8c50a9c8d097b19cc6d65cf386806270ed3c3426fd5b7090b73ba2d86

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