panosl / django-currencies

django-currencies allows you to define different currencies, and includes template tags/filters to allow easy conversion between them.
http://pypi.python.org/pypi/django-currencies
BSD 3-Clause "New" or "Revised" License
94 stars 81 forks source link

Features: info field and population, currencies file caching & Currency ISO source support #46

Closed racitup closed 7 years ago

racitup commented 7 years ago

More useful features:

I've tried the merge into panosl/master and it worked fine for me. Not sure what github is complaining about: "Can't automatically merge."

panosl commented 7 years ago

The diff shows up as:

→ git diff racitup-other-info master -- currencies/templates/currencies/navbar/currency-chooser-bs3fa.html
diff --git a/currencies/templates/currencies/navbar/currency-chooser-bs3fa.html b/currencies/templates/currencies/navbar/currency-chooser-bs3fa.html
index e7852b6..d3f99a0 100644
--- a/currencies/templates/currencies/navbar/currency-chooser-bs3fa.html
+++ b/currencies/templates/currencies/navbar/currency-chooser-bs3fa.html
@@ -1,15 +1,18 @@
 {% load currency %}{% spaceless %}
 {% comment %} Example BS3 FA currency-chooser {% endcomment %}
-{% if CURRENCIES|length > 1 and not currency_dropdown_hidden %}
+
+{% currency_context %}
+
+{% if CURRENCIES|length > 1 %}
 <li class="dropdown {{ dropdown_extra_class }}" dropdown>
     <a class="dropdown-toggle" title="{{ CURRENCY.name }}" dropdown-toggle>
         <i class="fa fa-money"></i>&nbsp;{{ CURRENCY_CODE }}&nbsp;<b class="caret"></b>
     </a>
     <ul class="dropdown-menu" role="menu">
     {% for curr in CURRENCIES %}
-        <li{% ifequal curr.code CURRENCY.code %} class="active"{% endifequal %}>
+        <li{% ifequal curr.code CURRENCY_CODE %} class="active"{% endifequal %}>
             <a href="{% url 'currencies_set_currency' %}?currency_code={{ curr.code }}"
-                title="{{ curr.name }}">{{ curr.symbol }}&nbsp;{{ curr.code }}</a>
+                title="{{ curr.name }}">{{ curr.symbol|default:"&nbsp;" }}&nbsp;{{ curr.code }}</a>
         </li>
     {% endfor %}
     </ul>
racitup commented 7 years ago

I don't understand; the currency chooser wasn't modified in this PR? Your master already has your quoted diff change.

panosl commented 7 years ago

It appears it is mate, can you please have that cleaned up and so we can merge this?

Also we're gonna need to have these new stuff tested at some point, but for now let's just merge that and see how much we can have tests for to put a new release out there.

racitup commented 7 years ago

Sorry, I don't know what to clean up! The commits listed in this PR don't change that file. Unfortunately I don't know how to write test cases, though I should learn! It's all been tested manually.

panosl commented 7 years ago

if you go here: https://github.com/racitup/django-currencies/blob/other-info/currencies/templates/currencies/navbar/currency-chooser-bs3fa.html

and switch between your own branches (master / other-info) you'll see that there are changes between the two.

screenshot 2016-12-03 22 48 21

Now which one do you want to keep?

racitup commented 7 years ago

That appears to have done the trick!