
from django.conf.urls import url

from freeze import views


urlpatterns = [
    url(r'^download-static-site/$', views.download_static_site, name='freeze_download_static_site'),
    url(r'^generate-static-site/$', views.generate_static_site, name='freeze_generate_static_site'),
]



if django.VERSION < (2, 0):
    from django.conf.urls import include, url as path
else:
    from django.urls import include, path

from freeze import views


urlpatterns = [
    path("download-static-site/", views.download_static_site, name="freeze_download_static_site"),
    path("generate-static-site/", views.generate_static_site, name="freeze_generate_static_site"),
]

Support for newer versions of django
Support for newer versions of django
  
+ if django.VERSION < (2, 0):
- from django.conf.urls import url
+     from django.conf.urls import include, url as path
+ else:
+     from django.urls import include, path
  
  from freeze import views
  
  
  urlpatterns = [
-     url(r'^download-static-site/$', views.download_static_site, name='freeze_download_static_site'),
+     path("download-static-site/", views.download_static_site, name="freeze_download_static_site"),
-     url(r'^generate-static-site/$', views.generate_static_site, name='freeze_generate_static_site'),
+     path("generate-static-site/", views.generate_static_site, name="freeze_generate_static_site"),
  ]
  
- 
Support for newer versions of django
## Code Before:

from django.conf.urls import url

from freeze import views


urlpatterns = [
    url(r'^download-static-site/$', views.download_static_site, name='freeze_download_static_site'),
    url(r'^generate-static-site/$', views.generate_static_site, name='freeze_generate_static_site'),
]


## Instruction:
Support for newer versions of django
## Code After:

if django.VERSION < (2, 0):
    from django.conf.urls import include, url as path
else:
    from django.urls import include, path

from freeze import views


urlpatterns = [
    path("download-static-site/", views.download_static_site, name="freeze_download_static_site"),
    path("generate-static-site/", views.generate_static_site, name="freeze_generate_static_site"),
]
