Skip to main content

django-model-mixin PyPi license

PyPi status PyPi version PyPi python version PyPi downloads PyPi downloads PyPi downloads

GitHub GitHub release GitHub release

Test codecov.io pre-commit.ci status gitthub.com

Check Demo Project

  • Check the demo repo on GitHub

Requirements

  • Python 3.9+ supported.
  • Django 3.2+ supported.

Setup

  1. Install from pip:
pip install django-model-mixin
  1. Modify settings.py by adding the app to INSTALLED_APPS:
INSTALLED_APPS = [
    "django.contrib.admin",
    "model_mixin",
]
  1. Modify your project models.py with needed imports and class extends:
from model_mixin.models import AuditModelMixin, PublishModelMixin


class MyCustomClass(AuditModelMixin, PublishModelMixin):
    pass
  1. Execute Django's command makemigrations inside your project's root:
python manage.py makemigrations
  1. Finally, execute Django's command migrate inside your project's root:
python manage.py migrate

Run Example Project

git clone --depth=50 --branch=django-model-mixin https://github.com/DLRSP/example.git DLRSP/example
cd DLRSP/example
python manage.py runserver

Now browser the app @ http://127.0.0.1:8000

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django_model_mixin-0.3.7.tar.gz (18.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_model_mixin-0.3.7-py3-none-any.whl (19.7 kB view details)

Uploaded Python 3

File details

Details for the file django_model_mixin-0.3.7.tar.gz.

File metadata

  • Download URL: django_model_mixin-0.3.7.tar.gz
  • Upload date:
  • Size: 18.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for django_model_mixin-0.3.7.tar.gz
Algorithm Hash digest
SHA256 8814e6344ea2c604058a80c3ee31c1fe5dd2b0e3c3a8a27c9324315368a07977
MD5 41150722b57724a541847f484a779158
BLAKE2b-256 a58b06a02ed72694989f009ae4e011a7ae8d39b1702edd0fde81ac7bf69ba7cc

See more details on using hashes here.

File details

Details for the file django_model_mixin-0.3.7-py3-none-any.whl.

File metadata

File hashes

Hashes for django_model_mixin-0.3.7-py3-none-any.whl
Algorithm Hash digest
SHA256 147c579904be88b70909b4019765a15d546ccba386bc5fb2c7f05ed8d89eb8fc
MD5 0db59dd3ee69342f708964f77897159c
BLAKE2b-256 96c702e4ca7bffbcb69d05927d4d83b1f2d331e01ad7f1855dd4fa6e947a9b73

See more details on using hashes here.

Release history Release notifications | RSS feed

0.3.9

2 files

0.3.8

2 files

This release

0.3.7 This release

2 files

0.3.6

2 files

0.3.5

2 files

0.3.4

2 files

0.3.3

2 files

0.3.2

2 files

0.3.1

2 files

0.2.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page