This is a small personal accounting application built with Django and SQLite. It allows users to manage their financial accounts, record transactions (both income and expense), categorize transactions, and generate reports based on custom date ranges.
Note: This is my first project using Django and is intended for practice purposes only.
- Add financial accounts.
- Add and delete transactions.
- Categorize transactions.
- Generate financial reports for custom date ranges.
- Calculate and display total income, total expenses, and balance on the homepage.
- Responsive design using Bootstrap.
-
Clone the repository:
git clone https://github.com/mhk2012/personal_accounting.git cd personal_accounting
-
Create a virtual environment:
python -m venv env source env/bin/activate # On Windows use `env\Scripts\activate`
-
Install the dependencies:
pip install -r requirements.txt
-
Apply the migrations:
python manage.py migrate
-
(Optional) Create a superuser to access the Django admin:
python manage.py createsuperuser
-
Run the development server:
python manage.py runserver
-
Open your browser and go to
http://127.0.0.1:8000
to access the application.
- Navigate to the "Add Financial Account" page.
- Fill in the account name. If it is a bank account, also provide the bank name and account number.
- If it is a cash account, check the "Is Cash" checkbox.
- Click the "Save" button to add the account.
- Navigate to the "Add Transaction" page.
- Select a category, financial account, and transaction type (Income or Expense).
- Enter the amount and date of the transaction.
- Click the "Save" button to add the transaction.
- Navigate to the "Generate Report" page.
- Select the start and end dates for the report.
- Click the "Generate" button to view the report.
- The report will display the total income, total expenses, balance, and a detailed list of transactions within the selected date range.
personal_accounting/
│
├── accounting/
│ ├── migrations/
│ ├── templates/
│ │ ├── add_financial_account.html
│ │ ├── add_transaction.html
│ │ ├── index.html
│ │ ├── report.html
│ │ ├── report_results.html
│ │ └── base.html
│ ├── templatetags/
│ │ ├── __init__.py
│ │ ├── form_helpers.py
│ ├── __init__.py
│ ├── admin.py
│ ├── apps.py
│ ├── forms.py
│ ├── models.py
│ ├── tests.py
│ ├── urls.py
│ └── views.py
│
├── personal_accounting/
│ ├── __init__.py
│ ├── asgi.py
│ ├── settings.py
│ ├── urls.py
│ └── wsgi.py
│
├── .gitignore
├── LICENSE
├── manage.py
├── README.md
└── requirements.txt
Contributions are welcome! Please open an issue or submit a pull request with your changes.
This project is licensed under the Apache License.