From 00a0946936dae4c3ea45281c2577b599229dba8f Mon Sep 17 00:00:00 2001 From: Andrii Marynets Date: Tue, 18 Jul 2017 23:09:02 +0300 Subject: [PATCH 1/6] Fix url warning in datacenterlight --- datacenterlight/urls.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/datacenterlight/urls.py b/datacenterlight/urls.py index a08bacdb..a3aed7a6 100644 --- a/datacenterlight/urls.py +++ b/datacenterlight/urls.py @@ -5,13 +5,13 @@ from .views import IndexView, BetaProgramView, LandingProgramView, BetaAccessVie urlpatterns = [ - url(r'^/?$', IndexView.as_view(), name='index'), - url(r'^/whydatacenterlight/?$', WhyDataCenterLightView.as_view(), name='whydatacenterlight'), - url(r'^/beta-program/?$', BetaProgramView.as_view(), name='beta'), - url(r'^/landing/?$', LandingProgramView.as_view(), name='landing'), - url(r'^/pricing/?$', PricingView.as_view(), name='pricing'), - url(r'^/payment/?$', PaymentOrderView.as_view(), name='payment'), - url(r'^/order-confirmation/?$', OrderConfirmationView.as_view(), name='order_confirmation'), - url(r'^/order-success/?$', SuccessView.as_view(), name='order_success'), - url(r'^/beta_access?$', BetaAccessView.as_view(), name='beta_access'), + url(r'^$', IndexView.as_view(), name='index'), + url(r'^whydatacenterlight/?$', WhyDataCenterLightView.as_view(), name='whydatacenterlight'), + url(r'^beta-program/?$', BetaProgramView.as_view(), name='beta'), + url(r'^landing/?$', LandingProgramView.as_view(), name='landing'), + url(r'^pricing/?$', PricingView.as_view(), name='pricing'), + url(r'^payment/?$', PaymentOrderView.as_view(), name='payment'), + url(r'^order-confirmation/?$', OrderConfirmationView.as_view(), name='order_confirmation'), + url(r'^order-success/?$', SuccessView.as_view(), name='order_success'), + url(r'^beta_access?$', BetaAccessView.as_view(), name='beta_access'), ] From a84722ae1c240fcccc12bde1335f8695fa1e64cd Mon Sep 17 00:00:00 2001 From: Andrii Marynets Date: Tue, 18 Jul 2017 23:11:26 +0300 Subject: [PATCH 2/6] Fix url warning in alplora --- alplora/urls.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/alplora/urls.py b/alplora/urls.py index 071bb2ac..058f5499 100644 --- a/alplora/urls.py +++ b/alplora/urls.py @@ -4,9 +4,9 @@ from .views import IndexView, LoginView, ContactView urlpatterns = [ - url(r'^/?$', IndexView.as_view(), name='index'), - url(r'/login/', LoginView.as_view(), name='login'), - url(r'/contact', ContactView.as_view(), name='contact'), + url(r'^$', IndexView.as_view(), name='index'), + url(r'login/', LoginView.as_view(), name='login'), + url(r'contact', ContactView.as_view(), name='contact'), # url(r'^/beta-program/?$', BetaProgramView.as_view(), name='beta'), # url(r'^/landing/?$', LandingProgramView.as_view(), name='landing'), ] From ddd0594976596df416bc25f3d99bf36b72594653 Mon Sep 17 00:00:00 2001 From: Andrii Marynets Date: Tue, 18 Jul 2017 23:18:23 +0300 Subject: [PATCH 3/6] Fix url warning in dynamicweb --- dynamicweb/urls.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dynamicweb/urls.py b/dynamicweb/urls.py index 66bf74df..45b6d2d9 100644 --- a/dynamicweb/urls.py +++ b/dynamicweb/urls.py @@ -27,7 +27,7 @@ urlpatterns = [url(r'^index.html$', LandingView.as_view()), # note the django CMS URLs included via i18n_patterns urlpatterns += i18n_patterns('', - url(r'^/?$', LandingView.as_view()), + url(r'^$', LandingView.as_view()), url(r'^admin/', include(admin.site.urls)), url(r'^datacenterlight', include('datacenterlight.urls', namespace="datacenterlight")), url(r'^hosting/', RedirectView.as_view( From 3fc1cd946348bebbeb09fa21c4adcedaccac9809 Mon Sep 17 00:00:00 2001 From: Andrii Marynets Date: Wed, 19 Jul 2017 00:39:52 +0300 Subject: [PATCH 4/6] Fix url which will be deprecated in Django 1.10 --- digitalglarus/urls.py | 3 ++- dynamicweb/urls.py | 14 +++++++------- hosting/urls.py | 3 ++- nosystemd/urls.py | 3 ++- 4 files changed, 13 insertions(+), 10 deletions(-) diff --git a/digitalglarus/urls.py b/digitalglarus/urls.py index eba9896e..92cd8e11 100644 --- a/digitalglarus/urls.py +++ b/digitalglarus/urls.py @@ -1,5 +1,6 @@ from django.conf.urls import url from django.utils.translation import ugettext_lazy as _ +from django.contrib.auth import views as auth_views from . import views from .views import ContactView, IndexView, HistoryView, LoginView, SignupView,\ @@ -20,7 +21,7 @@ urlpatterns = [ url(_(r'contact/?$'), ContactView.as_view(), name='contact'), url(_(r'login/?$'), LoginView.as_view(), name='login'), url(_(r'signup/?$'), SignupView.as_view(), name='signup'), - url(r'^logout/?$', 'django.contrib.auth.views.logout', + url(r'^logout/?$', auth_views.logout, {'next_page': '/digitalglarus/login?logged_out=true'}, name='logout'), url(r'reset-password/?$', PasswordResetView.as_view(), name='reset_password'), url(r'reset-password-confirm/(?P[0-9A-Za-z]+)-(?P.+)/$', diff --git a/dynamicweb/urls.py b/dynamicweb/urls.py index 45b6d2d9..ad286317 100644 --- a/dynamicweb/urls.py +++ b/dynamicweb/urls.py @@ -1,8 +1,8 @@ from django.conf.urls import patterns, include, url from django.contrib import admin -# deprecated in version 1.8 from django.conf.urls.i18n import i18n_patterns from django.conf.urls.static import static +from django.views import i18n, static as static_view from django.conf import settings from hosting.views import RailsHostingView, DjangoHostingView, NodeJSHostingView @@ -22,11 +22,11 @@ urlpatterns = [url(r'^index.html$', LandingView.as_view()), url(r'^nosystemd/', include('nosystemd.urls', namespace="nosystemd")), url(r'^taggit_autosuggest/', include('taggit_autosuggest.urls')), url(r'^jsi18n/(?P\S+?)/$', - 'django.views.i18n.javascript_catalog'), + i18n.javascript_catalog), ] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) # note the django CMS URLs included via i18n_patterns -urlpatterns += i18n_patterns('', +urlpatterns += i18n_patterns( url(r'^$', LandingView.as_view()), url(r'^admin/', include(admin.site.urls)), url(r'^datacenterlight', include('datacenterlight.urls', namespace="datacenterlight")), @@ -43,11 +43,11 @@ urlpatterns += i18n_patterns('', url(r'^blog/', include('ungleich.urls', namespace='ungleich')), url(r'^', include('cms.urls')) ) -urlpatterns += patterns('', +urlpatterns += [ url(r'^media/(?P.*)$', - 'django.views.static.serve', { + static_view.serve, { 'document_root': settings.MEDIA_ROOT, }), - ) + ] if settings.DEBUG: - urlpatterns += patterns('', url(r'^__debug__/', include(debug_toolbar.urls))) + urlpatterns += [url(r'^__debug__/', include(debug_toolbar.urls))] diff --git a/hosting/urls.py b/hosting/urls.py index 495ac312..c243f29b 100644 --- a/hosting/urls.py +++ b/hosting/urls.py @@ -1,4 +1,5 @@ from django.conf.urls import url +from django.contrib.auth import views as auth_views from .views import DjangoHostingView, RailsHostingView, PaymentVMView,\ NodeJSHostingView, LoginView, SignupView, SignupValidateView, SignupValidatedView, IndexView, \ @@ -39,7 +40,7 @@ urlpatterns = [ url(r'reset-password/?$', PasswordResetView.as_view(), name='reset_password'), url(r'reset-password-confirm/(?P[0-9A-Za-z]+)-(?P.+)/$', PasswordResetConfirmView.as_view(), name='reset_password_confirm'), - url(r'^logout/?$', 'django.contrib.auth.views.logout', + url(r'^logout/?$', auth_views.logout, {'next_page': '/hosting/login?logged_out=true'}, name='logout'), url(r'^validate/(?P.*)/$', SignupValidatedView.as_view(), name='validate') ] diff --git a/nosystemd/urls.py b/nosystemd/urls.py index d95127da..7c3965f8 100644 --- a/nosystemd/urls.py +++ b/nosystemd/urls.py @@ -1,4 +1,5 @@ from django.conf.urls import url +from django.contrib.auth import views as auth_views from .views import LandingView, LoginView, SignupView, PasswordResetView,\ PasswordResetConfirmView, DonationView, DonationDetailView, ChangeDonatorStatusDetailView,\ @@ -8,7 +9,7 @@ urlpatterns = [ url(r'^$', LandingView.as_view(), name='landing'), url(r'^login/?$', LoginView.as_view(), name='login'), url(r'^signup/?$', SignupView.as_view(), name='signup'), - url(r'^logout/?$', 'django.contrib.auth.views.logout', + url(r'^logout/?$', auth_views.logout, {'next_page': '/nosystemd/login?logged_out=true'}, name='logout'), url(r'reset-password/?$', PasswordResetView.as_view(), name='reset_password'), url(r'reset-password-confirm/(?P[0-9A-Za-z]+)-(?P.+)/$', From ea97a6bf83061b0c65abc11a744ea7e5a98b20e4 Mon Sep 17 00:00:00 2001 From: Andrii Marynets Date: Wed, 19 Jul 2017 22:28:11 +0300 Subject: [PATCH 5/6] Fix url for datecenterlight. Need to add / --- dynamicweb/urls.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dynamicweb/urls.py b/dynamicweb/urls.py index ad286317..4c042461 100644 --- a/dynamicweb/urls.py +++ b/dynamicweb/urls.py @@ -29,10 +29,10 @@ urlpatterns = [url(r'^index.html$', LandingView.as_view()), urlpatterns += i18n_patterns( url(r'^$', LandingView.as_view()), url(r'^admin/', include(admin.site.urls)), - url(r'^datacenterlight', include('datacenterlight.urls', namespace="datacenterlight")), + url(r'^datacenterlight/', include('datacenterlight.urls', namespace="datacenterlight")), url(r'^hosting/', RedirectView.as_view( url=reverse_lazy('hosting:login')), name='redirect_hosting_login'), - url(r'^alplora', include('alplora.urls', namespace="alplora")), + url(r'^alplora/', include('alplora.urls', namespace="alplora")), url(r'^membership/', include(membership_urls)), url(r'^digitalglarus/', include('digitalglarus.urls', namespace="digitalglarus")), From 308851285ebb7f03c6e4c6c2b328f1303e8648fa Mon Sep 17 00:00:00 2001 From: Pcoder Date: Sat, 29 Jul 2017 01:48:56 +0530 Subject: [PATCH 6/6] Removed patterns import --- dynamicweb/urls.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dynamicweb/urls.py b/dynamicweb/urls.py index 4c042461..b5cccff3 100644 --- a/dynamicweb/urls.py +++ b/dynamicweb/urls.py @@ -1,4 +1,4 @@ -from django.conf.urls import patterns, include, url +from django.conf.urls import include, url from django.contrib import admin from django.conf.urls.i18n import i18n_patterns from django.conf.urls.static import static