http://www.mediawiki.org/wiki/Special:Code/MediaWiki/89239
Revision: 89239
Author: rfaulk
Date: 2011-05-31 22:56:07 +0000 (Tue, 31 May 2011)
Log Message:
-----------
Log Miner Mining reporting - this source will serve to generate reporting for
auditing on squid log mining
Added Paths:
-----------
trunk/fundraiser-statistics/fundraiser-scripts/web_reporting/LML/
trunk/fundraiser-statistics/fundraiser-scripts/web_reporting/LML/__init__.py
trunk/fundraiser-statistics/fundraiser-scripts/web_reporting/LML/models.py
trunk/fundraiser-statistics/fundraiser-scripts/web_reporting/LML/tests.py
trunk/fundraiser-statistics/fundraiser-scripts/web_reporting/LML/urls.py
trunk/fundraiser-statistics/fundraiser-scripts/web_reporting/LML/views.py
Added:
trunk/fundraiser-statistics/fundraiser-scripts/web_reporting/LML/__init__.py
===================================================================
Added:
trunk/fundraiser-statistics/fundraiser-scripts/web_reporting/LML/models.py
===================================================================
--- trunk/fundraiser-statistics/fundraiser-scripts/web_reporting/LML/models.py
(rev 0)
+++ trunk/fundraiser-statistics/fundraiser-scripts/web_reporting/LML/models.py
2011-05-31 22:56:07 UTC (rev 89239)
@@ -0,0 +1,3 @@
+from django.db import models
+
+# Create your models here.
Added: trunk/fundraiser-statistics/fundraiser-scripts/web_reporting/LML/tests.py
===================================================================
--- trunk/fundraiser-statistics/fundraiser-scripts/web_reporting/LML/tests.py
(rev 0)
+++ trunk/fundraiser-statistics/fundraiser-scripts/web_reporting/LML/tests.py
2011-05-31 22:56:07 UTC (rev 89239)
@@ -0,0 +1,16 @@
+"""
+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)
Added: trunk/fundraiser-statistics/fundraiser-scripts/web_reporting/LML/urls.py
===================================================================
--- trunk/fundraiser-statistics/fundraiser-scripts/web_reporting/LML/urls.py
(rev 0)
+++ trunk/fundraiser-statistics/fundraiser-scripts/web_reporting/LML/urls.py
2011-05-31 22:56:07 UTC (rev 89239)
@@ -0,0 +1,6 @@
+from django.conf.urls.defaults import *
+
+
+urlpatterns = patterns('',
+ (r'^$', 'LML.views.index'),
+)
Added: trunk/fundraiser-statistics/fundraiser-scripts/web_reporting/LML/views.py
===================================================================
--- trunk/fundraiser-statistics/fundraiser-scripts/web_reporting/LML/views.py
(rev 0)
+++ trunk/fundraiser-statistics/fundraiser-scripts/web_reporting/LML/views.py
2011-05-31 22:56:07 UTC (rev 89239)
@@ -0,0 +1,40 @@
+from django.shortcuts import render_to_response
+from django.http import Http404
+from django.shortcuts import render_to_response, get_object_or_404
+from django.template import RequestContext
+from django.http import HttpResponseRedirect, HttpResponse
+from django.core.urlresolvers import reverse
+
+import sys
+import os
+import datetime
+
+import Fundraiser_Tools.classes.Helper as Hlp
+import Fundraiser_Tools.classes.DataReporting as DR
+import Fundraiser_Tools.classes.DataLoader as DL
+import Fundraiser_Tools.classes.FundraiserDataHandler as FDH
+import Fundraiser_Tools.classes.TimestampProcessor as TP
+import Fundraiser_Tools.settings as projSet
+import operator
+
+
+"""
+ Index page for finding the latest camapigns. Displays a list of recent
campaigns with more than k donations over the last n hours.
+
+"""
+def index(request):
+
+ sltl = DL.SquidLogTableLoader()
+
+ # Show the squid log table
+ squid_table = sltl.get_all_rows_unique_start_time()
+
+ # Show the latest log that has been or is loading and its progress
+ completion_rate = sltl.get_completion_rate_of_latest_log()
+
+ return render_to_response('LML/index.html', {'squid_table' : squid_table,
'completion_rate' : completion_rate}, context_instance=RequestContext(request))
+
+
+
+
+
\ No newline at end of file
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs