Changes between Initial Version and Version 1 of Ticket #21530


Ignore:
Timestamp:
Nov 29, 2013, 8:06:48 AM (11 years ago)
Author:
Baptiste Mispelon
Comment:

Hi,

I can indeed reproduce this issue when the root urlconf only contains one non-empty pattern. The urlconf itself works (I can access my view by navigating to the correct URL) but the problem is in the debug view.

If I try to access a URL that's not mapped to anything, the debug view is triggered and the reported exception occurs.

Note that this only affects the 1.6 and master branch, and that this regression was introduced by commit 3f1c7b70537330435e2ec2fca9550f7b7fa4372e.

As for your patch, it does seem to fix the issue and it even passes the full test suite but it seems wrong to just be removing code. In any case, a full patch will also require a regression testcase so I'm marking this as patch needs improvement.

Thanks.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #21530

    • Property Patch needs improvement set
    • Property Needs tests set
    • Property Severity NormalRelease blocker
    • Property Triage Stage UnreviewedAccepted
  • Ticket #21530 – Description

    initial v1  
    1 The urls.py file does not support the ability of supplying one URL. When specifying one URL within the urls.py file you get the following error:-
    2 
     1The urls.py file does not support the ability of supplying one URL. When specifying one URL within the urls.py file you get the following error:
     2{{{
    33(nagios-api-env)dmyerscough-ltm:nagios_restful dmyerscough$ python manage.py runserver
    44Validating models...
     
    2222AttributeError: 'RegexURLPattern' object has no attribute 'app_name'
    2323[29/Nov/2013 09:53:06] "GET / HTTP/1.1" 500 59
     24}}}
    2425
    2526
    2627To reproduce this error you can do the following:
    2728
    28 1. Edit the urls.py file and add the following:-
    29 
     291. Edit the urls.py file and add the following:
     30{{{#!python
    3031from django.conf.urls import patterns, include, url
    3132
     
    3435)
    3536
     37}}}
    3638
    37392. Run your project and navigate to the web page and you get the above exception.
Back to Top