django-model-mixin


Namedjango-model-mixin JSON
Version 0.3.3 PyPI version JSON
download
home_pagehttps://github.com/DLRSP/django-model-mixin
SummaryDjango application provide simple model's mixins to add common reusable attributes.
upload_time2024-04-05 21:51:29
maintainerNone
docs_urlNone
authorDLRSP
requires_python>=3.8
licenseMIT License
keywords django
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # django-model-mixin [![PyPi license](https://img.shields.io/pypi/l/django-model-mixin.svg)](https://pypi.python.org/pypi/django-model-mixin)

[![PyPi status](https://img.shields.io/pypi/status/django-model-mixin.svg)](https://pypi.python.org/pypi/django-model-mixin)
[![PyPi version](https://img.shields.io/pypi/v/django-model-mixin.svg)](https://pypi.python.org/pypi/django-model-mixin)
[![PyPi python version](https://img.shields.io/pypi/pyversions/django-model-mixin.svg)](https://pypi.python.org/pypi/django-model-mixin)
[![PyPi downloads](https://img.shields.io/pypi/dm/django-model-mixin.svg)](https://pypi.python.org/pypi/django-model-mixin)
[![PyPi downloads](https://img.shields.io/pypi/dw/django-model-mixin.svg)](https://pypi.python.org/pypi/django-model-mixin)
[![PyPi downloads](https://img.shields.io/pypi/dd/django-model-mixin.svg)](https://pypi.python.org/pypi/django-model-mixin)

## GitHub ![GitHub release](https://img.shields.io/github/tag/DLRSP/django-model-mixin.svg) ![GitHub release](https://img.shields.io/github/release/DLRSP/django-model-mixin.svg)

## Test [![codecov.io](https://codecov.io/github/DLRSP/django-model-mixin/coverage.svg?branch=main)](https://codecov.io/github/DLRSP/django-model-mixin?branch=main) [![pre-commit.ci status](https://results.pre-commit.ci/badge/github/DLRSP/django-model-mixin/main.svg)](https://results.pre-commit.ci/latest/github/DLRSP/django-model-mixin/main) [![gitthub.com](https://github.com/DLRSP/django-model-mixin/actions/workflows/ci.yaml/badge.svg)](https://github.com/DLRSP/django-model-mixin/actions/workflows/ci.yaml)

## Check Demo Project
* Check the demo repo on [GitHub](https://github.com/DLRSP/example/tree/django-model-mixin)

## Requirements
-   Python 3.8+ supported.
-   Django 3.2+ supported.

## Setup
1. Install from **pip**:
```shell
pip install django-model-mixin
```

2. Modify `settings.py` by adding the app to `INSTALLED_APPS`:
```python
INSTALLED_APPS = [
    # ...
    "model_mixin",
    # ...
]
```

3. Modify your project `models.py` with needed imports and class extends:
```python
# ...other imports...
from model_mixin.models import AuditModelMixin, PublishModelMixin

class MyCustomClass(AuditModelMixin, PublishModelMixin):
    # ...
```

4. Execute Django's command `makemigrations` inside your project's root:
```shell
python manage.py makemigrations
```

5. Finally, execute Django's command `migrate` inside your project's root:
```shell
python manage.py migrate
```

## Run Example Project

```shell
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

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/DLRSP/django-model-mixin",
    "name": "django-model-mixin",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "django",
    "author": "DLRSP",
    "author_email": "dlrsp.dev@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/97/82/482cd510577c7cf9d0e589beaba17ed466249ca6960cb8b2256df0d27872/django-model-mixin-0.3.3.tar.gz",
    "platform": null,
    "description": "# django-model-mixin [![PyPi license](https://img.shields.io/pypi/l/django-model-mixin.svg)](https://pypi.python.org/pypi/django-model-mixin)\n\n[![PyPi status](https://img.shields.io/pypi/status/django-model-mixin.svg)](https://pypi.python.org/pypi/django-model-mixin)\n[![PyPi version](https://img.shields.io/pypi/v/django-model-mixin.svg)](https://pypi.python.org/pypi/django-model-mixin)\n[![PyPi python version](https://img.shields.io/pypi/pyversions/django-model-mixin.svg)](https://pypi.python.org/pypi/django-model-mixin)\n[![PyPi downloads](https://img.shields.io/pypi/dm/django-model-mixin.svg)](https://pypi.python.org/pypi/django-model-mixin)\n[![PyPi downloads](https://img.shields.io/pypi/dw/django-model-mixin.svg)](https://pypi.python.org/pypi/django-model-mixin)\n[![PyPi downloads](https://img.shields.io/pypi/dd/django-model-mixin.svg)](https://pypi.python.org/pypi/django-model-mixin)\n\n## GitHub ![GitHub release](https://img.shields.io/github/tag/DLRSP/django-model-mixin.svg) ![GitHub release](https://img.shields.io/github/release/DLRSP/django-model-mixin.svg)\n\n## Test [![codecov.io](https://codecov.io/github/DLRSP/django-model-mixin/coverage.svg?branch=main)](https://codecov.io/github/DLRSP/django-model-mixin?branch=main) [![pre-commit.ci status](https://results.pre-commit.ci/badge/github/DLRSP/django-model-mixin/main.svg)](https://results.pre-commit.ci/latest/github/DLRSP/django-model-mixin/main) [![gitthub.com](https://github.com/DLRSP/django-model-mixin/actions/workflows/ci.yaml/badge.svg)](https://github.com/DLRSP/django-model-mixin/actions/workflows/ci.yaml)\n\n## Check Demo Project\n* Check the demo repo on [GitHub](https://github.com/DLRSP/example/tree/django-model-mixin)\n\n## Requirements\n-   Python 3.8+ supported.\n-   Django 3.2+ supported.\n\n## Setup\n1. Install from **pip**:\n```shell\npip install django-model-mixin\n```\n\n2. Modify `settings.py` by adding the app to `INSTALLED_APPS`:\n```python\nINSTALLED_APPS = [\n    # ...\n    \"model_mixin\",\n    # ...\n]\n```\n\n3. Modify your project `models.py` with needed imports and class extends:\n```python\n# ...other imports...\nfrom model_mixin.models import AuditModelMixin, PublishModelMixin\n\nclass MyCustomClass(AuditModelMixin, PublishModelMixin):\n    # ...\n```\n\n4. Execute Django's command `makemigrations` inside your project's root:\n```shell\npython manage.py makemigrations\n```\n\n5. Finally, execute Django's command `migrate` inside your project's root:\n```shell\npython manage.py migrate\n```\n\n## Run Example Project\n\n```shell\ngit clone --depth=50 --branch=django-model-mixin https://github.com/DLRSP/example.git DLRSP/example\ncd DLRSP/example\npython manage.py runserver\n```\n\nNow browser the app @ http://127.0.0.1:8000\n",
    "bugtrack_url": null,
    "license": "MIT License",
    "summary": "Django application provide simple model's mixins to add common reusable attributes.",
    "version": "0.3.3",
    "project_urls": {
        "Homepage": "https://github.com/DLRSP/django-model-mixin"
    },
    "split_keywords": [
        "django"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "821a303a2ed8a951dd413f898f1a39579b182fd3225d127a1230f00dd356df21",
                "md5": "5c67c623c29fb87cd84393732cdd532f",
                "sha256": "1da66ead6b94fad5ab88dca47ba1b5e38ec5c53797583a2cf73bebdf51babca0"
            },
            "downloads": -1,
            "filename": "django_model_mixin-0.3.3-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "5c67c623c29fb87cd84393732cdd532f",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": ">=3.8",
            "size": 9413,
            "upload_time": "2024-04-05T21:51:27",
            "upload_time_iso_8601": "2024-04-05T21:51:27.615821Z",
            "url": "https://files.pythonhosted.org/packages/82/1a/303a2ed8a951dd413f898f1a39579b182fd3225d127a1230f00dd356df21/django_model_mixin-0.3.3-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9782482cd510577c7cf9d0e589beaba17ed466249ca6960cb8b2256df0d27872",
                "md5": "64b037351b12dae9eca27f08e00b5c55",
                "sha256": "71b6b8f1f53c990b26adacf10c50b96344eb6fed2c74ddc18c3cab855bba1f8a"
            },
            "downloads": -1,
            "filename": "django-model-mixin-0.3.3.tar.gz",
            "has_sig": false,
            "md5_digest": "64b037351b12dae9eca27f08e00b5c55",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 16666,
            "upload_time": "2024-04-05T21:51:29",
            "upload_time_iso_8601": "2024-04-05T21:51:29.152026Z",
            "url": "https://files.pythonhosted.org/packages/97/82/482cd510577c7cf9d0e589beaba17ed466249ca6960cb8b2256df0d27872/django-model-mixin-0.3.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-05 21:51:29",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "DLRSP",
    "github_project": "django-model-mixin",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "django-model-mixin"
}
        
Elapsed time: 0.29003s