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

Uploaded Source

Built Distribution

django_models_ext-1.1.8-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.8.tar.gz.

File metadata

  • Download URL: django-models-ext-1.1.8.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.19.8 CPython/2.7.12+

File hashes

Hashes for django-models-ext-1.1.8.tar.gz
Algorithm Hash digest
SHA256 7b2af3fb8fa109973131c6cab82c2334e1ee78fd78b9cbe3d06c852985fbc710
MD5 79dfaa1ffc2bc109beea9444627151d7
BLAKE2b-256 18480d5ede5a9b1be510e8013331f7151723fd75bc9a3b3827ea79bf0a88740b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: django_models_ext-1.1.8-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.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.19.8 CPython/2.7.12+

File hashes

Hashes for django_models_ext-1.1.8-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 15af562a7ebaa06a3430c7ea46afafbc412c53a22ad9137f6396b83009a0f0d5
MD5 abddb23da298a6ce1205048e886f0974
BLAKE2b-256 6c759fcc6f05a851dfbd4a1cf8ce9568d225cd69c22dccd6521f2a7204d2c060

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