Ignore:
Timestamp:
13 Nov 2011, 06:27:19 (13 years ago)
Author:
Henrik Bettermann
Message:

Only views have attribute redirect not viewlets.

Let's include the grok.context directive too even if it's not necessary.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/trunk/src/waeup/sirp/students/viewlets.py

    r7097 r7100  
    88from waeup.sirp.students.browser import (
    99    StudentClearanceDisplayFormPage, StudentClearanceManageFormPage)
     10from waeup.sirp.students.interfaces import IStudentClearance
    1011
    1112grok.context(IWAeUPObject) # Make IWAeUPObject the default context
     
    224225    """
    225226    grok.baseclass()
     227    grok.context(IStudentClearance)
    226228    grok.viewletmanager(FileManager)
    227229    grok.view(StudentClearanceDisplayFormPage)
     
    237239    """
    238240    grok.baseclass()
     241    grok.context(IStudentClearance)
    239242    grok.viewletmanager(FileManager)
    240243    grok.view(StudentClearanceManageFormPage)
     
    252255                upload, self.context, self.view, self.mus, self.attr)
    253256            if file_changed is False:  # False is not None!
    254                 self.redirect(self.view.url(self.context))
     257                self.view.redirect(self.view.url(self.context))
    255258                return # error during image upload. Ignore other values
    256259            else:
Note: See TracChangeset for help on using the changeset viewer.