import django
from django.conf.urls import include, url
from django.contrib import admin


if django.VERSION < (1, 9):
    admin_urls = include(admin.site.urls)
else:
    admin_urls = admin.site.urls

urlpatterns = [
    url(r'^admin/', admin_urls),
]

from django.urls import path
from django.contrib import admin


urlpatterns = [
    path("admin/", admin.site.urls),
]

Remove old django related codes.
Remove old django related codes.

+ from django.urls import path
- import django
- from django.conf.urls import include, url
  from django.contrib import admin
  
  
- if django.VERSION < (1, 9):
-     admin_urls = include(admin.site.urls)
- else:
-     admin_urls = admin.site.urls
- 
  urlpatterns = [
-     url(r'^admin/', admin_urls),
+     path("admin/", admin.site.urls),
  ]
  
Remove old django related codes.
## Code Before:
import django
from django.conf.urls import include, url
from django.contrib import admin


if django.VERSION < (1, 9):
    admin_urls = include(admin.site.urls)
else:
    admin_urls = admin.site.urls

urlpatterns = [
    url(r'^admin/', admin_urls),
]

## Instruction:
Remove old django related codes.
## Code After:
from django.urls import path
from django.contrib import admin


urlpatterns = [
    path("admin/", admin.site.urls),
]
