#9921: request.urlconf incorrect behavoir
----------------------------------------+-----------------------------------
          Reporter:  strelnikovdmitrij  |         Owner:  nobody         
            Status:  reopened           |     Milestone:                 
         Component:  Core framework     |       Version:  1.0            
        Resolution:                     |      Keywords:  request.urlconf
             Stage:  Unreviewed         |     Has_patch:  1              
        Needs_docs:  0                  |   Needs_tests:  1              
Needs_better_patch:  0                  |  
----------------------------------------+-----------------------------------
Changes (by strelnikovdmitrij):

  * status:  closed => reopened
  * has_patch:  0 => 1
  * resolution:  duplicate =>
  * needs_tests:  0 => 1

Comment:

 '''SOLVED''' :
 in django\middleware\common.py file near by line 55 (not sure, I've change
 some sources)

 {{{
 if settings.APPEND_SLASH and (not old_url[1].endswith('/')):
             if (not _is_valid_path(request.path_info) '''and'''
                     _is_valid_path("%s/" % request.path_info)):
                 new_url[1] = new_url[1] + '/'
 }}}
 have to be
 {{{
 if settings.APPEND_SLASH and (not old_url[1].endswith('/')):
             print "not end with /"
             if (not _is_valid_path(request.path_info) '''&'''
 _is_valid_path("%s/" % request.path_info)):
                 new_url[1] = new_url[1] + '/'
                 print "new_url[1] = %s " % new_url[1]
                 if settings.DEBUG and request.method == 'POST':
 }}}
 for more info see the Python doc describing different between logical and
 arithmetical operators or look through folowing code executed in standart
 python shell ;)

 {{{
 >>> t = True
 >>> f = False
 >>> not t and f
 False
 >>> not t & f
 True
 }}}

-- 
Ticket URL: <http://code.djangoproject.com/ticket/9921#comment:3>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to