Metadata-Version: 2.1
Name: django-jables
Version: 1.0
Summary: A better base model for Django with sensible defaults.
Home-page: https://github.com/willywongi/django-jables
Author: Willywongi
Author-email: pongi@pongi.it
License: GPL-3.0-or-later
Platform: UNKNOWN
Classifier: Environment :: Web Environment
Classifier: Framework :: Django
Classifier: Framework :: Django :: 3.2
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
Requires-Python: >=3.6
Description-Content-Type: text/markdown
License-File: LICENSE

Jean-Baptiste, aka Jables
---

This package contains a single useful base model I was copying over and over onto every new project. It was time to package it up and reuse it.

This is a basic model from which all the project's model should inherit. It is defined as "[abstract](https://docs.djangoproject.com/en/3.1/topics/db/models/#abstract-base-classes)".
    
It defines a couple of basic fields every model should have:
- an ID as CharField/[NanoID](https://github.com/puyuan/py-nanoid): this avoids that content could be "discovered" if using auto increment and instead is a better UUID
    
- created_at: a datetime field with "auto_now_add", so we track when the model was created.
- updated_at: a datetime field with "auto_now", so we track when the model was last updated.

The name comes from Django Reinhart father, Jean-Baptiste (or Jables, for short).

### How to use it
1. Install this package as any other requirement to your project.
2. Add `jables` to your `INSTALLED_APPS`.
3. When creating models, inherit from `JBModel`:
```py
from jables.models import JBModel

class MyModel(JBModel):
    ...
```


