Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/bandwagon/forms.py3
-rw-r--r--apps/bandwagon/models.py3
-rw-r--r--apps/bandwagon/tasks.py3
-rw-r--r--apps/bandwagon/templates/bandwagon/includes/addedit.html9
-rw-r--r--apps/bandwagon/views.py3
5 files changed, 10 insertions, 11 deletions
diff --git a/apps/bandwagon/forms.py b/apps/bandwagon/forms.py
index 7ce311a..c9197f9 100644
--- a/apps/bandwagon/forms.py
+++ b/apps/bandwagon/forms.py
@@ -188,7 +188,6 @@ class CollectionForm(ModelForm):
if icon:
c.icontype = 'image/png'
-
c.save()
if icon:
@@ -207,8 +206,6 @@ class CollectionForm(ModelForm):
fh.close()
tasks.resize_icon.delay(tmp_destination, destination)
- c.save()
-
return c
diff --git a/apps/bandwagon/models.py b/apps/bandwagon/models.py
index 9678234..71759ef 100644
--- a/apps/bandwagon/models.py
+++ b/apps/bandwagon/models.py
@@ -1,6 +1,7 @@
-import collections, os
+import collections
from datetime import datetime
import hashlib
+import os
import time
import uuid
diff --git a/apps/bandwagon/tasks.py b/apps/bandwagon/tasks.py
index aafae43..69a2376 100644
--- a/apps/bandwagon/tasks.py
+++ b/apps/bandwagon/tasks.py
@@ -54,8 +54,7 @@ def delete_icon(dst):
log.info('[1@None] Deleting icon: %s.' % dst)
if not dst.startswith(settings.COLLECTIONS_ICON_PATH):
- log.error("Someone tried deleting something they shouldn't: %s"
- % dst)
+ log.error("Someone tried deleting something they shouldn't: %s" % dst)
return
try:
diff --git a/apps/bandwagon/templates/bandwagon/includes/addedit.html b/apps/bandwagon/templates/bandwagon/includes/addedit.html
index 5a47825..7f16c22 100644
--- a/apps/bandwagon/templates/bandwagon/includes/addedit.html
+++ b/apps/bandwagon/templates/bandwagon/includes/addedit.html
@@ -19,8 +19,8 @@
</p>
{% endif %}
<p>
- <label for="id_description">{{ form.description.label|safe }}</label> {{ _('(optional)') }}
- {{ form.description|safe }}
+ <label for="id_description">{{ form.description.label|safe }}</label>
+ {{ form.description|safe }}
</p>
{{ form.icon|safe }}
<div id="collection_listed">
@@ -29,7 +29,10 @@
</div>
<div id="icon_form">
- <label for="id_icon">{{ form.icon.label|safe }}</label> {{ _('(optional)') }}
+ <label for="id_icon">
+ {{ form.icon.label|safe }}
+ <span class="optional">{{ _('(optional)') }}</span>
+ </label>
<div id="icon_upload">
{% if collection %}
<div class="icon_preview">
diff --git a/apps/bandwagon/views.py b/apps/bandwagon/views.py
index 0e9a0e5..4871eef 100644
--- a/apps/bandwagon/views.py
+++ b/apps/bandwagon/views.py
@@ -482,10 +482,9 @@ def delete(request, username, slug):
@owner_required
@json_view
def delete_icon(request, collection, username, slug):
-
log.debug(u"User deleted collection (%s) icon " % slug)
tasks.delete_icon(os.path.join(collection.get_img_dir(),
- '%d.png' % collection.id))
+ '%d.png' % collection.id))
collection.icontype = ''
collection.save()