From 012eaf5d870fbc30fed0fcfe664f7f45135767c4 Mon Sep 17 00:00:00 2001 From: "Zack M. Davis" Date: Fri, 31 Oct 2014 22:14:43 -0700 Subject: [PATCH] manifestations of tidiness --- .gitignore | 2 -- core/views/views.py | 2 +- settings.py | 7 +++---- static/finetooth.js | 4 ++-- templates/includes/comment.html | 15 --------------- 5 files changed, 6 insertions(+), 24 deletions(-) diff --git a/.gitignore b/.gitignore index 68b4bc5..7609d0f 100644 --- a/.gitignore +++ b/.gitignore @@ -36,8 +36,6 @@ htmlcov/ # the SQLite database db.sqlite3 - - # sentinel file whose existence is used to decide whether it is the # case that we're in a dev environment (and should use the # corresponding Django settings) diff --git a/core/views/views.py b/core/views/views.py index b197e6c..6b178bc 100644 --- a/core/views/views.py +++ b/core/views/views.py @@ -118,7 +118,7 @@ def add_comment(request, post_pk): reverse("show_post", args=year_month_slug) + fragment_identifier ) else: - messages.error(request, "Comments may not be blank.") + messages.warning(request, "Comments may not be blank.") return redirect('show_post', *year_month_slug) def show_profile(request, username): diff --git a/settings.py b/settings.py index af2eeba..d6acf6e 100644 --- a/settings.py +++ b/settings.py @@ -10,7 +10,8 @@ DEBUG = os.environ.get('DEBUG') or IS_DEVELOPMENT if IS_DEVELOPMENT: - SECRET_KEY = os.environ.get('SECRET_KEY') or "fake_development_unsecret_key" + SECRET_KEY = (os.environ.get('SECRET_KEY') + or "fake_development_unsecret_key") else: SECRET_KEY = os.environ.get('SECRET_KEY') @@ -48,8 +49,6 @@ if IS_DEVELOPMENT: DATABASES = { 'default': { - # I <3 SQLite but maybe consider Postgres if/when deploying this - # somewhere 'ENGINE': 'django.db.backends.sqlite3', 'NAME': os.path.join('db.sqlite3'), } @@ -62,7 +61,7 @@ AUTH_REDIRECT_URL = "/" -if DEBUG: +if DEBUG and IS_DEVELOPMENT: PASSWORD_HASHERS = ('django.contrib.auth.hashers.MD5PasswordHasher',) LANGUAGE_CODE = 'en-us' diff --git a/static/finetooth.js b/static/finetooth.js index e74cdc4..9882ce7 100644 --- a/static/finetooth.js +++ b/static/finetooth.js @@ -126,8 +126,8 @@ function voteStatusSelector(pk) { } function renderVoteStatus(pk, success, message) { - var statusClass = success ? "label-success" : "label-danger"; - var notStatusClass = success ? "label-danger" : "label-success"; + var statusClass = success ? "label-success" : "label-warning"; + var notStatusClass = success ? "label-warning" : "label-success"; var statusSelector = voteStatusSelector(pk); var $statusDiv = $(statusSelector) $statusDiv.addClass(statusClass).removeClass(notStatusClass); diff --git a/templates/includes/comment.html b/templates/includes/comment.html index 0ce0f0b..0cac334 100644 --- a/templates/includes/comment.html +++ b/templates/includes/comment.html @@ -27,18 +27,3 @@ {% endwith %} {% endfor %} - -
- - {% bootstrap_icon 'thumbs-up' %} upvote - - - {% bootstrap_icon 'thumbs-down' %} downvote - -
-
-