~ubuntu-branches/ubuntu/oneiric/routes/oneiric

« back to all changes in this revision

Viewing changes to routes/mapper.py

  • Committer: Bazaar Package Importer
  • Author(s): Piotr Ożarowski
  • Date: 2010-06-07 21:13:17 UTC
  • mfrom: (1.1.15 upstream) (6.1.6 sid)
  • Revision ID: james.westby@ubuntu.com-20100607211317-usr08p1ryt358b8d
Tags: 1.12.3-1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
717
717
            if 'action' not in kargs:
718
718
                kargs['action'] = 'index'
719
719
        
 
720
        environ = kargs.pop('_environ', self.environ)
720
721
        controller = kargs.get('controller', None)
721
722
        action = kargs.get('action', None)
722
723
 
729
730
        if self.urlcache is not None:
730
731
            if self.environ:
731
732
                cache_key_script_name = '%s:%s' % (
732
 
                    self.environ.get('SCRIPT_NAME', ''), cache_key)
 
733
                    environ.get('SCRIPT_NAME', ''), cache_key)
733
734
            else:
734
735
                cache_key_script_name = cache_key
735
736
        
824
825
                if self.prefix:
825
826
                    path = self.prefix + path
826
827
                external_static = route.static and route.external
827
 
                if self.environ and self.environ.get('SCRIPT_NAME', '') != ''\
 
828
                if environ and environ.get('SCRIPT_NAME', '') != ''\
828
829
                    and not route.absolute and not external_static:
829
 
                    path = self.environ['SCRIPT_NAME'] + path
 
830
                    path = environ['SCRIPT_NAME'] + path
830
831
                    key = cache_key_script_name
831
832
                else:
832
833
                    key = cache_key