Skip to content

Commit

Permalink
Fixing progress bar
Browse files Browse the repository at this point in the history
  • Loading branch information
Iago Veloso committed Jun 25, 2017
1 parent aead3b3 commit 41d1e00
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions docs/source/upgrade/3.2.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ What's new in 3.2
* Adding cache to singleton models using memcached
* Improve performance `in staging config <https://github.com/iago1460/django-radio/tree/master/radioco/configs/staging>`_ using nginx cache, uwsgi and caching templates
* Updating Spanish and Galician translations
* Fixing progress bar in the main page


********************
Expand Down Expand Up @@ -45,6 +46,7 @@ You should be able to keep your current database but make sure to create a backu

.. code-block:: bash
python manage.py collectstatic
python manage.py migrate
Expand Down
4 changes: 2 additions & 2 deletions radioco/apps/radioco/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ def index(request):
try:
live_transmission = transmissions_between.next()
if live_transmission.start <= now < live_transmission.end:
percentage = round(
percentage = int(round(
(now - live_transmission.start).total_seconds() /
(live_transmission.end - live_transmission.start).total_seconds() * 100)
(live_transmission.end - live_transmission.start).total_seconds() * 100))
else:
next_transmissions.append(live_transmission)
live_transmission = None
Expand Down

0 comments on commit 41d1e00

Please sign in to comment.