Update urls
This commit is contained in:
parent
b39f67a8ac
commit
9bb29884ca
1 changed files with 88 additions and 7 deletions
|
@ -14,14 +14,95 @@ Including another URLconf
|
|||
1. Import the include() function: from django.urls import include, path
|
||||
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
|
||||
"""
|
||||
# from django.contrib import admin
|
||||
# from django.urls import re_path, path, include
|
||||
# from datacenterlight.views import PaymentOrderView
|
||||
#
|
||||
# urlpatterns = [
|
||||
# path('admin/', admin.site.urls),
|
||||
# re_path('hosting/', include('hosting.urls')),
|
||||
# re_path(r'^product/(?P<product_slug>[\w-]+)/$',
|
||||
# PaymentOrderView.as_view(),
|
||||
# name='show_product'),
|
||||
# ]
|
||||
|
||||
|
||||
from cms.models.pagemodel import Page
|
||||
from django.urls import include, re_path, path
|
||||
from django.contrib import admin
|
||||
from django.urls import re_path, path, include
|
||||
from hosting.views import PaymentOrderView
|
||||
from django.contrib.sites.models import Site
|
||||
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
|
||||
|
||||
import hosting
|
||||
from hosting.views import (
|
||||
RailsHostingView, DjangoHostingView, NodeJSHostingView
|
||||
)
|
||||
from datacenterlight.views import PaymentOrderView
|
||||
from webhook import views as webhook_views
|
||||
from membership import urls as membership_urls
|
||||
from ungleich_page.views import LandingView
|
||||
from django.views.generic import RedirectView
|
||||
from django.urls import reverse_lazy
|
||||
from django.views.static import serve as static_serve
|
||||
|
||||
|
||||
urlpatterns = [
|
||||
path('admin/', admin.site.urls),
|
||||
re_path('hosting/', include('hosting.urls')),
|
||||
re_path(r'^product/(?P<product_slug>[\w-]+)/$',
|
||||
PaymentOrderView.as_view(),
|
||||
name='show_product'),
|
||||
]
|
||||
re_path(r'^index.html$', LandingView.as_view()),
|
||||
# re_path(r'^open_api/', include('opennebula_api.urls', namespace='opennebula_api',), name="opennebula_api"),
|
||||
re_path(r'^railshosting/', RailsHostingView.as_view(), name="rails.hosting"),
|
||||
re_path(r'^nodehosting/', NodeJSHostingView.as_view(), name="node.hosting"),
|
||||
re_path(r'^djangohosting/', DjangoHostingView.as_view(), name="django.hosting"),
|
||||
re_path(r'^product/(?P<product_slug>[\w-]+)/$', PaymentOrderView.as_view(), name='show_product'),
|
||||
path('hosting/', include('hosting.urls')),
|
||||
path('datacenterlight/', include('datacenterlight.urls'), name='datacenterlight'),
|
||||
path('i18n/', include('django.conf.urls.i18n')), # Language switcher URL
|
||||
re_path(r'^cms/', include('cms.urls')),
|
||||
]
|
||||
# urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
|
||||
|
||||
urlpatterns += i18n_patterns(
|
||||
|
||||
# Add other internationalized patterns here if needed
|
||||
)
|
||||
|
||||
|
||||
|
||||
# note the django CMS URLs included via i18n_patterns
|
||||
REDIRECT_TO_CMS = False
|
||||
# if Page.objects.filter(site_id=Site.objects.get_current().id).count():
|
||||
# REDIRECT_TO_CMS = True
|
||||
|
||||
# urlpatterns += i18n_patterns(
|
||||
# path('admin/', admin.site.urls),
|
||||
# re_path(r'^datacenterlight/',
|
||||
# include(('datacenterlight.urls', 'datacenterlight'), namespace="datacenterlight")),
|
||||
# re_path(r'^hosting/', RedirectView.as_view(url=reverse_lazy('hosting:login')),
|
||||
# name='redirect_hosting_login'),
|
||||
# re_path(r'^membership/', include(membership_urls)),
|
||||
# #re_path(r'^cms/blog/', include('ungleich.urls', namespace='ungleich')),
|
||||
# #re_path(r'^blog/(?P<year>\d{4})/(?P<month>\d{1,2})/(?P<day>\d{1,2})/(?P<slug>\w[-\w]*)/$',
|
||||
# # RedirectView.as_view(pattern_name='ungleich:post-detail')),
|
||||
# #re_path(r'^blog/$',
|
||||
# # RedirectView.as_view(url=reverse_lazy('ungleich:post-list')),
|
||||
# # name='blog_list_view'),
|
||||
# re_path(r'^cms/', include('cms.urls')),
|
||||
# #re_path(r'^blog/', include('djangocms_blog.urls', namespace='djangocms_blog')),
|
||||
# re_path(r'^webhooks/', webhook_views.handle_webhook),
|
||||
# re_path(r'^$', RedirectView.as_view(url='/cms') if REDIRECT_TO_CMS else LandingView.as_view()),
|
||||
# re_path(r'^', include(('ungleich_page.urls', 'ungleich_page'), namespace='ungleich_page')),
|
||||
# )
|
||||
|
||||
# urlpatterns += [
|
||||
# # re_path(r'^media/(?P<path>.*)$',
|
||||
# # static_view.serve, {
|
||||
# # 'document_root': settings.MEDIA_ROOT,
|
||||
# # }),
|
||||
# re_path(r'^media/(?P<path>.*)$', static_serve, {
|
||||
# 'document_root': settings.MEDIA_ROOT,
|
||||
# }),
|
||||
# ]
|
Loading…
Add table
Reference in a new issue