[hg] galaxy 3392: Add '/' to controller names in url_for calls i...
details: http://www.bx.psu.edu/hg/galaxy/rev/886f816b8f70 changeset: 3392:886f816b8f70 user: Dan Blankenberg <dan@bx.psu.edu> date: Mon Feb 15 11:16:49 2010 -0500 description: Add '/' to controller names in url_for calls in display_applications to disable route memory. diffstat: lib/galaxy/datatypes/display_applications/application.py | 2 +- lib/galaxy/datatypes/display_applications/parameters.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diffs (24 lines): diff -r 6a65fd82ed3c -r 886f816b8f70 lib/galaxy/datatypes/display_applications/application.py --- a/lib/galaxy/datatypes/display_applications/application.py Mon Feb 15 09:10:48 2010 -0500 +++ b/lib/galaxy/datatypes/display_applications/application.py Mon Feb 15 11:16:49 2010 -0500 @@ -34,7 +34,7 @@ self.name = None def get_display_url( self, data, trans ): dataset_hash, user_hash = encode_dataset_user( trans, data, None ) - return url_for( controller = 'dataset', action = "display_application", dataset_id = dataset_hash, user_id = user_hash, app_name = self.display_application.id, link_name = self.id, app_action = None ) + return url_for( controller = '/dataset', action = "display_application", dataset_id = dataset_hash, user_id = user_hash, app_name = self.display_application.id, link_name = self.id, app_action = None ) def get_inital_values( self, data, trans ): rval = odict( { 'BASE_URL': trans.request.base, 'APP': trans.app } ) #trans automatically appears as a response, need to add properties of trans that we want here for key, value in BASE_PARAMS.iteritems(): #add helper functions/variables diff -r 6a65fd82ed3c -r 886f816b8f70 lib/galaxy/datatypes/display_applications/parameters.py --- a/lib/galaxy/datatypes/display_applications/parameters.py Mon Feb 15 09:10:48 2010 -0500 +++ b/lib/galaxy/datatypes/display_applications/parameters.py Mon Feb 15 11:16:49 2010 -0500 @@ -158,7 +158,7 @@ base_url = self.trans.request.base if self.parameter.strip_https and base_url[ : 5].lower() == 'https': base_url = "http%s" % base_url[ 5: ] - return "%s%s" % ( base_url, url_for( controller = 'dataset', action = "display_application", dataset_id = self._dataset_hash, user_id = self._user_hash, app_name = self.parameter.link.display_application.id, link_name = self.parameter.link.id, app_action = self.action_name, action_param = self.parameter.url ) ) + return "%s%s" % ( base_url, url_for( controller = '/dataset', action = "display_application", dataset_id = self._dataset_hash, user_id = self._user_hash, app_name = self.parameter.link.display_application.id, link_name = self.parameter.link.id, app_action = self.action_name, action_param = self.parameter.url ) ) @property def action_name( self ): return self.ACTION_NAME
participants (1)
-
Greg Von Kuster