]> git.openstreetmap.org Git - osqa.git/commitdiff
Updated stats module
authorJavyer DerDerian <javierder@gmail.com>
Mon, 15 Dec 2014 18:51:42 +0000 (13:51 -0500)
committerJavyer DerDerian <javierder@gmail.com>
Mon, 15 Dec 2014 18:51:42 +0000 (13:51 -0500)
README
forum_modules/stats/__init__.py [moved from forum_modules/updates/__init__.py with 100% similarity]
forum_modules/stats/base.py [moved from forum_modules/updates/base.py with 100% similarity]
forum_modules/stats/settings.py [moved from forum_modules/updates/settings.py with 67% similarity]
forum_modules/stats/startup.py [moved from forum_modules/updates/startup.py with 100% similarity]
forum_modules/stats/templates/index.html [moved from forum_modules/updates/templates/index.html with 90% similarity]
forum_modules/stats/urls.py [new file with mode: 0644]
forum_modules/stats/views.py [moved from forum_modules/updates/views.py with 69% similarity]
forum_modules/updates/urls.py [deleted file]
settings_local.py.dist

diff --git a/README b/README
index 554535d209dce5baa4066bf57a6aa74b65f10aaf..fabc08a5e306c0b194951fc7848b347ca1a00040 100644 (file)
--- a/README
+++ b/README
@@ -5,3 +5,4 @@ Homepage - http://www.osqa.net
 Bug tracking - http://jira.osqa.net
 Wiki - http://wiki.osqa.net
 
+* The ‘stats’ module sends install info to our OSQA directory, including number of users, number of questions, and the email addresses of the super users.  These email addresses are not sold to any third party.
\ No newline at end of file
similarity index 67%
rename from forum_modules/updates/settings.py
rename to forum_modules/stats/settings.py
index 6f683107b479f5a3245d4a9cd157bf38d91ec377..e4ff4012bed759f5fd7498e7198ddf964354592c 100644 (file)
@@ -5,12 +5,12 @@ from django.utils.translation import ugettext_lazy as _
 
 from base import generate_installation_key
 
-UPDATER_SET = SettingSet('updater', _('Updater Settings'), _("OSQA Update Checker Settings."), 100)
+STATS_SET = SettingSet('stats', _('Stats Settings'), _("OSQA Stats Settings."), 100)
 
-CHECK_FOR_UPDATES = Setting('CHECK_FOR_UPDATES', True, UPDATER_SET, dict(
+CHECK_FOR_UPDATES = Setting('CHECK_FOR_UPDATES', True, STATS_SET, dict(
 label = "Check for updates",
 help_text = _("""
-Use the OSQA update server recieve notifications about the latest updates.
+Use the OSQA stats server recieve notifications about the latest updates.
 """),
 required=False))
 
similarity index 90%
rename from forum_modules/updates/templates/index.html
rename to forum_modules/stats/templates/index.html
index d07d9e3c6f1222dfc70c12ca9b8f9be2e136fdfc..04c2f67f1d3f6eec42a56182a031aa5148f3f26f 100644 (file)
@@ -43,7 +43,7 @@ $(function() {
 
 {% block admincontent %}
 
-<a href="{% url "updater_check" %}" id="check_for_updates" class="button">{% trans "Check for Updates" %}</a>
+<a href="{% url "stats_check" %}" id="check_for_updates" class="button">{% trans "Check for Updates" %}</a>
 <div id="update_check_status"></div>
 
 {% endblock %}
diff --git a/forum_modules/stats/urls.py b/forum_modules/stats/urls.py
new file mode 100644 (file)
index 0000000..f4669a8
--- /dev/null
@@ -0,0 +1,8 @@
+from django.conf.urls import patterns, url, include
+from django.utils.translation import ugettext as _
+
+from views import stats_index, stats_check
+
+urlpatterns = patterns('',
+    url(r'^%s%s%s$' % (_('admin/'), _('stats/'), _('check/')),  stats_check, name='stats_check'),
+)
similarity index 69%
rename from forum_modules/updates/views.py
rename to forum_modules/stats/views.py
index 27008f250497f54610801ada1274f3fddf386bd7..12a58ab9d8febd43a3be1024b570e57b8be24ac7 100644 (file)
@@ -5,16 +5,16 @@ from base import check_for_updates
 
 from forum.views.admin import admin_tools_page, admin_page
 
-@admin_tools_page(_('updater'), _('Update Checker'))
-def updater_index(request):
+@admin_tools_page(_('stats'), _('Stats Module'))
+def stats_index(request):
     return (
-        'modules/updates/index.html',
+        'modules/stats/index.html',
         {
 
         },
     )
 
-def updater_check(request):
+def stats_check(request):
     update_status = check_for_updates()
 
     return HttpResponse(update_status, mimetype='text/html')
diff --git a/forum_modules/updates/urls.py b/forum_modules/updates/urls.py
deleted file mode 100644 (file)
index 58ad7ac..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-from django.conf.urls import patterns, url, include
-from django.utils.translation import ugettext as _
-
-from views import updater_index, updater_check
-
-urlpatterns = patterns('',
-    url(r'^%s%s%s$' % (_('admin/'), _('updater/'), _('check/')),  updater_check, name='updater_check'),
-)
index e687228a3084c98c9c8ced11f603ad2e9589be6b..b85d89b9b96e4d345658f80d4f49d81f07f37240 100644 (file)
@@ -79,4 +79,4 @@ LANGUAGE_CODE = 'en'
 
 OSQA_DEFAULT_SKIN = 'default'
 
-DISABLED_MODULES = ['books', 'recaptcha', 'project_badges']
+DISABLED_MODULES = ['books', 'recaptcha', 'project_badges', 'stats']