From 1b7b94bb46e7e90e4a7e93e05b3318fdf8d6dcf4 Mon Sep 17 00:00:00 2001 From: Jasvir Singh Date: Wed, 9 Jul 2014 09:57:12 +0530 Subject: [PATCH 1/2] There is no need to push mogrations folder. It'll be created automatically when we make migrations. --- src/librehatti/suspense/migrations/__init__.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 src/librehatti/suspense/migrations/__init__.py diff --git a/src/librehatti/suspense/migrations/__init__.py b/src/librehatti/suspense/migrations/__init__.py deleted file mode 100644 index e69de29..0000000 From f6e46bfef2135693fb934a4e6337821354bec26d Mon Sep 17 00:00:00 2001 From: Jasvir Singh Date: Wed, 9 Jul 2014 10:05:38 +0530 Subject: [PATCH 2/2] Models for staff and department added. --- src/librehatti/suspense/models.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/librehatti/suspense/models.py b/src/librehatti/suspense/models.py index fe97292..f76b8a1 100644 --- a/src/librehatti/suspense/models.py +++ b/src/librehatti/suspense/models.py @@ -13,3 +13,22 @@ class SuspenseClearance(models.Model): field_testing_staff = models.CharField(max_length=200) Test_date = models.DateTimeField(auto_now_add=True) Clear_date = models.DateTimeField(auto_now_add=True) + +class Department(models.Model): + title = models.CharField(max_length=50) + address = models.CharField(max_length=150) + phone = models.CharField(max_length=20, blank=True) + dean = models.CharField(max_length=50, blank=True) + def __unicode__(self): + return self.title + +class Staff(models.Model): + department = models.ForeignKey(Department) + code = models.CharField(max_length=5) + name = models.CharField(max_length=50) + daily_income = models.IntegerField(blank=True) + position = models.CharField(max_length=100) + lab = models.ForeignKey(Lab) + email =models.EmailField(blank=True) + def __unicode__(self): + return self.name