[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [pups/master] new Issue model for stats



commit 141493125e29668f9dee1ee0b05d960018eeddb5
Author: Sherief Alaa <sheriefalaa.w@xxxxxxxxx>
Date:   Sun May 18 01:37:21 2014 +0300

    new Issue model for stats
---
 stats/models.py |   41 ++++++++++++++++++++++++++++++++---------
 1 file changed, 32 insertions(+), 9 deletions(-)

diff --git a/stats/models.py b/stats/models.py
index 5880724..4e4d5b6 100644
--- a/stats/models.py
+++ b/stats/models.py
@@ -1,13 +1,36 @@
+# This file is part of Pups, a django/python project which contains
+# web support tools
+#
+#  Author: Sherief Alaa <sheriefalaa.w@xxxxxxxxx>
+#
+#  Copyright:
+#   (c) 2014 Sherief Alaa.
+#   (c) 2014 The Tor Project, Inc.
+#
+# Pups is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Pups is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Pups.  If not, see <http://www.gnu.org/licenses/>.
+
 from django.db import models
 
-# # Create your models here.
 
+class Issue(models.Model):
+    issue_id = models.CharField(max_length=64)
+    text = models.TextField()
+    frequency = models.IntegerField()
+    created_by = models.CharField(max_length=64)
+    is_locked = models.BooleanField()
+    locked_by = models.CharField(max_length=64)
+    last_edited_by = models.CharField(max_length=64)
 
-# class Question(models.Model):
-# 	q_id
-# 	text
-# 	frequency
-#	created_by
-# 	created_at
-#   last_edited_by
-# 	is_locked
+    def __unicode__(self):
+        return u'ID: %s Owner: %s Text: %s' % (self.issue_id, self.owner, self.text)

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits