Skip to main content

model extensions with timestamp and uuid and more

Project description

Django Model Extensions

  • A Django library for model extensions

Requirements

  • Python (3.5, 3.6, 3.7, 3.8)
  • Django (2.0, 3.0)

We highly recommend and only officially support the latest patch release of each Python and Django series.

Installation

Install using pip...

pip install django-extensions-models

settings

INSTALLED_APPS = (
    # ...
    'models_extensions',
)

Example

Let's take a look at a quick example of using model extensions

from models_extensions.models import UUIDModel, TimeStampedModel, ActivatorModel

class YourModel(UUIDModel, TimeStampedModel, ActivatorModel):
    # ...

Don't forget makemigrations & migrate to apply models to your database.

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-extensions-models-1.0.tar.gz (3.2 kB view hashes)

Uploaded Source

Built Distribution

django_extensions_models-1.0-py3-none-any.whl (4.4 kB view hashes)

Uploaded Python 3

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