Skip to main content

License Latest PyPI version Build Status Coverage Status Code style: black

Django Version Control

A third-party Django application generated with django-plugin-template-cookiecutter.

Quick Start

1. Installation

Install the package via pip:

pip install version_control

2. Configuration

Add "version_control" to your INSTALLED_APPS setting:

INSTALLED_APPS = [
    # ...existing apps...
    "version_control",
]

Enable the middleware by adding it to your MIDDLEWARE setting:

MIDDLEWARE = [
    # ...existing middleware...
    "version_control.middleware.VersionControlMiddleware",
]

3. Version Control Dependencies

Depending on the version control system used by your project, install the corresponding third-party modules:

For Git projects:

pip install GitPython

For Mercurial projects:

pip install hglib         # Python 3.x
pip install python-hglib  # Python 2.7.x

For projects with bumpversion:

pip install bumpversion

Supported Backends

You can explicitly set which backend to use by defining VERSION_CONTROL_BACKEND in your settings.py. The available backends are:

Git

Requires the GitPython dependency.

VERSION_CONTROL_BACKEND = "version_control.backends.git.GitBackend"

Mercurial

Requires the hglib (or python-hglib) dependency.

VERSION_CONTROL_BACKEND = "version_control.backends.mercurial.MercurialBackend"

Bumpversion

Reads the version directly from your bumpversion configuration.

VERSION_CONTROL_BACKEND = "version_control.bumpversion.BumpversionVersionControlBackend"

Dummy

A basic backend useful for testing or local development environments that lack a version control system.

VERSION_CONTROL_BACKEND = "version_control.dummy.DummyBackend"

Download files

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

Source Distribution

version_control-0.0.9.tar.gz (6.9 kB view details)

Uploaded Source

File details

Details for the file version_control-0.0.9.tar.gz.

File metadata

  • Download URL: version_control-0.0.9.tar.gz
  • Upload date:
  • Size: 6.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.2

File hashes

Hashes for version_control-0.0.9.tar.gz
Algorithm Hash digest
SHA256 a6d3765f642f4af5e985ff587f81c26d38dff4bd3d03339d7968551d47c1c8b0
MD5 04f222684a8ca0c1d566ff03fb6365d5
BLAKE2b-256 9c9b39df0349c6f05a3e0d3683c50ff11d06ee531db9647f5f13d112d0b2cf89

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.0.9 This release

1 file

0.0.8

1 file

0.0.7

2 files

0.0.6

1 file

0.0.5

2 files

0.0.4

2 files

0.0.2

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