summaryrefslogtreecommitdiff
path: root/tbc/models.py
diff options
context:
space:
mode:
authorHardik Ghaghada2014-08-27 15:29:14 +0530
committerHardik Ghaghada2014-08-27 15:29:14 +0530
commit6f881d3b081b2b79ea5bf7c61ea22c0ea22b18b0 (patch)
treedad4f9c64bfe6de6ec64715137389cf5c662130e /tbc/models.py
parentc2630604122fcc628b5bd8ac15291de1b5914e9c (diff)
parent4c34f5a01df8a8f5ae8a5e47170521b05cd32913 (diff)
downloadPython-TBC-Interface-6f881d3b081b2b79ea5bf7c61ea22c0ea22b18b0.tar.gz
Python-TBC-Interface-6f881d3b081b2b79ea5bf7c61ea22c0ea22b18b0.tar.bz2
Python-TBC-Interface-6f881d3b081b2b79ea5bf7c61ea22c0ea22b18b0.zip
Merge pull request #2 from prathamesh920/log_activities
Tracking all the activities of the user.
Diffstat (limited to 'tbc/models.py')
-rw-r--r--tbc/models.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/tbc/models.py b/tbc/models.py
index 4b474f2..b3ccb30 100644
--- a/tbc/models.py
+++ b/tbc/models.py
@@ -1,6 +1,7 @@
from django.db import models
from django.contrib.auth.models import User
from PythonTBC import settings
+from django.contrib.admin.models import LogEntry
CATEGORY = (("fluid mechanics", "Fluid Mechanics"),
@@ -149,3 +150,9 @@ class SampleNotebook(models.Model):
def __unicode__(self):
notebook = self.proposal.accepted.title or 'notebook'
return '%s'%(notebook)
+
+
+class ActivityLog(LogEntry):
+ proposal_id = models.IntegerField(null=True)
+ def __unicode__(self):
+ return 'Activity log for %d' %(proposal_id)