Created
March 13, 2011 14:45
-
-
Save kracekumar/868141 to your computer and use it in GitHub Desktop.
same type you have admin.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.db import models | |
# Create your models here. | |
class company_list(models.Model): | |
company_name=models.TextField() | |
class company_details(models.Model): | |
company_name=models.ForeignKey(company_list) | |
phone1=models.IntegerField(max_length=10) | |
phone2=models.IntegerField(max_length=10) | |
email=models.EmailField() | |
major=models.TextField() | |
class transaction(models.Model): | |
choice=(('1','PAID'),('0','UNPAID')) | |
trans_id=models.IntegerField() | |
company_list=models.ForeignKey(company_list) | |
products=models.TextField() | |
quantity=models.IntegerField() | |
price_1=models.DecimalField(max_digits=10,decimal_places=2) | |
transaction_date_time=models.DateTimeField() | |
status=models.CharField(max_length=1,choices=choice) | |
class total_price(models.Model): | |
trans_id=models.IntegerField() | |
total_price=models.DecimalField(max_digits=10,decimal_places=2) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment