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

Metadata

Release files for django-model-mixin 0.3.12

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-model-mixin 0.3.12
File Size Uploaded
django_model_mixin-0.3.12.tar.gz 18.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for django-model-mixin 0.3.12
File Interpreter ABI Platform
django_model_mixin-0.3.12-py3-none-any.whl Python 3 none any Details

Total release size: 38.1 kB

Release files / django_model_mixin-0.3.12.tar.gz

Download URL django_model_mixin-0.3.12.tar.gz
Size 18.3 kB
Tags Source
SHA-256 checksum
How to use checksums
92a411ccbe27c1f0a23896c41cb08a5564fb4e141dc73bab2e37fd0b9dcc0be2
BLAKE2b-256 checksum
How to use checksums
985e8694727eb0800836ebc57644fdeca6b669025e85bfc78712d3c6cad31acd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / django_model_mixin-0.3.12-py3-none-any.whl

Download URL django_model_mixin-0.3.12-py3-none-any.whl
Size 19.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
093e087631fbe26ff323d75311302360011b17cec31ee19cbfe6c07189c3874a
BLAKE2b-256 checksum
How to use checksums
c6b7ad81147c0c47ce27f96c9da718e56b65ff9052bf7194ff9ff5d715eab847
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release history Release notifications | RSS feed

This release

0.3.12 This release

2 release files

0.3.10

2 release files

0.3.9

2 release files

0.3.8

2 release files

0.3.7

2 release files

0.3.6

2 release files

0.3.5

2 release files

0.3.4

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.2.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page