~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to ivle/webapp/submit/__init__.py

  • Committer: Matt Giuca
  • Date: 2010-07-20 05:22:02 UTC
  • Revision ID: matt.giuca@gmail.com-20100720052202-m321ti14t472rrb0
ivle/webapp/submit: Added a 'fullpath' method to SubmitView classes, to get the original URL of the request.

Show diffs side-by-side

added added

removed removed

Lines of Context:
160
160
            Subject.short_name == self.path.split('/')[1],
161
161
            ).one()
162
162
 
 
163
    @property
 
164
    def fullpath(self):
 
165
        """Get the original path of this request, after the +submit."""
 
166
        return os.path.join('/users/', *self.subpath)
163
167
 
164
168
class GroupSubmitView(SubmitView):
165
169
    def get_repository_owner(self, store, name):
184
188
    def get_offering(self):
185
189
        return self.context.project_set.offering
186
190
 
 
191
    @property
 
192
    def fullpath(self):
 
193
        """Get the original path of this request, after the +submit."""
 
194
        return os.path.join('/groups/', *self.subpath)
 
195
 
187
196
 
188
197
class Plugin(ViewPlugin):
189
198
    views = [(ApplicationRoot, ('+submit', 'users'), UserSubmitView),