from django.conf import settings
from django.conf.urls import include, url
from django.contrib import admin
from django.conf.urls.static import static
from django.contrib.auth import views



urlpatterns = [
    url(
        r'^silk/',
        include('silk.urls', namespace='silk', app_name='silk')
        ),
    url(
        r'^example_app/',
        include('example_app.urls', namespace='example_app', app_name='example_app')
        ),
    url(r'^admin/', include(admin.site.urls)),
]



urlpatterns += [
    url(
        r'^login/$',
        views.login,
        {'template_name': 'example_app/login.html'}, name='login'),
]



urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT) + \
              static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)

from django.conf import settings
from django.conf.urls import include, url
from django.contrib import admin
from django.conf.urls.static import static
from django.contrib.auth import views



urlpatterns = [
    url(
        r'^silk/',
        include('silk.urls', namespace='silk')
        ),
    url(
        r'^example_app/',
        include('example_app.urls', namespace='example_app')
        ),
    url(
        r'^admin/',
        admin.site.urls
        ),
]



urlpatterns += [
    url(
        r'^login/$',
        views.login,
        {'template_name': 'example_app/login.html'}, name='login'),
]



urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT) + \
              static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)

Remove unneeded app_name from test project to be django 2 compatible
Remove unneeded app_name from test project to be django 2 compatible

  from django.conf import settings
  from django.conf.urls import include, url
  from django.contrib import admin
  from django.conf.urls.static import static
  from django.contrib.auth import views
  
  
  
  urlpatterns = [
      url(
          r'^silk/',
-         include('silk.urls', namespace='silk', app_name='silk')
+         include('silk.urls', namespace='silk')
          ),
      url(
          r'^example_app/',
-         include('example_app.urls', namespace='example_app', app_name='example_app')
+         include('example_app.urls', namespace='example_app')
          ),
-     url(r'^admin/', include(admin.site.urls)),
+     url(
+         r'^admin/',
+         admin.site.urls
+         ),
  ]
  
  
  
  urlpatterns += [
      url(
          r'^login/$',
          views.login,
          {'template_name': 'example_app/login.html'}, name='login'),
  ]
  
  
  
  urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT) + \
                static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
  
Remove unneeded app_name from test project to be django 2 compatible
## Code Before:
from django.conf import settings
from django.conf.urls import include, url
from django.contrib import admin
from django.conf.urls.static import static
from django.contrib.auth import views



urlpatterns = [
    url(
        r'^silk/',
        include('silk.urls', namespace='silk', app_name='silk')
        ),
    url(
        r'^example_app/',
        include('example_app.urls', namespace='example_app', app_name='example_app')
        ),
    url(r'^admin/', include(admin.site.urls)),
]



urlpatterns += [
    url(
        r'^login/$',
        views.login,
        {'template_name': 'example_app/login.html'}, name='login'),
]



urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT) + \
              static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)

## Instruction:
Remove unneeded app_name from test project to be django 2 compatible
## Code After:
from django.conf import settings
from django.conf.urls import include, url
from django.contrib import admin
from django.conf.urls.static import static
from django.contrib.auth import views



urlpatterns = [
    url(
        r'^silk/',
        include('silk.urls', namespace='silk')
        ),
    url(
        r'^example_app/',
        include('example_app.urls', namespace='example_app')
        ),
    url(
        r'^admin/',
        admin.site.urls
        ),
]



urlpatterns += [
    url(
        r'^login/$',
        views.login,
        {'template_name': 'example_app/login.html'}, name='login'),
]



urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT) + \
              static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
