From: Radek Czajka Date: Tue, 15 Jan 2013 09:47:14 +0000 (+0100) Subject: add honeypots X-Git-Url: https://git.mdrn.pl/prawokultury.git/commitdiff_plain/63ab75370a66f0c255e926404fe198dfcd74b880?ds=sidebyside;hp=8415fb5160bdb96359bdf7b0c23c98817e764784 add honeypots --- diff --git a/prawokultury/settings.d/30-apps.py b/prawokultury/settings.d/30-apps.py index 4ae5e23..388c0be 100644 --- a/prawokultury/settings.d/30-apps.py +++ b/prawokultury/settings.d/30-apps.py @@ -16,6 +16,7 @@ INSTALLED_APPS = ( 'sorl.thumbnail', 'piwik.django', 'django_cas', + 'honeypot', 'django.contrib.auth', 'django.contrib.contenttypes', diff --git a/prawokultury/settings.d/40-middleware.py b/prawokultury/settings.d/40-middleware.py index 47a889e..c8a63b6 100644 --- a/prawokultury/settings.d/40-middleware.py +++ b/prawokultury/settings.d/40-middleware.py @@ -5,6 +5,7 @@ MIDDLEWARE_CLASSES = ( 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', + 'honeypot.middleware.HoneypotMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', ) diff --git a/prawokultury/settings.d/50-contrib.py b/prawokultury/settings.d/50-contrib.py index 55c9811..10b4f39 100644 --- a/prawokultury/settings.d/50-contrib.py +++ b/prawokultury/settings.d/50-contrib.py @@ -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' diff --git a/questions/urls.py b/questions/urls.py index 9930956..2f3c5f2 100755 --- a/questions/urls.py +++ b/questions/urls.py @@ -14,7 +14,7 @@ urlpatterns = patterns('', name="questions" ), url(r'^(?P\d+)/$', - DetailView.as_view(model=Question), + DetailView.as_view(queryset=Question.objects.filter(published=True)), name="questions_question"), url(r'^pytanie/$', QuestionFormView.as_view(), diff --git a/requirements.txt b/requirements.txt index 757345b..d0bdc3b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -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