#27016: django-admin.py startproject creates urls.py that raises ImportError
-----------------------------+---------------------------------------------
     Reporter:  stemaan      |      Owner:  nobody
         Type:  Bug          |     Status:  new
    Component:  Core (URLs)  |    Version:  1.10
     Severity:  Normal       |   Keywords:  startproject, ImportError, urls
 Triage Stage:  Unreviewed   |  Has patch:  0
Easy pickings:  0            |      UI/UX:  0
-----------------------------+---------------------------------------------
 This is the default urls.py file created by above command:

 {{{
 from django.conf.urls import patterns, include, url

 from django.contrib import admin
 admin.autodiscover()

 urlpatterns = patterns('',
     # Examples:
     # url(r'^$', 'plab_django_admin.views.home', name='home'),
     # url(r'^blog/', include('blog.urls')),

     url(r'^admin/', include(admin.site.urls)),
 )
 }}}

 having such a setup, after running a runserver command leads to:

 {{{
 ImportError: cannot import name patterns
 }}}

 According to [https://docs.djangoproject.com/en/1.10/releases/1.10
 /#features-removed-in-1-10 Feature removed in 1.10]
 {{{
 django.conf.urls.patterns() is removed.
 }}}

--
Ticket URL: <https://code.djangoproject.com/ticket/27016>
Django <https://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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/050.251a14a298e9c73f5ad882b331a55e07%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to