Django name patterns is not defined in ulrs.py
<p>I am trying to set up a Django app, but everytime I try to run it i get the following error message: NameError: name 'patterns' is not defined</p>

<p>I do not understand what is wrong with my urls.py file, here is a copy of it:</p>

<pre><code>from django.contrib import admin
from rest_framework import routers
from SecMeRe import views

router = routers.DefaultRouter()
#makes sure that the API endpoints work
router.register(r'api/SecMeRe', views.PatientViewSet)
admin.autodiscover()

urlpatterns = patterns(
    url(r'^admin/', include(admin.site.urls)),
    url(r'^', include(router.urls)),
    url(r'^api-auth/', include('rest_framework.urls', namespace='rest_framework'))
)
</code></pre>