Changeset 7094


Ignore:
Timestamp:
12 Nov 2011, 21:14:46 (13 years ago)
Author:
Henrik Bettermann
Message:

Remove self.context._p_changed = True. In my opinion it's not necessary here.

Define default image paths on waeup.sirp.browser/init.py. We need the same definitions for other packages.

Location:
main/waeup.sirp/trunk/src/waeup/sirp
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/trunk/src/waeup/sirp/applicants/browser.py

    r7089 r7094  
    5757    IWAeUPObject, ILocalRolesAssignable, IExtFileStore, IFileStoreNameChooser)
    5858from waeup.sirp.permissions import get_users_with_local_roles
     59from waeup.sirp.browser import DEFAULT_PASSPORT_IMAGE_PATH
    5960from waeup.sirp.university.interfaces import ICertificate
    6061from waeup.sirp.utils.helpers import string_from_bytes, file_size
     
    6869    IApplicant, IApplicantPrincipal,IApplicantEdit, IApplicantsRoot,
    6970    IApplicantsContainer, IApplicantsContainerAdd, application_types_vocab,
    70     DEFAULT_PASSPORT_IMAGE_PATH, MAX_UPLOAD_SIZE,
     71    MAX_UPLOAD_SIZE,
    7172    )
    7273from waeup.sirp.applicants.workflow import INITIALIZED, STARTED
     
    770771        if self.passport_changed:
    771772            fields_string += ' + passport'
    772         self.context._p_changed = True
     773        #self.context._p_changed = True
    773774        form = self.request.form
    774775        trans_id = form.get('transition', None)
     
    819820            return # error during image upload. Ignore other values
    820821        self.applyData(self.context, **data)
    821         self.context._p_changed = True
     822        #self.context._p_changed = True
    822823        self.flash('Form has been saved.')
    823824        return
  • main/waeup.sirp/trunk/src/waeup/sirp/applicants/interfaces.py

    r7089 r7094  
    2424import os
    2525import re
    26 import waeup.sirp.browser
    2726
    2827from grokcore.content.interfaces import IContainer
     
    4443  )
    4544
    46 IMAGE_PATH = os.path.join(
    47     os.path.dirname(waeup.sirp.browser.__file__),
    48     'static'
    49     )
    50 
    51 #: Filesystem path to default passport image
    52 DEFAULT_PASSPORT_IMAGE_PATH = os.path.join(IMAGE_PATH, 'placeholder_m.jpg')
    53 
    5445#: Maximum upload size for applicant passport photographs (in bytes)
    5546MAX_UPLOAD_SIZE = 1024 * 20
  • main/waeup.sirp/trunk/src/waeup/sirp/browser/__init__.py

    r4920 r7094  
     1import os
     2
    13from waeup.sirp.browser.layout import (
    24    WAeUPPage, WAeUPLayout, WAeUPDisplayFormPage, WAeUPEditFormPage,
    35    WAeUPAddFormPage, NullValidator)
     6
     7IMAGE_PATH = os.path.join(
     8    os.path.dirname(__file__),
     9    'static'
     10    )
     11
     12#: Filesystem paths to default images
     13DEFAULT_IMAGE_PATH = os.path.join(IMAGE_PATH, 'placeholder_m.jpg')
     14DEFAULT_PASSPORT_IMAGE_PATH = os.path.join(IMAGE_PATH, 'placeholder_m.jpg')
Note: See TracChangeset for help on using the changeset viewer.