From 6abdc5893353711b9cccfbd5fe46c29018b040e0 Mon Sep 17 00:00:00 2001 From: Manoj Tyagi <38884133+thewolfcommander@users.noreply.github.com> Date: Sun, 13 Oct 2019 23:45:31 +0530 Subject: [PATCH] Updated the url patterns according to Django2 I have updated all the url() to path() from the module django.conf.urls to django.urls --- django_facebook/urls.py | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/django_facebook/urls.py b/django_facebook/urls.py index 8cf664a5..69c4211c 100644 --- a/django_facebook/urls.py +++ b/django_facebook/urls.py @@ -1,4 +1,4 @@ -from django.conf.urls import url +from django.urls import path from django.conf import settings # help autodiscovery a bit @@ -7,33 +7,33 @@ from .example_views import * urlpatterns = [ - url(r'^connect/$', connect, name='facebook_connect'), - url(r'^disconnect/$', + path('connect/', connect, name='facebook_connect'), + path('disconnect/', disconnect, name='facebook_disconnect'), - url(r'^example/$', example, name='facebook_example'), + path('example/', example, name='facebook_example'), ] dev_patterns = [ - url( - r'^lazy_decorator_example/$', lazy_decorator_example, + path( + 'lazy_decorator_example/', lazy_decorator_example, name='facebook_lazy_decorator_example'), - url(r'^decorator_example/$', decorator_example, + path('decorator_example/', decorator_example, name='facebook_decorator_example'), - url( - r'^decorator_example_scope/$', decorator_example_scope, + path( + 'decorator_example_scope/', decorator_example_scope, name='facebook_decorator_example_scope'), - url(r'^wall_post/$', + path('wall_post/', wall_post, name='facebook_wall_post'), - url(r'^checkins/$', + path('checkins/', checkins, name='facebook_checkins'), - url(r'^image_upload/$', + path('image_upload/', image_upload, name='facebook_image_upload'), - url(r'^canvas/$', canvas, name='facebook_canvas'), - url(r'^page_tab/$', + path('canvas/', canvas, name='facebook_canvas'), + path('page_tab/', page_tab, name='facebook_page_tab'), - url(r'^open_graph_beta/$', open_graph_beta, + path('open_graph_beta/', open_graph_beta, name='facebook_open_graph_beta'), - url(r'^remove_og_share/$', remove_og_share, + path('remove_og_share/', remove_og_share, name='facebook_remove_og_share'), ]