Commits

Anonymous committed a817075 Draft

initial

Comments (0)

Files changed (6)

+# use glob syntax.
+syntax: glob
+
+*.swp
+*.pyc
+*~

__init__.py

Empty file added.
+# -*- coding:utf-8 -*-
+import datetime
+
+
+class OnlineUserMiddleware(object):
+
+    def process_request(self, request):
+        if not request.user.is_authenticated():
+            return
+        userModel = request.user.get_profile()
+        userModel.last_activity = datetime.datetime.now()
+        userModel.save()
+        return None

models.py

Empty file added.
+"""
+This file demonstrates writing tests using the unittest module. These will pass
+when you run "manage.py test".
+
+Replace this with more appropriate tests for your application.
+"""
+
+from django.test import TestCase
+
+
+class SimpleTest(TestCase):
+    def test_basic_addition(self):
+        """
+        Tests that 1 + 1 always equals 2.
+        """
+        self.assertEqual(1 + 1, 2)
+# Create your views here.