From 8447832284b1beddbd0e671f6f76fc538fdd0317 Mon Sep 17 00:00:00 2001 From: Val Neekman Date: Fri, 22 Jan 2016 12:58:14 -0500 Subject: [PATCH] fix import issue, shorten country names --- CHANGELOG.md | 9 ++++++++- toolware/__init__.py | 2 +- toolware/utils/country.py | 28 ++++++++++++++-------------- toolware/utils/mixin.py | 4 +++- 4 files changed, 26 insertions(+), 17 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5aefc61..53b258b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,13 @@ +## 0.0.12 + +BugFix & Enhancement: + + -- Shorten country names + -- Fix missing import + ## 0.0.11 -Features: +BugFix: -- Fix compatibility issues with PY2/3 diff --git a/toolware/__init__.py b/toolware/__init__.py index 00783f8..b637576 100644 --- a/toolware/__init__.py +++ b/toolware/__init__.py @@ -1,3 +1,3 @@ __author__ = 'Val Neekman [neekware.com]' __description__ = 'This application handles all common tasks. (hint: DRY)' -__version__ = '0.0.11' +__version__ = '0.0.12' diff --git a/toolware/utils/country.py b/toolware/utils/country.py index 02220b0..a41d682 100644 --- a/toolware/utils/country.py +++ b/toolware/utils/country.py @@ -33,7 +33,7 @@ ('AU', _('Australia')), ('AW', _('Aruba')), ('AZ', _('Azerbaijan')), - ('BA', _('Bosnia and Herzegovina')), + ('BA', _('Bosnia & Herzegovina')), ('BB', _('Barbados')), ('BD', _('Bangladesh')), ('BE', _('Belgium')), @@ -91,7 +91,7 @@ ('FR', _('France')), ('FX', _('France, Metropolitan')), ('GA', _('Gabon')), - ('GB', _('United Kingdom (Great Britain)')), + ('GB', _('United Kingdom')), ('GD', _('Grenada')), ('GE', _('Georgia')), ('GF', _('French Guiana')), @@ -103,7 +103,7 @@ ('GP', _('Guadeloupe')), ('GQ', _('Equatorial Guinea')), ('GR', _('Greece')), - ('GS', _('South Georgia and the South Sandwich Islands')), + ('GS', _('South Georgia & the South Sandwich Islands')), ('GT', _('Guatemala')), ('GU', _('Guam')), ('GW', _('Guinea-Bissau')), @@ -131,13 +131,13 @@ ('KH', _('Cambodia')), ('KI', _('Kiribati')), ('KM', _('Comoros')), - ('KN', _('St. Kitts and Nevis')), - ('KP', _('Korea, Democratic People\'s Republic of')), - ('KR', _('Korea, Republic of')), + ('KN', _('St. Kitts & Nevis')), + ('KP', _('North Korea')), + ('KR', _('South Korea')), ('KW', _('Kuwait')), ('KY', _('Cayman Islands')), ('KZ', _('Kazakhstan')), - ('LA', _('Lao People\'s Democratic Republic')), + ('LA', _('Lao')), ('LB', _('Lebanon')), ('LC', _('Saint Lucia')), ('LI', _('Liechtenstein')), @@ -147,10 +147,10 @@ ('LT', _('Lithuania')), ('LU', _('Luxembourg')), ('LV', _('Latvia')), - ('LY', _('Libyan Arab Jamahiriya')), + ('LY', _('Libya')), ('MA', _('Morocco')), ('MC', _('Monaco')), - ('MD', _('Moldova, Republic of')), + ('MD', _('Moldova')), ('MG', _('Madagascar')), ('MH', _('Marshall Islands')), ('ML', _('Mali')), @@ -216,7 +216,7 @@ ('SR', _('Suriname')), ('ST', _('Sao Tome & Principe')), ('SV', _('El Salvador')), - ('SY', _('Syrian Arab Republic')), + ('SY', _('Syria')), ('SZ', _('Swaziland')), ('TC', _('Turks & Caicos Islands')), ('TD', _('Chad')), @@ -232,15 +232,15 @@ ('TR', _('Turkey')), ('TT', _('Trinidad & Tobago')), ('TV', _('Tuvalu')), - ('TW', _('Taiwan, Province of China')), - ('TZ', _('Tanzania, United Republic of')), + ('TW', _('Taiwan')), + ('TZ', _('Tanzania')), ('UA', _('Ukraine')), ('UG', _('Uganda')), ('UM', _('United States Minor Outlying Islands')), - ('US', _('United States of America')), + ('US', _('United States')), ('UY', _('Uruguay')), ('UZ', _('Uzbekistan')), - ('VA', _('Vatican City State (Holy See)')), + ('VA', _('Vatican City')), ('VC', _('St. Vincent & the Grenadines')), ('VE', _('Venezuela')), ('VG', _('British Virgin Islands')), diff --git a/toolware/utils/mixin.py b/toolware/utils/mixin.py index 6c498d8..88f9f02 100644 --- a/toolware/utils/mixin.py +++ b/toolware/utils/mixin.py @@ -1,4 +1,6 @@ import json + +from django.conf import settings from django.contrib.auth.decorators import login_required from django.views.decorators.debug import sensitive_post_parameters from django.views.decorators.csrf import csrf_protect @@ -7,7 +9,7 @@ from django.utils.decorators import method_decorator from django.shortcuts import redirect from django.http import HttpResponse -from django.conf import settings +from django.contrib import messages from django.views.decorators.http import require_http_methods from .. import defaults as defs