﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
21530	urls.py AttributeError: 'RegexURLPattern' object has no attribute 'app_name'	Damian.Myerscough@…	nobody	"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:
{{{
(nagios-api-env)dmyerscough-ltm:nagios_restful dmyerscough$ python manage.py runserver
Validating models...

0 errors found
November 29, 2013 - 09:53:03
Django version 1.6, using settings 'nagios_restful.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CONTROL-C.
Traceback (most recent call last):
  File ""/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/wsgiref/handlers.py"", line 85, in run
    self.result = application(self.environ, self.start_response)
  File ""/Users/dmyerscough/nagios-api-env/lib/python2.7/site-packages/django/contrib/staticfiles/handlers.py"", line 67, in __call__
    return self.application(environ, start_response)
  File ""/Users/dmyerscough/nagios-api-env/lib/python2.7/site-packages/django/core/handlers/wsgi.py"", line 206, in __call__
    response = self.get_response(request)
  File ""/Users/dmyerscough/nagios-api-env/lib/python2.7/site-packages/django/core/handlers/base.py"", line 148, in get_response
    response = debug.technical_404_response(request, e)
  File ""/Users/dmyerscough/nagios-api-env/lib/python2.7/site-packages/django/views/debug.py"", line 471, in technical_404_response
    and tried[0][0].app_name == tried[0][0].namespace == 'admin')):
AttributeError: 'RegexURLPattern' object has no attribute 'app_name'
[29/Nov/2013 09:53:06] ""GET / HTTP/1.1"" 500 59
}}}


To reproduce this error you can do the following:

1. Edit the urls.py file and add the following:
{{{#!python
from django.conf.urls import patterns, include, url

urlpatterns = patterns('',
    url(r'^test/', 'nagios_api.views.comments', name='home'),
)

}}}

2. Run your project and navigate to the web page and you get the above exception.


I have created a Pull request on GitHub to fix the issue - https://github.com/django/django/pull/2006"	Bug	new	Core (URLs)	1.6	Release blocker				Accepted	1	0	1	1	0	0
