Skip to content

Commit

Permalink
Enable django.contrib.humanize for template engine
Browse files Browse the repository at this point in the history
  • Loading branch information
dougwt committed Nov 19, 2014
1 parent c277897 commit 5e237c9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
3 changes: 2 additions & 1 deletion kartographer/comparison/templates/comparison/home.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{% extends "comparison/list.html" %}
{% load staticfiles %}
{% load humanize %}

{% block head_extra %}
<link rel="stylesheet" href="{% static 'css/home.css' %}">
Expand All @@ -13,7 +14,7 @@
<div id="content-header" class="row">
<div class="col-xs-12 col-sm-8">
<h4>Add one or more Mario Kart 8 loadouts to compare stats.</h4>
<p><small>No more scrolling back and forth between kart components using in-game menus! Now you can plan the best possible loadout for your driving style by comparing any of the {{ total_combinations }} possible kart loadouts in a user-friendly layout.</small></p>
<p><small>No more scrolling back and forth between kart components using in-game menus! Now you can plan the best possible loadout for your driving style by comparing any of the {{ total_combinations|intcomma }} possible kart loadouts in a user-friendly layout.</small></p>
</div>
<div class="hidden-xs col-sm-4 text-center">
<img src="{% static 'images/mk8/koopalings.png' %}" alt="Hold on to your hats.">
Expand Down
3 changes: 0 additions & 3 deletions kartographer/comparison/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,6 @@ def home(request):
Wheel.objects.count() * \
Glider.objects.count()

locale.setlocale(locale.LC_ALL, 'en_US')
total_combinations = locale.format("%d", total_combinations, grouping=True)

context = {
'characterstats': CharacterStats.objects.all(),
'characters': Character.objects.select_related().all(),
Expand Down
2 changes: 1 addition & 1 deletion kartographer/kartographer/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@
'django.contrib.staticfiles',

# Useful template tags:
# 'django.contrib.humanize',
'django.contrib.humanize',

# Admin panel and documentation:
'django.contrib.admin',
Expand Down

0 comments on commit 5e237c9

Please sign in to comment.