add honeypots
authorRadek Czajka <radoslaw.czajka@nowoczesnapolska.org.pl>
Tue, 15 Jan 2013 09:47:14 +0000 (10:47 +0100)
committerRadek Czajka <radoslaw.czajka@nowoczesnapolska.org.pl>
Tue, 15 Jan 2013 09:47:14 +0000 (10:47 +0100)
prawokultury/settings.d/30-apps.py
prawokultury/settings.d/40-middleware.py
prawokultury/settings.d/50-contrib.py
questions/urls.py
requirements.txt

index 4ae5e23..388c0be 100644 (file)
@@ -16,6 +16,7 @@ INSTALLED_APPS = (
     'sorl.thumbnail',
     'piwik.django',
     'django_cas',
+    'honeypot',
 
     'django.contrib.auth',
     'django.contrib.contenttypes',
index 47a889e..c8a63b6 100644 (file)
@@ -5,6 +5,7 @@ MIDDLEWARE_CLASSES = (
 
     'django.middleware.common.CommonMiddleware',
     'django.middleware.csrf.CsrfViewMiddleware',
+    'honeypot.middleware.HoneypotMiddleware',
     'django.contrib.auth.middleware.AuthenticationMiddleware',
 )
 
index 55c9811..10b4f39 100644 (file)
@@ -15,3 +15,5 @@ GRAVATAR_DEFAULT_IMAGE = 'http://localhost:8000/static/img/avatar.png'
 
 CAS_SERVER_URL = 'http://logowanie.nowoczesnapolska.org.pl/cas/'
 CAS_VERSION = '1'
+
+HONEYPOT_FIELD_NAME='miut'
index 9930956..2f3c5f2 100755 (executable)
@@ -14,7 +14,7 @@ urlpatterns = patterns('',
         name="questions"
     ),
     url(r'^(?P<pk>\d+)/$',
-        DetailView.as_view(model=Question),
+        DetailView.as_view(queryset=Question.objects.filter(published=True)),
         name="questions_question"),
     url(r'^pytanie/$',
         QuestionFormView.as_view(),
index 757345b..d0bdc3b 100644 (file)
@@ -6,6 +6,7 @@ South>=0.7.4
 PIL
 sorl-thumbnail>=11.09,<12
 django-pagination
+django-honeypot
 
 django-migdal>=0.3,<0.4
 fnpdjango>=0.1.4,<0.2
@@ -20,6 +21,6 @@ django-pipeline>=1.2,<1.3
 #git+git://github.com/Kronuz/pyScss.git@d8f4da23a3c87696a75b3830ed4ab49b75550a93#egg=pyScss
 #TODO: pyScss support, for now just install sass
 
--e git+https://github.com/toastdriven/django-haystack.git@master#egg=django-haystack
+-e git+https://github.com/toastdriven/django-haystack.git@61b377d97efd5390c60c5a37acd009b8e69eb2f3#egg=django-haystack
 pysolr
 piwik