Skip to content

Commit

Permalink
catch a 500 on missing image, removed delete button from clipboard
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanfoulis committed Mar 5, 2010
1 parent 226e836 commit d61b6e0
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 11 deletions.
4 changes: 2 additions & 2 deletions filer/__init__.py
@@ -1,6 +1,6 @@
""" """
django-filer - file and image management for django projects django-filer - file and image management for django projects
""" """
VERSION = (0,6,2,'a7') VERSION = (0,6,2,'a8')
__version__ = "0.6.2a7" __version__ = "0.6.2a8"
__authors__ = ["Stefan Foulis <stefan.foulis@gmail.com>", ] __authors__ = ["Stefan Foulis <stefan.foulis@gmail.com>", ]
6 changes: 5 additions & 1 deletion filer/models/filemodels.py
Expand Up @@ -110,7 +110,11 @@ def subtype(self):
return r return r
def get_admin_url_path(self): def get_admin_url_path(self):
return urlresolvers.reverse('admin:filer_file_change', args=(self.id,)) return urlresolvers.reverse('admin:filer_file_change', args=(self.id,))
def url(self): @property
def url(self):
'''
to make the model behave like a file field
'''
try: try:
r = self._file.url r = self._file.url
except: except:
Expand Down
6 changes: 0 additions & 6 deletions filer/models/imagemodels.py
Expand Up @@ -191,12 +191,6 @@ def thumbnails(self):
return self._thumbnails return self._thumbnails


@property @property
def url(self):
'''
needed to make this behave like a ImageField
'''
return self._file.url
@property
def absolute_image_url(self): def absolute_image_url(self):
return self.url return self.url
@property @property
Expand Down
4 changes: 2 additions & 2 deletions filer/templates/admin/filer/tools/clipboard/clipboard.html
Expand Up @@ -19,13 +19,13 @@
<input type="hidden" name="redirect_to" value="{{ current_url }}" /> <input type="hidden" name="redirect_to" value="{{ current_url }}" />
{% if is_popup %}<input type="hidden" name="_popup" value="1" />{% endif %} {% if is_popup %}<input type="hidden" name="_popup" value="1" />{% endif %}
<input type="submit" value="discard" /> <input type="submit" value="discard" />
</form> </form>{% comment %}
<form action="{% url admin:filer-delete_clipboard %}" method="post" style="display: inline;"> <form action="{% url admin:filer-delete_clipboard %}" method="post" style="display: inline;">
<input type="hidden" name="clipboard_id" value="{{ clipboard.id }}" /> <input type="hidden" name="clipboard_id" value="{{ clipboard.id }}" />
<input type="hidden" name="redirect_to" value="{{ current_url }}" /> <input type="hidden" name="redirect_to" value="{{ current_url }}" />
{% if is_popup %}<input type="hidden" name="_popup" value="1" />{% endif %} {% if is_popup %}<input type="hidden" name="_popup" value="1" />{% endif %}
<input type="submit" value="delete files" /> <input type="submit" value="delete files" />
</form> </form>{% endcomment %}
</td> </td>
</tr> </tr>
</tfoot> </tfoot>
Expand Down

0 comments on commit d61b6e0

Please sign in to comment.