Metadata-Version: 2.4
Name: maykin-common
Version: 0.3.0
Summary: Re-usable utilities for Maykin Django projects, centrally maintained instead of in default-project.
Author-email: Maykin Media <support@maykinmedia.nl>
License: Copyright 2025 Maykin Media
        
        Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
        
Project-URL: Homepage, https://github.com/maykinmedia/django-common
Project-URL: Documentation, http://maykin-django-common.readthedocs.io/en/latest/
Project-URL: Bug Tracker, https://github.com/maykinmedia/django-common/issues
Project-URL: Source Code, https://github.com/maykinmedia/django-common
Keywords: django,maykin,boilerplate
Classifier: Development Status :: 3 - Alpha
Classifier: Framework :: Django
Classifier: Framework :: Django :: 4.2
Classifier: Framework :: Django :: 5.2
Classifier: Intended Audience :: Developers
Classifier: Operating System :: Unix
Classifier: Operating System :: MacOS
Classifier: Operating System :: Microsoft :: Windows
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.12
Description-Content-Type: text/x-rst
License-File: LICENSE
Requires-Dist: django>=4.2
Provides-Extra: tests
Requires-Dist: pytest; extra == "tests"
Requires-Dist: pytest-django; extra == "tests"
Requires-Dist: pytest-cov; extra == "tests"
Requires-Dist: pytest-playwright; extra == "tests"
Requires-Dist: tox; extra == "tests"
Requires-Dist: ruff; extra == "tests"
Requires-Dist: pyright; extra == "tests"
Requires-Dist: django-stubs; extra == "tests"
Provides-Extra: docs
Requires-Dist: sphinx; extra == "docs"
Requires-Dist: sphinx-rtd-theme; extra == "docs"
Provides-Extra: release
Requires-Dist: bump-my-version; extra == "release"
Provides-Extra: pdf
Requires-Dist: weasyprint; extra == "pdf"
Provides-Extra: mfa
Requires-Dist: django-admin-index; extra == "mfa"
Requires-Dist: maykin-2fa; extra == "mfa"
Provides-Extra: axes
Requires-Dist: django-axes; extra == "axes"
Dynamic: license-file

Shared Django utilities
=======================

:Version: 0.3.0

|build-status| |code-quality| |ruff| |coverage| |docs|

|python-versions| |django-versions| |pypi-version|


Re-usable utilities for Maykin Django projects.

Maykin's Django projects all share a common base: `default-project`_ to provide a
consistent and recognizable structure accross projects. This library bundles some shared
utilities that are common in (most) projects but are too small/specific to warrant a
separate library.

maykin-common acts as a vehicle to quickly propagate changes and useful helpers to a
large number of projects that would otherwise all have to be updated manually and
one-by-one, a labour-intensive task.

**What's up with the name?**

A similar utility for the client side exists: https://github.com/maykinmedia/client-common
so we wanted to mimick this naming pattern. The NPM package has namespacing:
``@maykinmedia/client-common``, but this doesn't exist on PyPI, while using
``django-common`` as a PyPI package name *might* just be a bit arrogant.

So, the repository ``maykinmedia/django-common`` perfectly covers the contents and
purpose of the package, while the PyPI package keeps the imports short and focused:
``maykin_common``, while leaving room for potential future non-Django packages.

.. contents::

.. section-numbering::

Installation and usage
======================

See the documentation: https://maykin-django-common.readthedocs.io/en/latest/

Local development
=================

To install and develop the library locally, use:

.. code-block:: bash

    pip install -e .[tests,docs,release,pdf,mfa,axes]

When running management commands via ``django-admin``, make sure to add the root
directory to the python path (or use ``python -m django <command>``):

.. code-block:: bash

    export PYTHONPATH=. DJANGO_SETTINGS_MODULE=testapp.settings
    django-admin check
    # or other commands like:
    # django-admin makemessages -l nl

Run the tests with:

.. code-block:: bash

    tox

.. |build-status| image:: https://github.com/maykinmedia/django-common/workflows/Run%20CI/badge.svg
    :alt: Build status
    :target: https://github.com/maykinmedia/django-common/actions?query=workflow%3A%22Run+CI%22

.. |code-quality| image:: https://github.com/maykinmedia/django-common/workflows/Code%20quality%20checks/badge.svg
     :alt: Code quality checks
     :target: https://github.com/maykinmedia/django-common/actions?query=workflow%3A%22Code+quality+checks%22

.. |ruff| image:: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json
    :target: https://github.com/astral-sh/ruff
    :alt: Ruff

.. |coverage| image:: https://codecov.io/gh/maykinmedia/django-common/branch/main/graph/badge.svg
    :target: https://codecov.io/gh/maykinmedia/django-common
    :alt: Coverage status

.. |docs| image:: https://readthedocs.org/projects/maykin-django-common/badge/?version=latest
    :target: https://maykin-django-common.readthedocs.io/en/latest/?badge=latest
    :alt: Documentation Status

.. |python-versions| image:: https://img.shields.io/pypi/pyversions/maykin-common.svg

.. |django-versions| image:: https://img.shields.io/pypi/djversions/maykin-common.svg

.. |pypi-version| image:: https://img.shields.io/pypi/v/maykin-common.svg
    :target: https://pypi.org/project/maykin-common/

.. _default-project: https://bitbucket.org/maykinmedia/default-project
