from django.db import models

# Create your models here.
from django import forms
from datetime import datetime

class users(models.Model):
    username=models.CharField(max_length=120)
    email=models.EmailField(max_length=150)
    phone=models.CharField(max_length=12)
    pwd=models.CharField(max_length=150)

    def __str__(self):
        return self.username
class category(models.Model):
    category_name=models.CharField(max_length=100)
    def __str__(self):
        return self.category_name
class expense(models.Model):
    name=models.ForeignKey(users,on_delete=models.CASCADE)
    category_name=models.ForeignKey(category,on_delete=models.CASCADE)
    amount=models.FloatField()
    dates=models.DateField(default=datetime.now)
    def __str__(self):
        template = '{0.name} {0.category_name} {0.dates} {0.amount}'
        return template.format(self)


11c16059671fffa65551e713a32559737b3f0461
<mask token>


class expense(models.Model):
    <mask token>
    <mask token>
    <mask token>
    <mask token>

    def __str__(self):
        template = '{0.name} {0.category_name} {0.dates} {0.amount}'
        return template.format(self)

<mask token>


class users(models.Model):
    <mask token>
    <mask token>
    <mask token>
    <mask token>

    def __str__(self):
        return self.username


class category(models.Model):
    category_name = models.CharField(max_length=100)

    def __str__(self):
        return self.category_name


class expense(models.Model):
    name = models.ForeignKey(users, on_delete=models.CASCADE)
    category_name = models.ForeignKey(category, on_delete=models.CASCADE)
    amount = models.FloatField()
    dates = models.DateField(default=datetime.now)

    def __str__(self):
        template = '{0.name} {0.category_name} {0.dates} {0.amount}'
        return template.format(self)

<mask token>


class users(models.Model):
    username = models.CharField(max_length=120)
    email = models.EmailField(max_length=150)
    phone = models.CharField(max_length=12)
    pwd = models.CharField(max_length=150)

    def __str__(self):
        return self.username


class category(models.Model):
    category_name = models.CharField(max_length=100)

    def __str__(self):
        return self.category_name


class expense(models.Model):
    name = models.ForeignKey(users, on_delete=models.CASCADE)
    category_name = models.ForeignKey(category, on_delete=models.CASCADE)
    amount = models.FloatField()
    dates = models.DateField(default=datetime.now)

    def __str__(self):
        template = '{0.name} {0.category_name} {0.dates} {0.amount}'
        return template.format(self)

from django.db import models
from django import forms
from datetime import datetime


class users(models.Model):
    username = models.CharField(max_length=120)
    email = models.EmailField(max_length=150)
    phone = models.CharField(max_length=12)
    pwd = models.CharField(max_length=150)

    def __str__(self):
        return self.username


class category(models.Model):
    category_name = models.CharField(max_length=100)

    def __str__(self):
        return self.category_name


class expense(models.Model):
    name = models.ForeignKey(users, on_delete=models.CASCADE)
    category_name = models.ForeignKey(category, on_delete=models.CASCADE)
    amount = models.FloatField()
    dates = models.DateField(default=datetime.now)

    def __str__(self):
        template = '{0.name} {0.category_name} {0.dates} {0.amount}'
        return template.format(self)

from django.db import models

# Create your models here.
from django import forms
from datetime import datetime

class users(models.Model):
    username=models.CharField(max_length=120)
    email=models.EmailField(max_length=150)
    phone=models.CharField(max_length=12)
    pwd=models.CharField(max_length=150)

    def __str__(self):
        return self.username
class category(models.Model):
    category_name=models.CharField(max_length=100)
    def __str__(self):
        return self.category_name
class expense(models.Model):
    name=models.ForeignKey(users,on_delete=models.CASCADE)
    category_name=models.ForeignKey(category,on_delete=models.CASCADE)
    amount=models.FloatField()
    dates=models.DateField(default=datetime.now)
    def __str__(self):
        template = '{0.name} {0.category_name} {0.dates} {0.amount}'
        return template.format(self)

