added attribute pynts to request model.
--- a/taskapp/models.py Wed Feb 24 16:52:03 2010 +0530
+++ b/taskapp/models.py Wed Feb 24 17:11:59 2010 +0530
@@ -141,6 +141,7 @@
replied = models.BooleanField(default = False)
task = models.ForeignKey(Task,related_name = "%(class)s_task", blank = True, null = True)
assigned_user = models.ForeignKey(User, related_name = "%(class)s_assigned_user", blank = True, null = True)
+ pynts = models.PositiveIntegerField(default=0)
class Notification(models.Model):
--- a/taskapp/utilities/request.py Wed Feb 24 16:52:03 2010 +0530
+++ b/taskapp/utilities/request.py Wed Feb 24 17:11:59 2010 +0530
@@ -16,9 +16,9 @@
req.save()
req.to = to
req.role = role
- if task is not None:
+ if task:
req.task = task
- if assigned_user is not None:
+ if assigned_user:
req.assigned_user = assigned_user
req.save()
@@ -33,7 +33,7 @@
request = Request.objects.get(id = request_id)
except Request.DoesNotExist:
return False #No such request exist
- if request.replied is not True:
+ if not request.replied:
request.reply = reply
request.replied = True
request.read = True