From: Jan Szejko Date: Mon, 29 Aug 2016 13:17:00 +0000 (+0200) Subject: local changes from server X-Git-Url: https://git.mdrn.pl/prawokultury.git/commitdiff_plain/d08b51a20f492d3b62b9494b2dbeba0e162564ce local changes from server --- diff --git a/prawokultury/models.py b/prawokultury/models.py new file mode 100644 index 0000000..c759e4d --- /dev/null +++ b/prawokultury/models.py @@ -0,0 +1,33 @@ +from django.conf import settings +from django.contrib.comments.signals import comment_will_be_posted +import re + +def spamfilter(sender, comment, **kwargs): + return False + ban = [ +'cialis', +'viagra', 'generic', 'first time', 'genital', 'ficken', 'cheap', 'affiliate', 'herpes', ' your blog ' +'priceless', +'find out more', +' product ', +' concerns ', +'cheats', +'this site', +'fantastic read', +'features', +'your website', +'this blog', +'this info', +'thank you', +'thanks', +'tips and tricks', +] + for b in ban: + if b in comment.user_name.lower(): return False + if b in comment.user_url.lower(): return False + if b in comment.comment.lower(): return False + if 'http://' in comment.user_name.lower(): return False + return comment.ip_address not in getattr(settings, 'COMMENTS_IP_BLOCKED', ()) +comment_will_be_posted.connect(spamfilter) + + diff --git a/prawokultury/settings.d/35-search.py b/prawokultury/settings.d/35-search.py index 78453e2..7d0847f 100644 --- a/prawokultury/settings.d/35-search.py +++ b/prawokultury/settings.d/35-search.py @@ -6,4 +6,4 @@ HAYSTACK_CONNECTIONS = { } HAYSTACK_DOCUMENT_FIELD = "text" -HAYSTACK_SIGNAL_PROCESSOR = 'haystack.signals.RealtimeSignalProcessor' +#HAYSTACK_SIGNAL_PROCESSOR = 'haystack.signals.RealtimeSignalProcessor' diff --git a/prawokultury/settings.d/50-static.py b/prawokultury/settings.d/50-static.py index 48c84a5..a6af4e6 100644 --- a/prawokultury/settings.d/50-static.py +++ b/prawokultury/settings.d/50-static.py @@ -27,7 +27,7 @@ PIPELINE_CSS = { 'css/prevnext.scss', 'css/forms.scss', 'events/events.scss', - #'fnpdjango/annoy/annoy.css', + 'fnpdjango/annoy/annoy.css', ), 'output_filename': 'compressed/base.css', }, @@ -43,7 +43,7 @@ PIPELINE_JS = { 'source_filenames': ( 'js/promobox.js', 'shop/shop.js', - #'fnpdjango/annoy/annoy.js', + 'fnpdjango/annoy/annoy.js', ), 'output_filename': 'compressed/base.js', }, diff --git a/prawokultury/static/css/base.css b/prawokultury/static/css/base.css index 9f3b9d9..feddf60 100644 --- a/prawokultury/static/css/base.css +++ b/prawokultury/static/css/base.css @@ -1,4 +1,6 @@ -@import url(//fonts.googleapis.com/css?family=Lato:400,700,400italic); +@import url(//static.mdrn.pl/fonts/Lato-2.010/Lato-Regular.css); +@import url(//static.mdrn.pl/fonts/Lato-2.010/Lato-Bold.css); +@import url(//static.mdrn.pl/fonts/Lato-2.010/Lato-Italic.css); body { font-family: 'Lato', sans-serif; font-size: .625em; diff --git a/prawokultury/static/css/base.scss b/prawokultury/static/css/base.scss index 5e9b743..18a955a 100644 --- a/prawokultury/static/css/base.scss +++ b/prawokultury/static/css/base.scss @@ -1,4 +1,7 @@ -@import url(//fonts.googleapis.com/css?family=Lato:400,700,400italic); +@import url(//static.mdrn.pl/fonts/Lato-2.010/Lato-Regular.css); +@import url(//static.mdrn.pl/fonts/Lato-2.010/Lato-Bold.css); +@import url(//static.mdrn.pl/fonts/Lato-2.010/Lato-Italic.css); + body { font-family: 'Lato', sans-serif; diff --git a/prawokultury/static/css/forms.css b/prawokultury/static/css/forms.css index 70930a0..2f732dd 100644 --- a/prawokultury/static/css/forms.css +++ b/prawokultury/static/css/forms.css @@ -7,7 +7,7 @@ .submit-form { margin-top: 3em; } .submit-form table { - border-spacing: 0 0.5em; } + border-spacing: 0 .5em; } .submit-form tr { background-color: #fdfdfd; } .submit-form label { @@ -17,7 +17,7 @@ color: #e41b13; font-size: 1.2em; padding: 0 0 0 1.3em; - margin: 0 0 0.5em 0; + margin: 0 0 .5em 0; list-style: url("/static/img/read-more.png"); } .submit-form input, .submit-form textarea, .submit-form select { font-size: 1.2em; @@ -26,7 +26,7 @@ color: #363A3B; width: 100%; margin-bottom: .5em; - border: 1px solid #edece7; } + border: 1px solid #EDECE7; } .submit-form th, .submit-form td { text-align: left; font-weight: normal; diff --git a/prawokultury/static/img/960x150_ogolny.jpg b/prawokultury/static/img/960x150_ogolny.jpg new file mode 100644 index 0000000..e04ac94 Binary files /dev/null and b/prawokultury/static/img/960x150_ogolny.jpg differ diff --git a/prawokultury/templates/base.html b/prawokultury/templates/base.html index 011ebff..a7ba6e8 100644 --- a/prawokultury/templates/base.html +++ b/prawokultury/templates/base.html @@ -23,7 +23,7 @@ {% block "headextra" %}{% endblock %} - {# 1% {% load fnp_annoy %}{% annoy %} #} + {% load fnp_annoy %}{% annoy %}
@@ -62,7 +62,13 @@
-
+ {% comment %} + + + + {% endcomment %} + +