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

Uploaded Source

Built Distribution

django_models_ext-1.1.10-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.10.tar.gz.

File metadata

  • Download URL: django-models-ext-1.1.10.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.8.2

File hashes

Hashes for django-models-ext-1.1.10.tar.gz
Algorithm Hash digest
SHA256 45cc782df36a91a643f68ad4d2a4b6976b21fca11e15ac7f975e5cd57c82852b
MD5 fb992533e3d11d05d0959e81e23fdc24
BLAKE2b-256 9ad256ae95b12ad1685e312891ec4efa2622621d177b6a48f0d4e124feafc58d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: django_models_ext-1.1.10-py2.py3-none-any.whl
  • Upload date:
  • Size: 5.4 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.8.2

File hashes

Hashes for django_models_ext-1.1.10-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 6d11e9fa5a2a21c92ab5896c4b6b87990f942a79a3ed84a0f5b085c10bf7c20a
MD5 bb390367f524be418f13c5632e0d962e
BLAKE2b-256 e4b0d1080aedf9e0297ed1cfff1eafa281117d7b4a89965340d90008cef054cc

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