thomas545 / django-extensions-models

Django model extensions include timestamp, uuid and more

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

Example

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

from models_extensions.models import UUIDModel, TimeStampedModel, ActivatorModel, SoftDeleteModel

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

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

About

Django model extensions include timestamp, uuid and more

License:MIT License


Languages

Language:Python 100.0%