Skip to content

Commit

Permalink
manifestations of tidiness
Browse files Browse the repository at this point in the history
  • Loading branch information
zackmdavis committed Nov 1, 2014
1 parent 24642d7 commit 012eaf5
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 24 deletions.
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion core/views/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
7 changes: 3 additions & 4 deletions settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')

Expand Down Expand Up @@ -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'),
}
Expand All @@ -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'
Expand Down
4 changes: 2 additions & 2 deletions static/finetooth.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
15 changes: 0 additions & 15 deletions templates/includes/comment.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,3 @@
{% endwith %}
{% endfor %}
</div>

<div class="voting-area">
<a class="btn btn-success upvote"
data-pk="{{ comment.pk }}" data-kind="post"
href="javascript:void(0)">
{% bootstrap_icon 'thumbs-up' %} upvote
</a>
<a class="btn btn-danger downvote"
data-pk="{{ comment.pk }}" data-kind="post"
href="javascript:void(0)">
{% bootstrap_icon 'thumbs-down' %} downvote
</a>
<div class="vote-status" data-pk="{{ comment.pk }}" data-kind="post">
</div>
</div>

0 comments on commit 012eaf5

Please sign in to comment.