Skip to content

Commit

Permalink
[#1258] Prints to proper logging + clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
kardan committed Mar 12, 2015
1 parent a3e9ab1 commit dfd496c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
10 changes: 6 additions & 4 deletions akvo/rsr/templatetags/maps.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
< http://www.gnu.org/licenses/agpl.html >.
"""

import logging
import os
from django import template
from django.conf import settings
Expand All @@ -17,6 +18,7 @@
ProjectUpdateLocation)

register = template.Library()
logger = logging.getLogger(__name__)

PROJECT_MARKER_ICON = getattr(settings,
'GOOGLE_MAPS_PROJECT_MARKER_ICON', '')
Expand Down Expand Up @@ -49,8 +51,8 @@ def avatar(item, geometry='60x60', quality=99):
elif isinstance(item, ProjectUpdate):
url = get_thumbnail(item.photo, geometry,
crop='center', quality=quality).url
except Exception: # , e:
# print e
except Exception, e:
logger.warning(e)
pass

return url
Expand Down Expand Up @@ -95,7 +97,7 @@ def coll_map(coll, width='100%', height='100%', dynamic='dynamic'):
'pk': str(item.pk),
'text': text})
except Exception, e:
print e
logger.warning(e)
pass

return {
Expand Down Expand Up @@ -143,7 +145,7 @@ def get_location(item):
'pk': str(item.pk),
'text': text}
except Exception, e:
print e
logger.warning(e)
return []


Expand Down
4 changes: 0 additions & 4 deletions akvo/rsr/views/organisation.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,3 @@ def main(request, organisation_id):
"""The organisation main view."""
return render(request, 'organisation_main.html', {
'organisation': get_object_or_404(Organisation, pk=organisation_id)})

# def main(request, organisation_id):
# context = {'organisation': get_object_or_404(Organisation, pk=organisation_id)}
# return render(request, 'organisation_main.html', context)

0 comments on commit dfd496c

Please sign in to comment.