

# Register your models here.Ĭlass Addmoney_infoAdmin(admin.ModelAdmin): It will help register the tables in the database. Imagefield():It stores images in the database. Integerfield():It stores integer numbers in a database.į. Charfield():It stores small and large size strings in the database.Ĭ. Foreign key: It establishes many to one relationship.ī. SELECT_CATEGORY_CHOICES, EXPENSE_CHOICES, PROFESSION_CHOICES contain the list of options that will be given while filling the expense form.Ī. Image = models.ImageField(upload_to='profile_image',blank=True) Income = models.BigIntegerField(null=True, blank=True) Savings = models.IntegerField( null=True, blank=True) Profession = models.CharField(max_length = 10, choices=PROFESSION_CHOICES) User = models.OneToOneField(User,on_delete=models.CASCADE) User = models.ForeignKey(User,default = 1, on_delete=models.CASCADE)Īdd_money = models.CharField(max_length = 10, choices = ADD_EXPENSE_CHOICES )Ĭategory = models.CharField( max_length = 20, choices = SELECT_CATEGORY_CHOICES, default ='Food') from django.db import modelsįrom import Userįrom django.db.models.signals import post_save Create the following models in models.py file in the app of your project. Models.pyĭatabase connectivity is done with the help of models.py.

Static folder will contain all the css files ,images and javascript files. Template folder will contain all the html files. django-admin startproject ExpenseTrackerĬreate a template and static folder to store your files. Write the following command on the terminal window. We will create a new project named ExpenseTracker and an app to start the project.
DAILY EXPENSE TRACKER INSTALL
To install django, write the following command on cmd or terminal window. To begin with the project, you need to install django on your system.
DAILY EXPENSE TRACKER CODE
Download Python Expense Tracker Project Codeĭownload source code of python expense tracker: Expense Tracker Project Code Project File Structure Sound knowledge of django framework, html, css, javascript and python is required before starting this Expense Tracker project of Python. Installation of django is a must to start with the Expense Tracker project. Details of expenses will be shown in the form of a pie chart on a weekly, monthly, and yearly basis. Some people earn on a daily basis, so their income can also be added on a regular basis. While filling the signup form a person will also need to fill in the details about the income and the amount he/she wants to save. In this python django project, we will create an expense tracker that will take details of our expenses. In this project, we will develop an expense tracker that will track our expenses. Inflow and Outflow record of money can be easily kept with the help of expense tracker.
DAILY EXPENSE TRACKER FREE
Free Python course with 35 real-time projects Start Now!!
