Skip to main content

django ledger logo

Django Ledger

A Double Entry Accounting Engine for Django

Django Ledger is a powerful financial management system built on the Django Web Framework. It offers a simplified API for handling complex accounting tasks in financially driven applications.

Created and developed by Miguel Sanda.

FREE Get Started Guide | Join our Discord | Documentation | QuickStart Notebook

Key Features

  • High-level API
  • Double entry accounting
  • Hierarchical Chart of Accounts
  • Financial statements (Income Statement, Balance Sheet, Cash Flow)
  • Purchase Orders, Sales Orders, Bills, and Invoices
  • Financial ratio calculations
  • Multi-tenancy support
  • Ledgers, Journal Entries & Transactions
  • OFX & QFX file import
  • Closing Entries
  • Inventory management
  • Unit of Measures
  • Bank account information
  • Django Admin integration
  • Built-in Entity Management UI

Getting Involved

All pull requests are welcome, as long as they address bugfixes, enhancements, new ideas, or add value to the project in any shape or form.

Please refrain from submitting pull requests that focus solely on code linting, auto-generated code, refactoring, or similar cosmetic non-value add changes.

Who Should Contribute?

We're looking for contributors with:

  • Python and Django programming skills
  • Finance and accounting expertise
  • Interest in developing a robust accounting engine API

If you have relevant experience, especially in accounting, we welcome your pull requests or direct contact.

Installation

Django Ledger is a Django application. If you haven't, you need working knowledge of Django and a working Django project before you can use Django Ledger. A good place to start is here.

Make sure you refer to the django version you are using.

The easiest way to start is to use the zero-config Django Ledger starter template. See details here. Otherwise, you may create your project from scratch.

Adding Django Ledger to an existing project.

Add django_ledger to INSTALLED_APPS in you new Django Project.

INSTALLED_APPS = [
    ...,
    'django_ledger',
    ...,
]

Add Django Ledger Context Preprocessor

TEMPLATES = [
    {
        'OPTIONS': {
            'context_processors': [
                '...',
                'django_ledger.context.django_ledger_context'  # Add this line to a context_processors list..
            ],
        },
    },
]

Perform database migrations:

python manage.py migrate
  • Add URLs to your project's urls.py:
from django.urls import include, path

urlpatterns = [
    ...,
    path('ledger/', include('django_ledger.urls', namespace='django_ledger')),
    ...,
]

Run your project:

python manage.py runserver
  • Navigate to Django Ledger root view assigned in your project urlpatterns setting ( typically http://127.0.0.1:8000/ledger if you followed this installation guide).
  • Use your superuser credentials to login.

Deprecated behavior setting (v0.8.0+)

Starting with version v0.8.0, Django Ledger introduces the DJANGO_LEDGER_USE_DEPRECATED_BEHAVIOR setting to control access to deprecated features and legacy behaviors.

  • Default: False (deprecated features are disabled by default)
  • To temporarily keep using deprecated features while you transition, set this to True in your Django settings.

Setting Up Django Ledger for Development

Django Ledger comes with a basic development environment already configured under dev_env/ folder not to be used for production environments. If you want to contribute to the project perform the following steps:

  1. Navigate to your projects directory.
  2. Clone the repo from github and CD into project.
git clone https://github.com/arrobalytics/django-ledger.git && cd django-ledger
  1. Install PipEnv, if not already installed:
pip install -U pipenv
  1. Create virtual environment.
pipenv install

If using a specific version of Python you may specify the path.

pipenv install --python PATH_TO_INTERPRETER
  1. Activate environment.
pipenv shell
  1. Apply migrations.
python manage.py migrate
  1. Create a Development Django user.
python manage.py createsuperuser
  1. Run development server.
python manage.py runserver

How To Set Up Django Ledger for Development using Docker

  1. Navigate to your projects directory.

  2. Give executable permissions to entrypoint.sh

sudo chmod +x entrypoint.sh
  1. Add host '0.0.0.0' into ALLOWED_HOSTS in settings.py.

  2. Build the image and run the container.

docker compose up --build
  1. Add Django Superuser by running command in seprate terminal
docker ps

Select container id of running container and execute following command

docker exec -it containerId /bin/sh
python manage.py createsuperuser
  1. Navigate to http://0.0.0.0:8000/ on browser.

Run Test Suite

After setting up your development environment you may run tests.

python manage.py test django_ledger

Screenshots

django ledger entity dashboard django ledger balance sheet django ledger income statement django ledger bill django ledger invoice

Financial Statements Screenshots

balance_sheet_report income_statement_report cash_flow_statement_report

Release files for django-ledger 0.8.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-ledger 0.8.5
File Size Uploaded
django_ledger-0.8.5.tar.gz 2.4 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for django-ledger 0.8.5
File Interpreter ABI Platform
django_ledger-0.8.5-py3-none-any.whl Python 3 none any Details

Total release size: 4.9 MB

Release files / django_ledger-0.8.5.tar.gz

Download URL django_ledger-0.8.5.tar.gz
Size 2.4 MB
Tags Source
SHA-256 checksum
How to use checksums
093607864da802df7d6ac6985dd53a87db35b2307cb241dfd4d12d2970884420
BLAKE2b-256 checksum
How to use checksums
30718881aa432320ace4e3ba020a5194a45a84b772b93cfe2004be50b72179cf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.10.8 {"installer":{"name":"uv","version":"0.10.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / django_ledger-0.8.5-py3-none-any.whl

Download URL django_ledger-0.8.5-py3-none-any.whl
Size 2.6 MB
Tags Python 3
SHA-256 checksum
How to use checksums
2625a23a63ac3e78b4a24125b9332f6854b7acae6e9c189db45433a3773e3ea3
BLAKE2b-256 checksum
How to use checksums
133aaf2637de58c5b73b3705b19d9a030089b1929f7adc90ce3ff4b22faa0814
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.10.8 {"installer":{"name":"uv","version":"0.10.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

This release

0.8.5 This release

2 release files

0.8.4

2 release files

0.8.3

2 release files

0.8.2

2 release files

0.8.1

2 release files

0.8.0

2 release files

0.7.11

1 release file

0.7.10

1 release file

0.7.9

1 release file

0.7.8

1 release file

0.7.7

1 release file

0.7.6.1

1 release file

0.7.5.2

1 release file

0.7.5.1

1 release file

0.7.5

1 release file

0.7.4

1 release file

0.7.3

1 release file

0.7.2

1 release file

0.7.1

1 release file

0.7.0

1 release file

0.6.4

1 release file

0.6.3

1 release file

0.6.2

1 release file

0.6.1

1 release file

0.6.0.2

1 release file

0.6.0.1

1 release file

0.6.0

1 release file

0.5.6.5

1 release file

0.5.6.4

1 release file

0.5.6.1

1 release file

0.5.6.0

1 release file

0.5.5.5

1 release file

0.5.5.4

1 release file

0.5.5.3

1 release file

0.5.5.1

1 release file

0.5.5.0

1 release file

0.5.4.1

1 release file

0.5.4.0

1 release file

0.5.3.1

1 release file

0.5.2.9

1 release file

0.5.2.8

1 release file

0.5.2.7

1 release file

0.5.2.5

1 release file

0.5.2.4

1 release file

0.5.0.5

1 release file

0.3.19

1 release file

0.3.16

2 release files

0.3.0

2 release files

0.2.11

2 release files

0.2.10

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page