Commit 1a4ef5a6 by benjaoming

Add links plugin to testproject. Do not fail if an attachment file has disappeared.

parent 2b8c7f46
...@@ -108,8 +108,9 @@ INSTALLED_APPS = ( ...@@ -108,8 +108,9 @@ INSTALLED_APPS = (
'django_notify', 'django_notify',
'sorl.thumbnail', 'sorl.thumbnail',
'wiki', 'wiki',
'wiki.plugins.images',
'wiki.plugins.help', 'wiki.plugins.help',
'wiki.plugins.links',
'wiki.plugins.images',
'wiki.plugins.attachments', 'wiki.plugins.attachments',
'wiki.plugins.notifications', 'wiki.plugins.notifications',
'mptt', 'mptt',
...@@ -144,4 +145,4 @@ LOGGING = { ...@@ -144,4 +145,4 @@ LOGGING = {
} }
} }
WIKI_ANONYMOUS_WRITE = True WIKI_ANONYMOUS_WRITE = True
\ No newline at end of file
...@@ -35,4 +35,4 @@ def load(modname, verbose=False, failfast=False): ...@@ -35,4 +35,4 @@ def load(modname, verbose=False, failfast=False):
get_module(app, modname, verbose, failfast) get_module(app, modname, verbose, failfast)
def load_wiki_plugins(): def load_wiki_plugins():
load('wiki_plugin', verbose=True) load('wiki_plugin', verbose=False)
...@@ -99,6 +99,8 @@ class AttachmentRevision(BaseRevisionMixin, models.Model): ...@@ -99,6 +99,8 @@ class AttachmentRevision(BaseRevisionMixin, models.Model):
"""Used to retrieve the file size and not cause exceptions.""" """Used to retrieve the file size and not cause exceptions."""
try: try:
return self.file.size return self.file.size
except OSError:
return None
except ValueError: except ValueError:
return None return None
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment