Installing Django Lock Manager

(Alternative) Manual install from Git

You may wish to use the alternative installation methods if:

  • You need a feature / fix from the Git repo which hasn’t yet released as a versioned PyPi package

  • You need to install django-lockmgr on a system which has no network connection

  • You don’t trust / can’t access PyPi

  • For some reason you can’t use pip or pipenv

Option 1 - Use pip to install straight from Github

pip3 install git+https://github.com/Privex/django-lockmgr

Option 2 - Clone and install manually

# Clone the repository from Github
git clone https://github.com/Privex/django-lockmgr
cd django-lockmgr

# RECOMMENDED MANUAL INSTALL METHOD
# Use pip to install the source code
pip3 install .

# ALTERNATIVE MANUAL INSTALL METHOD
# If you don't have pip, or have issues with installing using it, then you can use setuptools instead.
python3 setup.py install

Post-installation

Django Lock Manager requires very little configuration after installation. Simply add it to your INSTALLED_APPS, and run ./manage.py migrate lockmgr to create the database tables.

Add lockmgr to your INSTALLED_APPS

INSTALLED_APPS = [
    'django.contrib.admin.apps.SimpleAdminConfig',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    # ...
    'lockmgr'
]

Run the migrations

./manage.py migrate lockmgr