From 2bae28290b1802d27a560da184476b83c711c5a1 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Sun, 25 Aug 2013 17:35:32 +0200 Subject: Add images to finds (refs #1314) * an abstract model class has been defined to manage image and thumbnail with resizing on the fly * max size for images and thumbnails are set in project settings * new field have been added to Find model to save images and thumbnails * form and wizard of Find have been changed --- archaeological_finds/wizards.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'archaeological_finds/wizards.py') diff --git a/archaeological_finds/wizards.py b/archaeological_finds/wizards.py index 9effc3770..de16d2069 100644 --- a/archaeological_finds/wizards.py +++ b/archaeological_finds/wizards.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -# Copyright (C) 2012 Étienne Loks +# Copyright (C) 2012-2013 Étienne Loks # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as @@ -19,6 +19,7 @@ from django.conf import settings from django.core.exceptions import ObjectDoesNotExist +from django.core.files.storage import default_storage from django.shortcuts import render_to_response from django.template import RequestContext from django.utils.safestring import mark_safe @@ -28,6 +29,7 @@ from ishtar_common.wizards import Wizard, DeletionWizard, SourceWizard import models class FindWizard(Wizard): + file_storage = default_storage model = models.Find def get_current_contextrecord(self): -- cgit v1.2.3