[billreminder/django: 1/2] Added initial database models.
- From: Og B. Maciel <ogmaciel src gnome org>
- To: svn-commits-list gnome org
- Subject: [billreminder/django: 1/2] Added initial database models.
- Date: Thu, 30 Apr 2009 01:03:19 -0400 (EDT)
commit e6063ca5489a9c41f97d74aed8859a712b536c98
Author: Og Maciel <ogmaciel gnome org>
Date: Wed Apr 29 14:01:36 2009 -0400
Added initial database models.
---
bills/models.py | 34 ++++++++++++++++++++++++++++++++++
bills/views.py | 1 +
2 files changed, 35 insertions(+), 0 deletions(-)
diff --git a/bills/__init__.py b/bills/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/bills/models.py b/bills/models.py
new file mode 100644
index 0000000..21d206e
--- /dev/null
+++ b/bills/models.py
@@ -0,0 +1,34 @@
+from django.db import models
+
+class Category(models.Model):
+ categoryname = models.CharField(
+ "Category", max_length=50, null=False, blank=False
+ )
+ color = models.CharField(
+ "Color", max_length=14, null=False, blank=False
+ )
+
+ def __unicode__(self):
+ return self.categoryname
+
+class Bill(models.Model):
+ category = models.ForeignKey(
+ Category, null=True, blank=True
+ )
+ payee = models.CharField(
+ "Payee", max_length=50, null=False, blank=False
+ )
+ dueDate = models.DateTimeField(
+ "Due Date", null=True, blank=True
+
+ amountDue = models.DecimalField(
+ "Amount Due", max_digits=19, decimal_places=2
+ )
+
+ notes = models.TextField(
+ "Notes", blank=True
+ )
+
+ paid = models.BooleanField(
+ "Paid", default=False
+ )
diff --git a/bills/views.py b/bills/views.py
new file mode 100644
index 0000000..60f00ef
--- /dev/null
+++ b/bills/views.py
@@ -0,0 +1 @@
+# Create your views here.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]