|
14 | 14 | 2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls')) |
15 | 15 | """ |
16 | 16 | from django.conf.urls.static import static |
17 | | -from django.conf.urls import url, include |
| 17 | +from django.urls import path, include |
18 | 18 | from django.contrib import admin |
19 | 19 | from django.conf import settings |
20 | 20 |
|
21 | 21 | from myapp import views |
22 | 22 |
|
23 | 23 | urlpatterns = [ |
24 | 24 | # The Django Admin |
25 | | - url(r'^admin/', admin.site.urls), |
| 25 | + path('admin/', admin.site.urls), |
26 | 26 |
|
27 | 27 | # django-fine-uploader default urls |
28 | | - url(r'^fine-uploader/', include('django_fine_uploader.urls', namespace='django_fine_uploader')), |
| 28 | + path('fine-uploader/', include('django_fine_uploader.urls', namespace='django_fine_uploader')), |
29 | 29 |
|
30 | 30 | # our custom views on myapp app |
31 | | - url(r'^$', view=views.ExampleView.as_view(), name='home'), |
32 | | - url(r'^widget/', view=views.ExampleWidgetView.as_view(), name='home-widget'), |
33 | | - url(r'^upload-1/$', view=views.MyAppUploaderView.as_view(), name='uploader-1'), |
34 | | - url(r'^upload-2/$', view=views.NotConcurrentUploaderView.as_view(), name='uploader-2'), |
35 | | - url(r'^upload-3/$', view=views.SimpleCustomUploaderView.as_view(), name='uploader-3'), |
36 | | - url(r'^upload-4/$', view=views.CustomFineUploaderView.as_view(), name='uploader-4'), |
| 31 | + path('', view=views.ExampleView.as_view(), name='home'), |
| 32 | + path('widget/', view=views.ExampleWidgetView.as_view(), name='home-widget'), |
| 33 | + path('upload-1/', view=views.MyAppUploaderView.as_view(), name='uploader-1'), |
| 34 | + path('upload-2/', view=views.NotConcurrentUploaderView.as_view(), name='uploader-2'), |
| 35 | + path('upload-3/', view=views.SimpleCustomUploaderView.as_view(), name='uploader-3'), |
| 36 | + path('upload-4/', view=views.CustomFineUploaderView.as_view(), name='uploader-4'), |
37 | 37 | ] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) |
0 commit comments