forked from ungleich-public/dynamicweb
Adapt code to Django 4.2: re_path, gettext, force_str, is_ajax
This commit is contained in:
parent
3b5fcafd3f
commit
eeb6e1b397
52 changed files with 205 additions and 205 deletions
|
|
@ -1,4 +1,4 @@
|
|||
from django.conf.urls import url
|
||||
from django.urls import re_path
|
||||
|
||||
from .views import IndexView, LoginView, ContactView
|
||||
|
||||
|
|
@ -6,9 +6,9 @@ from .views import IndexView, LoginView, ContactView
|
|||
app_name = 'alplora'
|
||||
|
||||
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'^/beta-program/?$', BetaProgramView.as_view(), name='beta'),
|
||||
# url(r'^/landing/?$', LandingProgramView.as_view(), name='landing'),
|
||||
re_path(r'^$', IndexView.as_view(), name='index'),
|
||||
re_path(r'login/', LoginView.as_view(), name='login'),
|
||||
re_path(r'contact', ContactView.as_view(), name='contact'),
|
||||
# re_path(r'^/beta-program/?$', BetaProgramView.as_view(), name='beta'),
|
||||
# re_path(r'^/landing/?$', LandingProgramView.as_view(), name='landing'),
|
||||
]
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
from django.views.generic import TemplateView
|
||||
|
||||
from django.utils.translation import get_language, get_language_info
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from django.views.generic.edit import FormView
|
||||
from django.contrib import messages
|
||||
from django.shortcuts import render
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ from __future__ import unicode_literals
|
|||
|
||||
from django.template.loader import select_template
|
||||
from django.templatetags.static import static
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
from cms.plugin_pool import plugin_pool
|
||||
from cms.plugin_base import CMSPluginBase
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import models
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
from cms.models import CMSPlugin
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
from cms.plugin_pool import plugin_pool
|
||||
from cms.plugin_base import CMSPluginBase
|
||||
from django.template.loader import select_template
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from . import models
|
||||
from .conf import settings
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from django.conf import settings # NOQA
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from appconf import AppConf
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ from __future__ import unicode_literals
|
|||
import warnings
|
||||
from django.db import models
|
||||
from cms.models import CMSPlugin
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from filer.fields.folder import FilerFolderField
|
||||
from .conf import settings
|
||||
from cmsplugin_filer_utils import FilerPluginManager
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
from django.apps import AppConfig
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
|
||||
class FilerImageConfig(AppConfig):
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ from __future__ import unicode_literals
|
|||
|
||||
from django.template.loader import select_template
|
||||
from django.templatetags.static import static
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
from cms.plugin_base import CMSPluginBase
|
||||
from cms.plugin_pool import plugin_pool
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import models
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
from filer.fields.file import FilerFileField
|
||||
from filer.fields.image import FilerImageField
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
from __future__ import unicode_literals
|
||||
|
||||
from django.templatetags.static import static
|
||||
from django.utils.translation import ugettext as _
|
||||
from django.utils.translation import gettext as _
|
||||
|
||||
from cms.plugin_base import CMSPluginBase
|
||||
from cms.plugin_pool import plugin_pool
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import models
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from django.conf import settings
|
||||
|
||||
from cms.models import CMSPlugin
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ from __future__ import unicode_literals
|
|||
from cms.plugin_pool import plugin_pool
|
||||
from cms.plugin_base import CMSPluginBase
|
||||
from django.templatetags.static import static
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from cmsplugin_filer_video import settings
|
||||
from cmsplugin_filer_video.models import FilerVideo
|
||||
from cmsplugin_filer_video.forms import VideoForm
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ from __future__ import unicode_literals
|
|||
from cms.models import CMSPlugin
|
||||
from cmsplugin_filer_video import settings
|
||||
from django.db import models
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from filer.fields.file import FilerFileField
|
||||
from filer.fields.image import FilerImageField
|
||||
from os.path import basename
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
from cms.extensions.toolbar import ExtensionToolbar
|
||||
from cms.toolbar_pool import toolbar_pool
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
from .cms_models import CMSFaviconExtension
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ from django.conf import settings
|
|||
from django.core.mail import EmailMessage
|
||||
from django.urls import reverse
|
||||
from django.utils import translation
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
from dynamicweb.celery import app
|
||||
from hosting.models import HostingOrder
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import logging
|
|||
from django import template
|
||||
from django.urls import resolve, reverse
|
||||
from django.utils.safestring import mark_safe
|
||||
from django.utils.translation import activate, get_language, ugettext_lazy as _
|
||||
from django.utils.translation import activate, get_language, gettext_lazy as _
|
||||
|
||||
from hosting.models import GenericProduct, HostingOrder
|
||||
from utils.hosting_utils import get_ip_addresses
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
from django.conf.urls import url
|
||||
from django.urls import re_path
|
||||
from django.views.generic import TemplateView, RedirectView
|
||||
|
||||
from utils.views import AskSSHKeyView
|
||||
|
|
@ -10,22 +10,22 @@ from .views import (
|
|||
app_name = 'datacenterlight'
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^$', IndexView.as_view(), name='index'),
|
||||
url(r'^t/$', IndexView.as_view(), name='index_t'),
|
||||
url(r'^g/$', IndexView.as_view(), name='index_g'),
|
||||
url(r'^f/$', IndexView.as_view(), name='index_f'),
|
||||
url(r'^l/$', IndexView.as_view(), name='index_l'),
|
||||
url(r'^new/$', RedirectView.as_view(url='/cms/'),
|
||||
re_path(r'^$', IndexView.as_view(), name='index'),
|
||||
re_path(r'^t/$', IndexView.as_view(), name='index_t'),
|
||||
re_path(r'^g/$', IndexView.as_view(), name='index_g'),
|
||||
re_path(r'^f/$', IndexView.as_view(), name='index_f'),
|
||||
re_path(r'^l/$', IndexView.as_view(), name='index_l'),
|
||||
re_path(r'^new/$', RedirectView.as_view(url='/cms/'),
|
||||
name='cms_index'),
|
||||
url(r'^whydatacenterlight/?$', WhyDataCenterLightView.as_view(),
|
||||
re_path(r'^whydatacenterlight/?$', WhyDataCenterLightView.as_view(),
|
||||
name='whydatacenterlight'),
|
||||
url(r'^payment/?$', PaymentOrderView.as_view(), name='payment'),
|
||||
url(r'^order-confirmation/?$', OrderConfirmationView.as_view(),
|
||||
re_path(r'^payment/?$', PaymentOrderView.as_view(), name='payment'),
|
||||
re_path(r'^order-confirmation/?$', OrderConfirmationView.as_view(),
|
||||
name='order_confirmation'),
|
||||
url(r'^add-ssh-key/?$', AskSSHKeyView.as_view(),
|
||||
re_path(r'^add-ssh-key/?$', AskSSHKeyView.as_view(),
|
||||
name='add_ssh_key'),
|
||||
url(r'^contact/?$', ContactUsView.as_view(), name='contact_us'),
|
||||
url(r'glasfaser/?$',
|
||||
re_path(r'^contact/?$', ContactUsView.as_view(), name='contact_us'),
|
||||
re_path(r'glasfaser/?$',
|
||||
TemplateView.as_view(template_name='ungleich_page/glasfaser.html'),
|
||||
name='glasfaser'),
|
||||
]
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ from django.http import (
|
|||
HttpResponseRedirect, JsonResponse, Http404, HttpResponse
|
||||
)
|
||||
from django.shortcuts import render
|
||||
from django.utils.translation import get_language, ugettext_lazy as _
|
||||
from django.utils.translation import get_language, gettext_lazy as _
|
||||
from django.views.decorators.cache import cache_control
|
||||
from django.views.generic import FormView, CreateView, DetailView
|
||||
|
||||
|
|
@ -55,7 +55,7 @@ class ContactUsView(FormView):
|
|||
return HttpResponseRedirect(reverse('datacenterlight:index'))
|
||||
|
||||
def form_invalid(self, form):
|
||||
if self.request.is_ajax():
|
||||
if (self.request.headers.get('x-requested-with') == 'XMLHttpRequest'):
|
||||
return self.render_to_response(
|
||||
self.get_context_data(contact_form=form))
|
||||
else:
|
||||
|
|
@ -82,7 +82,7 @@ class ContactUsView(FormView):
|
|||
# 'reply_to': [form.cleaned_data.get('email')],
|
||||
#}
|
||||
#send_plain_email_task.delay(email_data)
|
||||
if self.request.is_ajax():
|
||||
if (self.request.headers.get('x-requested-with') == 'XMLHttpRequest'):
|
||||
return self.render_to_response(
|
||||
self.get_context_data(success=True, contact_form=form))
|
||||
else:
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
from cms.plugin_base import CMSPluginBase
|
||||
from cms.plugin_pool import plugin_pool
|
||||
from .models import DGGalleryPlugin, DGSupportersPlugin, Supporter
|
||||
from django.utils.translation import ugettext as _
|
||||
from django.utils.translation import gettext as _
|
||||
|
||||
|
||||
class CMSGalleryPlugin(CMSPluginBase):
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
from django import forms
|
||||
from django.db.models import Q
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
|
||||
from utils.models import BillingAddress
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
from django.conf.urls import url
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.urls import re_path
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from django.contrib.auth import views as auth_views
|
||||
|
||||
from . import views
|
||||
|
|
@ -16,49 +16,49 @@ from .views import ContactView, IndexView, HistoryView, LoginView, SignupView,\
|
|||
app_name = 'digitalglarus'
|
||||
|
||||
urlpatterns = [
|
||||
url(_(r'booking/payment/edit/?$'),
|
||||
re_path(_(r'booking/payment/edit/?$'),
|
||||
EditCreditCardView.as_view(), name='edit_credit_card'),
|
||||
url(_(r'^$'), IndexView.as_view(), name='landing'),
|
||||
# url(_(r'new_credit_card/?$'), TermsAndConditions, name='TermsAndConditions'),
|
||||
url(_(r'support-us/?$'), SupportusView.as_view(), name='supportus'),
|
||||
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/?$', auth_views.LogoutView.as_view(
|
||||
re_path(_(r'^$'), IndexView.as_view(), name='landing'),
|
||||
# re_path(_(r'new_credit_card/?$'), TermsAndConditions, name='TermsAndConditions'),
|
||||
re_path(_(r'support-us/?$'), SupportusView.as_view(), name='supportus'),
|
||||
re_path(_(r'contact/?$'), ContactView.as_view(), name='contact'),
|
||||
re_path(_(r'login/?$'), LoginView.as_view(), name='login'),
|
||||
re_path(_(r'signup/?$'), SignupView.as_view(), name='signup'),
|
||||
re_path(r'^logout/?$', auth_views.LogoutView.as_view(
|
||||
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<uidb64>[0-9A-Za-z]+)-(?P<token>.+)/$',
|
||||
re_path(r'reset-password/?$', PasswordResetView.as_view(), name='reset_password'),
|
||||
re_path(r'reset-password-confirm/(?P<uidb64>[0-9A-Za-z]+)-(?P<token>.+)/$',
|
||||
PasswordResetConfirmView.as_view(), name='reset_password_confirm'),
|
||||
url(_(r'history/?$'), HistoryView.as_view(), name='history'),
|
||||
url(_(r'users/billing_address/?$'), UserBillingAddressView.as_view(),
|
||||
re_path(_(r'history/?$'), HistoryView.as_view(), name='history'),
|
||||
re_path(_(r'users/billing_address/?$'), UserBillingAddressView.as_view(),
|
||||
name='user_billing_address'),
|
||||
url(_(r'booking/?$'), BookingSelectDatesView.as_view(), name='booking'),
|
||||
url(_(r'booking/payment/?$'),
|
||||
re_path(_(r'booking/?$'), BookingSelectDatesView.as_view(), name='booking'),
|
||||
re_path(_(r'booking/payment/?$'),
|
||||
BookingPaymentView.as_view(), name='booking_payment'),
|
||||
url(_(r'booking/orders/(?P<pk>\d+)/?$'), OrdersBookingDetailView.as_view(),
|
||||
re_path(_(r'booking/orders/(?P<pk>\d+)/?$'), OrdersBookingDetailView.as_view(),
|
||||
name='booking_orders_detail'),
|
||||
# url(_(r'booking/orders/(?P<pk>\d+)/cancel/?$'), BookingCancelView.as_view(),
|
||||
# re_path(_(r'booking/orders/(?P<pk>\d+)/cancel/?$'), BookingCancelView.as_view(),
|
||||
# name='booking_orders_cancel'),
|
||||
url(_(r'booking/orders/?$'), BookingOrdersListView.as_view(),
|
||||
re_path(_(r'booking/orders/?$'), BookingOrdersListView.as_view(),
|
||||
name='booking_orders_list'),
|
||||
url(_(r'membership/payment/?$'),
|
||||
re_path(_(r'membership/payment/?$'),
|
||||
MembershipPaymentView.as_view(), name='membership_payment'),
|
||||
url(_(r'membership/activated/?$'), MembershipActivatedView.as_view(),
|
||||
re_path(_(r'membership/activated/?$'), MembershipActivatedView.as_view(),
|
||||
name='membership_activated'),
|
||||
url(_(r'membership/deactivate/?$'), MembershipDeactivateView.as_view(),
|
||||
re_path(_(r'membership/deactivate/?$'), MembershipDeactivateView.as_view(),
|
||||
name='membership_deactivate'),
|
||||
url(_(r'membership/reactivate/?$'), MembershipReactivateView.as_view(),
|
||||
re_path(_(r'membership/reactivate/?$'), MembershipReactivateView.as_view(),
|
||||
name='membership_reactivate'),
|
||||
url(_(r'membership/deactivate/success/?$'), MembershipDeactivateSuccessView.as_view(),
|
||||
re_path(_(r'membership/deactivate/success/?$'), MembershipDeactivateSuccessView.as_view(),
|
||||
name='membership_deactivate_success'),
|
||||
url(_(r'membership/pricing/?$'), MembershipPricingView.as_view(),
|
||||
re_path(_(r'membership/pricing/?$'), MembershipPricingView.as_view(),
|
||||
name='membership_pricing'),
|
||||
url(_(r'membership/orders/(?P<pk>\d+)/?$'), OrdersMembershipDetailView.as_view(),
|
||||
re_path(_(r'membership/orders/(?P<pk>\d+)/?$'), OrdersMembershipDetailView.as_view(),
|
||||
name='membership_orders_detail'),
|
||||
url(_(r'membership/orders/?$'), MembershipOrdersListView.as_view(),
|
||||
re_path(_(r'membership/orders/?$'), MembershipOrdersListView.as_view(),
|
||||
name='membership_orders_list'),
|
||||
url(_(r'supporters/?$'), views.supporters, name='supporters'),
|
||||
url(_(r'support-us/?$'), views.support, name='support'),
|
||||
url(r'^blog/(?P<slug>\w[-\w]*)/$', views.blog_detail, name='blog-detail'),
|
||||
url(r'blog/$', views.blog, name='blog'),
|
||||
re_path(_(r'supporters/?$'), views.supporters, name='supporters'),
|
||||
re_path(_(r'support-us/?$'), views.support, name='support'),
|
||||
re_path(r'^blog/(?P<slug>\w[-\w]*)/$', views.blog_detail, name='blog-detail'),
|
||||
re_path(r'blog/$', views.blog, name='blog'),
|
||||
]
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ from django.conf import settings
|
|||
from django.shortcuts import render
|
||||
from django.http import HttpResponseRedirect, Http404
|
||||
from django.urls import reverse_lazy, reverse
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from django.views.generic import TemplateView, UpdateView
|
||||
from django.contrib.auth.mixins import LoginRequiredMixin
|
||||
from django.utils.translation import get_language
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ Copyright 2015 ungleich.
|
|||
# -*- coding: utf-8 -*-
|
||||
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
|
||||
import os
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
# dotenv
|
||||
import dotenv
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
from cms.models.pagemodel import Page
|
||||
from django.conf.urls import include, url
|
||||
from django.urls import include, re_path
|
||||
from django.contrib import admin
|
||||
from django.contrib.sites.models import Site
|
||||
from django.conf.urls.i18n import i18n_patterns
|
||||
|
|
@ -19,25 +19,25 @@ from django.urls import reverse_lazy
|
|||
import debug_toolbar
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^index.html$', LandingView.as_view()),
|
||||
url(r'^open_api/',
|
||||
re_path(r'^index.html$', LandingView.as_view()),
|
||||
re_path(r'^open_api/',
|
||||
include('opennebula_api.urls', namespace='opennebula_api')),
|
||||
url(r'^railshosting/', RailsHostingView.as_view(),
|
||||
re_path(r'^railshosting/', RailsHostingView.as_view(),
|
||||
name="rails.hosting"),
|
||||
url(r'^nodehosting/', NodeJSHostingView.as_view(),
|
||||
re_path(r'^nodehosting/', NodeJSHostingView.as_view(),
|
||||
name="node.hosting"),
|
||||
url(r'^djangohosting/', DjangoHostingView.as_view(),
|
||||
re_path(r'^djangohosting/', DjangoHostingView.as_view(),
|
||||
name="django.hosting"),
|
||||
url(r'^nosystemd/', include('nosystemd.urls', namespace="nosystemd")),
|
||||
url(r'^taggit_autosuggest/', include('taggit_autosuggest.urls')),
|
||||
url(r'^jsi18n/(?P<packages>\S+?)/$', i18n.JavaScriptCatalog.as_view()),
|
||||
url(r'^product/(?P<product_slug>[\w-]+)/$',
|
||||
re_path(r'^nosystemd/', include('nosystemd.urls', namespace="nosystemd")),
|
||||
re_path(r'^taggit_autosuggest/', include('taggit_autosuggest.urls')),
|
||||
re_path(r'^jsi18n/(?P<packages>\S+?)/$', i18n.JavaScriptCatalog.as_view()),
|
||||
re_path(r'^product/(?P<product_slug>[\w-]+)/$',
|
||||
PaymentOrderView.as_view(),
|
||||
name='show_product'),
|
||||
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
|
||||
|
||||
urlpatterns += i18n_patterns(
|
||||
url(r'^hosting/', include('hosting.urls', namespace="hosting")),
|
||||
re_path(r'^hosting/', include('hosting.urls', namespace="hosting")),
|
||||
)
|
||||
|
||||
# note the django CMS URLs included via i18n_patterns
|
||||
|
|
@ -51,34 +51,34 @@ def home_view(request, *args, **kwargs):
|
|||
|
||||
|
||||
urlpatterns += i18n_patterns(
|
||||
url(r'^admin/', admin.site.urls),
|
||||
url(r'^datacenterlight/',
|
||||
re_path(r'^admin/', admin.site.urls),
|
||||
re_path(r'^datacenterlight/',
|
||||
include('datacenterlight.urls', namespace="datacenterlight")),
|
||||
url(r'^hosting/', RedirectView.as_view(url=reverse_lazy('hosting:login')),
|
||||
re_path(r'^hosting/', RedirectView.as_view(url=reverse_lazy('hosting:login')),
|
||||
name='redirect_hosting_login'),
|
||||
url(r'^alplora/', include('alplora.urls', namespace="alplora")),
|
||||
url(r'^membership/', include(membership_urls)),
|
||||
url(r'^digitalglarus/',
|
||||
re_path(r'^alplora/', include('alplora.urls', namespace="alplora")),
|
||||
re_path(r'^membership/', include(membership_urls)),
|
||||
re_path(r'^digitalglarus/',
|
||||
include('digitalglarus.urls', namespace="digitalglarus")),
|
||||
url(r'^cms/blog/', include('ungleich.urls', namespace='ungleich')),
|
||||
url(r'^blog/(?P<year>\d{4})/(?P<month>\d{1,2})/(?P<day>\d{1,2})/(?P<slug>\w[-\w]*)/$',
|
||||
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')),
|
||||
url(r'^blog/$',
|
||||
re_path(r'^blog/$',
|
||||
RedirectView.as_view(url=reverse_lazy('ungleich:post-list')),
|
||||
name='blog_list_view'),
|
||||
url(r'^cms/', include('cms.urls')),
|
||||
url(r'^blog/', include('djangocms_blog.urls', namespace='djangocms_blog')),
|
||||
url(r'^webhooks/', webhook_views.handle_webhook),
|
||||
url(r'^$', home_view),
|
||||
url(r'^', include('ungleich_page.urls', namespace='ungleich_page')),
|
||||
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'^$', home_view),
|
||||
re_path(r'^', include('ungleich_page.urls', namespace='ungleich_page')),
|
||||
)
|
||||
|
||||
urlpatterns += [
|
||||
url(r'^media/(?P<path>.*)$',
|
||||
re_path(r'^media/(?P<path>.*)$',
|
||||
static_view.serve, {
|
||||
'document_root': settings.MEDIA_ROOT,
|
||||
}),
|
||||
]
|
||||
|
||||
if settings.DEBUG:
|
||||
urlpatterns += [url(r'^__debug__/', include(debug_toolbar.urls))]
|
||||
urlpatterns += [re_path(r'^__debug__/', include(debug_toolbar.urls))]
|
||||
|
|
|
|||
|
|
@ -1,18 +1,18 @@
|
|||
from django.conf import settings
|
||||
from django.conf.urls import include, url
|
||||
from django.urls import include, re_path
|
||||
from django.conf.urls.i18n import i18n_patterns
|
||||
from django.contrib import admin
|
||||
from django.views import static as static_view
|
||||
from django.views.generic import RedirectView
|
||||
|
||||
urlpatterns = i18n_patterns(
|
||||
url(r'^admin/', admin.site.urls),
|
||||
url(r'^cms/', include('cms.urls')),
|
||||
url(r'^$', RedirectView.as_view(url='/cms')),
|
||||
re_path(r'^admin/', admin.site.urls),
|
||||
re_path(r'^cms/', include('cms.urls')),
|
||||
re_path(r'^$', RedirectView.as_view(url='/cms')),
|
||||
)
|
||||
|
||||
urlpatterns += [
|
||||
url(r'^media/(?P<path>.*)$',
|
||||
re_path(r'^media/(?P<path>.*)$',
|
||||
static_view.serve, {
|
||||
'document_root': settings.MEDIA_ROOT,
|
||||
}),
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import xml
|
|||
from django import forms
|
||||
from django.conf import settings
|
||||
from django.contrib.auth import authenticate
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
from membership.models import CustomUser
|
||||
from .models import UserHostingKey, GenericProduct
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
from django.conf.urls import url
|
||||
from django.urls import re_path
|
||||
from django.contrib.auth import views as auth_views
|
||||
|
||||
from utils.views import SSHKeyCreateView, AskSSHKeyView
|
||||
|
|
@ -17,62 +17,62 @@ from .views import (
|
|||
app_name = 'hosting'
|
||||
|
||||
urlpatterns = [
|
||||
url(r'index/?$', IndexView.as_view(), name='index'),
|
||||
url(r'django/?$', DjangoHostingView.as_view(), name='djangohosting'),
|
||||
url(r'checkvm/?$', CheckUserVM.as_view(), name='check_vm'),
|
||||
url(r'dashboard/?$', DashboardView.as_view(), name='dashboard'),
|
||||
url(r'nodejs/?$', NodeJSHostingView.as_view(), name='nodejshosting'),
|
||||
url(r'rails/?$', RailsHostingView.as_view(), name='railshosting'),
|
||||
url(r'pricing/?$', HostingPricingView.as_view(), name='pricing'),
|
||||
url(r'payment/?$', PaymentVMView.as_view(), name='payment'),
|
||||
url(r'settings/?$', SettingsView.as_view(), name='settings'),
|
||||
url(r'orders/?$', OrdersHostingListView.as_view(), name='orders'),
|
||||
url(r'invoices/?$', InvoiceListView.as_view(), name='invoices'),
|
||||
url(r'order-confirmation/?$', OrdersHostingDetailView.as_view(),
|
||||
re_path(r'index/?$', IndexView.as_view(), name='index'),
|
||||
re_path(r'django/?$', DjangoHostingView.as_view(), name='djangohosting'),
|
||||
re_path(r'checkvm/?$', CheckUserVM.as_view(), name='check_vm'),
|
||||
re_path(r'dashboard/?$', DashboardView.as_view(), name='dashboard'),
|
||||
re_path(r'nodejs/?$', NodeJSHostingView.as_view(), name='nodejshosting'),
|
||||
re_path(r'rails/?$', RailsHostingView.as_view(), name='railshosting'),
|
||||
re_path(r'pricing/?$', HostingPricingView.as_view(), name='pricing'),
|
||||
re_path(r'payment/?$', PaymentVMView.as_view(), name='payment'),
|
||||
re_path(r'settings/?$', SettingsView.as_view(), name='settings'),
|
||||
re_path(r'orders/?$', OrdersHostingListView.as_view(), name='orders'),
|
||||
re_path(r'invoices/?$', InvoiceListView.as_view(), name='invoices'),
|
||||
re_path(r'order-confirmation/?$', OrdersHostingDetailView.as_view(),
|
||||
name='order-confirmation'),
|
||||
url(r'^add-ssh-key/?$', AskSSHKeyView.as_view(),
|
||||
re_path(r'^add-ssh-key/?$', AskSSHKeyView.as_view(),
|
||||
name='add_ssh_key'),
|
||||
url(r'orders/(?P<pk>\d+)/?$', OrdersHostingDetailView.as_view(),
|
||||
re_path(r'orders/(?P<pk>\d+)/?$', OrdersHostingDetailView.as_view(),
|
||||
name='orders'),
|
||||
url(r'invoice/(?P<invoice_id>[-\w]+)/?$', InvoiceDetailView.as_view(),
|
||||
re_path(r'invoice/(?P<invoice_id>[-\w]+)/?$', InvoiceDetailView.as_view(),
|
||||
name='invoices'),
|
||||
url(r'bills/?$', HostingBillListView.as_view(), name='bills'),
|
||||
url(r'bills/(?P<pk>\d+)/?$', HostingBillDetailView.as_view(),
|
||||
re_path(r'bills/?$', HostingBillListView.as_view(), name='bills'),
|
||||
re_path(r'bills/(?P<pk>\d+)/?$', HostingBillDetailView.as_view(),
|
||||
name='bills'),
|
||||
url(r'cancel_order/(?P<pk>\d+)/?$',
|
||||
re_path(r'cancel_order/(?P<pk>\d+)/?$',
|
||||
OrdersHostingDeleteView.as_view(), name='delete_order'),
|
||||
url(r'create_virtual_machine/?$', CreateVirtualMachinesView.as_view(),
|
||||
re_path(r'create_virtual_machine/?$', CreateVirtualMachinesView.as_view(),
|
||||
name='create_virtual_machine'),
|
||||
url(r'my-virtual-machines/?$',
|
||||
re_path(r'my-virtual-machines/?$',
|
||||
VirtualMachinesPlanListView.as_view(), name='virtual_machines'),
|
||||
url(r'my-virtual-machines/(?P<pk>\d+)/?$', VirtualMachineView.as_view(),
|
||||
re_path(r'my-virtual-machines/(?P<pk>\d+)/?$', VirtualMachineView.as_view(),
|
||||
name='virtual_machines'),
|
||||
url(r'ssh_keys/?$', SSHKeyListView.as_view(),
|
||||
re_path(r'ssh_keys/?$', SSHKeyListView.as_view(),
|
||||
name='ssh_keys'),
|
||||
url(r'ssh_keys_choice/?$', SSHKeyChoiceView.as_view(),
|
||||
re_path(r'ssh_keys_choice/?$', SSHKeyChoiceView.as_view(),
|
||||
name='choice_ssh_keys'),
|
||||
url(r'delete_ssh_key/(?P<pk>\d+)/?$', SSHKeyDeleteView.as_view(),
|
||||
re_path(r'delete_ssh_key/(?P<pk>\d+)/?$', SSHKeyDeleteView.as_view(),
|
||||
name='delete_ssh_key'),
|
||||
url(r'delete_card/(?P<pk>[\w\-]+)/$', SettingsView.as_view(),
|
||||
re_path(r'delete_card/(?P<pk>[\w\-]+)/$', SettingsView.as_view(),
|
||||
name='delete_card'),
|
||||
url(r'create_ssh_key/?$', SSHKeyCreateView.as_view(),
|
||||
re_path(r'create_ssh_key/?$', SSHKeyCreateView.as_view(),
|
||||
name='create_ssh_key'),
|
||||
url(r'^notifications/$', NotificationsView.as_view(),
|
||||
re_path(r'^notifications/$', NotificationsView.as_view(),
|
||||
name='notifications'),
|
||||
url(r'^notifications/(?P<pk>\d+)/?$', MarkAsReadNotificationView.as_view(),
|
||||
re_path(r'^notifications/(?P<pk>\d+)/?$', MarkAsReadNotificationView.as_view(),
|
||||
name='read_notification'),
|
||||
url(r'login/?$', LoginView.as_view(), name='login'),
|
||||
url(r'signup/?$', SignupView.as_view(), name='signup'),
|
||||
url(r'signup-validate/?$', SignupValidateView.as_view(),
|
||||
re_path(r'login/?$', LoginView.as_view(), name='login'),
|
||||
re_path(r'signup/?$', SignupView.as_view(), name='signup'),
|
||||
re_path(r'signup-validate/?$', SignupValidateView.as_view(),
|
||||
name='signup-validate'),
|
||||
url(r'resend-activation-link/?$', ResendActivationEmailView.as_view(),
|
||||
re_path(r'resend-activation-link/?$', ResendActivationEmailView.as_view(),
|
||||
name='resend_activation_link'),
|
||||
url(r'reset-password/?$', PasswordResetView.as_view(),
|
||||
re_path(r'reset-password/?$', PasswordResetView.as_view(),
|
||||
name='reset_password'),
|
||||
url(r'reset-password-confirm/(?P<uidb64>[0-9A-Za-z]+)-(?P<token>.+)/$',
|
||||
re_path(r'reset-password-confirm/(?P<uidb64>[0-9A-Za-z]+)-(?P<token>.+)/$',
|
||||
PasswordResetConfirmView.as_view(), name='reset_password_confirm'),
|
||||
url(r'^logout/?$', auth_views.LogoutView.as_view(
|
||||
re_path(r'^logout/?$', auth_views.LogoutView.as_view(
|
||||
next_page='/hosting/login?logged_out=true'), name='logout'),
|
||||
url(r'^validate/(?P<validate_slug>.*)/$',
|
||||
re_path(r'^validate/(?P<validate_slug>.*)/$',
|
||||
SignupValidatedView.as_view(), name='validate')
|
||||
]
|
||||
|
|
|
|||
|
|
@ -23,8 +23,8 @@ from django.utils.decorators import method_decorator
|
|||
from django.utils.html import escape
|
||||
from django.utils.http import urlsafe_base64_decode
|
||||
from django.utils.safestring import mark_safe
|
||||
from django.utils.translation import get_language, ugettext_lazy as _
|
||||
from django.utils.translation import ugettext
|
||||
from django.utils.translation import get_language, gettext_lazy as _
|
||||
from django.utils.translation import gettext
|
||||
from django.views.decorators.cache import never_cache
|
||||
from django.views.generic import (
|
||||
View, CreateView, FormView, ListView, DetailView, DeleteView,
|
||||
|
|
@ -587,7 +587,7 @@ class SettingsView(LoginRequiredMixin, FormView):
|
|||
return context
|
||||
|
||||
def post(self, request, *args, **kwargs):
|
||||
if 'card' in request.POST and request.POST['card'] is not '':
|
||||
if 'card' in request.POST and request.POST['card'] != '':
|
||||
card_id = escape(request.POST['card'])
|
||||
UserCardDetail.set_default_card(
|
||||
stripe_api_cus_id=request.user.stripecustomer.stripe_id,
|
||||
|
|
@ -806,7 +806,7 @@ class PaymentVMView(LoginRequiredMixin, FormView):
|
|||
billing_address_data = form.cleaned_data
|
||||
token = form.cleaned_data.get('token')
|
||||
owner = self.request.user
|
||||
if token is '':
|
||||
if token == '':
|
||||
card_id = form.cleaned_data.get('card')
|
||||
customer = owner.stripecustomer
|
||||
try:
|
||||
|
|
@ -1746,15 +1746,15 @@ class VirtualMachineView(LoginRequiredMixin, View):
|
|||
def get(self, request, *args, **kwargs):
|
||||
vm = self.get_object()
|
||||
if vm is None:
|
||||
if self.request.is_ajax():
|
||||
if (self.request.headers.get('x-requested-with') == 'XMLHttpRequest'):
|
||||
storage = messages.get_messages(request)
|
||||
for m in storage:
|
||||
pass
|
||||
storage.used = True
|
||||
return JsonResponse({'text': ugettext('Terminated')})
|
||||
return JsonResponse({'text': gettext('Terminated')})
|
||||
else:
|
||||
return redirect(reverse('hosting:virtual_machines'))
|
||||
elif self.request.is_ajax():
|
||||
elif (self.request.headers.get('x-requested-with') == 'XMLHttpRequest'):
|
||||
return HttpResponse()
|
||||
context = None
|
||||
try:
|
||||
|
|
@ -1860,7 +1860,7 @@ class VirtualMachineView(LoginRequiredMixin, View):
|
|||
"VM {} not found. So, its terminated.".format(vm.id)
|
||||
)
|
||||
response['status'] = True
|
||||
response['text'] = ugettext('Terminated')
|
||||
response['text'] = gettext('Terminated')
|
||||
vm_detail_obj = VMDetail.objects.filter(
|
||||
vm_id=vm.id
|
||||
).first()
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
__author__ = 'tomislav'
|
||||
from django import forms
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from django.contrib.auth import authenticate
|
||||
|
||||
from .models import CreditCards
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ from django.urls import reverse
|
|||
from django.core.validators import RegexValidator
|
||||
from django.db import models, IntegrityError
|
||||
from django.utils.crypto import get_random_string
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from django.core.exceptions import ValidationError
|
||||
|
||||
from utils.mailer import BaseEmail
|
||||
|
|
|
|||
|
|
@ -1,14 +1,14 @@
|
|||
__author__ = 'tomislav'
|
||||
from django.conf.urls import url
|
||||
from django.urls import re_path
|
||||
from django.contrib.auth.decorators import login_required
|
||||
|
||||
from . import views
|
||||
|
||||
urlpatterns = (
|
||||
url(r"^$", views.LoginRegistrationView.as_view(), name='login_glarus'),
|
||||
url(r"^validate/(?P<validate_slug>.*)/$", views.validate_email),
|
||||
url(r"^membership/$", login_required(views.MembershipView.as_view()), name='membership'),
|
||||
url(r'logout/?$', views.logout_glarus, name='logout_glarus'),
|
||||
url(r"^buy/(?P<time>\w+)/$", login_required(views.CreditCardView.as_view()), name='payment'),
|
||||
url(r'^buy/(?P<time>\w+)/reset', login_required(views.reset), name='reset')
|
||||
re_path(r"^$", views.LoginRegistrationView.as_view(), name='login_glarus'),
|
||||
re_path(r"^validate/(?P<validate_slug>.*)/$", views.validate_email),
|
||||
re_path(r"^membership/$", login_required(views.MembershipView.as_view()), name='membership'),
|
||||
re_path(r'logout/?$', views.logout_glarus, name='logout_glarus'),
|
||||
re_path(r"^buy/(?P<time>\w+)/$", login_required(views.CreditCardView.as_view()), name='payment'),
|
||||
re_path(r'^buy/(?P<time>\w+)/reset', login_required(views.reset), name='reset')
|
||||
)
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
from django import forms
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
|
||||
from utils.forms import LoginFormMixin, SignupFormMixin, BillingAddressForm
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
from django.conf.urls import url
|
||||
from django.urls import re_path
|
||||
from django.contrib.auth import views as auth_views
|
||||
|
||||
from .views import LandingView, LoginView, SignupView, PasswordResetView,\
|
||||
|
|
@ -8,21 +8,21 @@ from .views import LandingView, LoginView, SignupView, PasswordResetView,\
|
|||
app_name = 'nosystemd'
|
||||
|
||||
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/?$', auth_views.LogoutView.as_view(
|
||||
re_path(r'^$', LandingView.as_view(), name='landing'),
|
||||
re_path(r'^login/?$', LoginView.as_view(), name='login'),
|
||||
re_path(r'^signup/?$', SignupView.as_view(), name='signup'),
|
||||
re_path(r'^logout/?$', auth_views.LogoutView.as_view(
|
||||
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<uidb64>[0-9A-Za-z]+)-(?P<token>.+)/$',
|
||||
re_path(r'reset-password/?$', PasswordResetView.as_view(), name='reset_password'),
|
||||
re_path(r'reset-password-confirm/(?P<uidb64>[0-9A-Za-z]+)-(?P<token>.+)/$',
|
||||
PasswordResetConfirmView.as_view(), name='reset_password_confirm'),
|
||||
url(r'^donations/?$', DonationListView.as_view(), name='donations'),
|
||||
url(r'donations/(?P<pk>\d+)/?$', DonationDetailView.as_view(), name='donations'),
|
||||
url(r'^make_donation/?$', DonationView.as_view(), name='make_donation'),
|
||||
url(r'donations/status/?$', DonatorStatusDetailView.as_view(),
|
||||
re_path(r'^donations/?$', DonationListView.as_view(), name='donations'),
|
||||
re_path(r'donations/(?P<pk>\d+)/?$', DonationDetailView.as_view(), name='donations'),
|
||||
re_path(r'^make_donation/?$', DonationView.as_view(), name='make_donation'),
|
||||
re_path(r'donations/status/?$', DonatorStatusDetailView.as_view(),
|
||||
name='donator_status'),
|
||||
url(r'donations/status/(?P<pk>\d+)/?$', ChangeDonatorStatusDetailView.as_view(),
|
||||
re_path(r'donations/status/(?P<pk>\d+)/?$', ChangeDonatorStatusDetailView.as_view(),
|
||||
name='change_donator_status'),
|
||||
# url(r'^donation/invoice?$', DonationView.as_view(), name='donation_detail'),
|
||||
# re_path(r'^donation/invoice?$', DonationView.as_view(), name='donation_detail'),
|
||||
|
||||
]
|
||||
|
|
|
|||
|
|
@ -1,14 +1,14 @@
|
|||
from django.conf.urls import url, include
|
||||
from django.urls import re_path, include
|
||||
from rest_framework.urlpatterns import format_suffix_patterns
|
||||
from .views import VmCreateView, VmDetailsView
|
||||
|
||||
app_name = 'opennebula_api'
|
||||
|
||||
urlpatterns = {
|
||||
url(r'^auth/', include('rest_framework.urls', namespace='rest_framework')),
|
||||
re_path(r'^auth/', include('rest_framework.urls', namespace='rest_framework')),
|
||||
|
||||
url(r'^vms/$', VmCreateView.as_view(), name="vm_create"),
|
||||
url(r'^vms/(?P<pk>[0-9]+)/$', VmDetailsView.as_view(),
|
||||
re_path(r'^vms/$', VmCreateView.as_view(), name="vm_create"),
|
||||
re_path(r'^vms/(?P<pk>[0-9]+)/$', VmDetailsView.as_view(),
|
||||
name="vm_details"),
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
from __future__ import unicode_literals
|
||||
|
||||
from django.utils import timezone
|
||||
from django.utils.encoding import force_text
|
||||
from django.utils.encoding import force_str
|
||||
from django.core.serializers.json import DjangoJSONEncoder
|
||||
|
||||
import json
|
||||
|
|
@ -43,7 +43,7 @@ class RedisBackend(StoredMessagesBackend):
|
|||
"""
|
||||
Return a Message instance built from data contained in a JSON string
|
||||
"""
|
||||
return Message(**json.loads(force_text(json_msg)))
|
||||
return Message(**json.loads(force_str(json_msg)))
|
||||
|
||||
def _list_key(self, key):
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ from __future__ import unicode_literals
|
|||
from django.db import models
|
||||
from django.conf import settings
|
||||
from django.utils import timezone
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
from .settings import stored_messages_settings
|
||||
|
||||
|
|
|
|||
|
|
@ -5,13 +5,13 @@ from django.conf import settings
|
|||
|
||||
if 'rest_framework' in settings.INSTALLED_APPS:
|
||||
from rest_framework.routers import DefaultRouter
|
||||
from django.conf.urls import url, include
|
||||
from django.urls import re_path, include
|
||||
from . import views
|
||||
|
||||
router = DefaultRouter()
|
||||
router.register(r'inbox', views.InboxViewSet, base_name='inbox')
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^', include(router.urls)),
|
||||
url(r'^mark_all_read/$', views.mark_all_read, name='mark_all_read'),
|
||||
re_path(r'^', include(router.urls)),
|
||||
re_path(r'^mark_all_read/$', views.mark_all_read, name='mark_all_read'),
|
||||
]
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# from django.utils.translation import ugettext_lazy as _
|
||||
# from django.utils.translation import gettext_lazy as _
|
||||
# TEMPLATES = {
|
||||
# 'digitalglarus/about.html': _('DG.About'),
|
||||
# 'digitalglarus/contact.html': _('DG.Contact'),
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
TEMPLATES = {
|
||||
'digitalglarus/about.html': _('DG.About'),
|
||||
'digitalglarus/contact.html': _('DG.Contact'),
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
TEMPLATES = {
|
||||
'about.html': _('DG.About'),
|
||||
'contact.html': _('DG.Contact'),
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
TEMPLATES = {
|
||||
'blog.html': _('Blog'),
|
||||
'page.html': _('Page'),
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
from cms.extensions.toolbar import ExtensionToolbar
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
from cms.toolbar_pool import toolbar_pool
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# from django.utils.translation import ugettext_lazy as _
|
||||
# from django.utils.translation import gettext_lazy as _
|
||||
# TEMPLATES = {
|
||||
# 'blog_u.html': _('Blog'),
|
||||
# 'page.html': _('Page'),
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
from django.conf.urls import url
|
||||
from django.urls import re_path
|
||||
from . import views
|
||||
from .views import PostDetailViewUngleich
|
||||
|
||||
app_name = 'ungleich'
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^$', views.PostListViewUngleich.as_view(), name="post-list"),
|
||||
# url(r'^$',views.PostListView.as_view()),
|
||||
url(r'^(?P<year>\d{4})/(?P<month>\d{1,2})/(?P<day>\d{1,2})/(?P<slug>\w[-\w]*)/$',
|
||||
re_path(r'^$', views.PostListViewUngleich.as_view(), name="post-list"),
|
||||
# re_path(r'^$',views.PostListView.as_view()),
|
||||
re_path(r'^(?P<year>\d{4})/(?P<month>\d{1,2})/(?P<day>\d{1,2})/(?P<slug>\w[-\w]*)/$',
|
||||
PostDetailViewUngleich.as_view(), name="post-detail")
|
||||
]
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ from django.utils.translation import get_language
|
|||
from djangocms_blog.models import Post
|
||||
from djangocms_blog.views import PostListView
|
||||
from djangocms_blog.settings import get_setting
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from djangocms_blog.models import BlogCategory
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
from menus.base import NavigationNode
|
||||
from menus.menu_pool import menu_pool
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from cms.menu_bases import CMSAttachMenu
|
||||
from cms.utils.plugins import get_plugins
|
||||
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
from django.conf.urls import url
|
||||
from django.urls import re_path
|
||||
from .views import ContactView, LandingView
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
app_name = 'ungleich_page'
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^$', LandingView.as_view(), name='landing'),
|
||||
# url(r'^ungleich_page/?$', LandingView.as_view(), name='landing'),
|
||||
url(_(r'contact/$'), ContactView.as_view(), name='contact'),
|
||||
re_path(r'^$', LandingView.as_view(), name='landing'),
|
||||
# re_path(r'^ungleich_page/?$', LandingView.as_view(), name='landing'),
|
||||
re_path(_(r'contact/$'), ContactView.as_view(), name='contact'),
|
||||
]
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
from django.contrib import messages
|
||||
|
||||
from django.views.generic.edit import FormView
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from django.urls import reverse_lazy
|
||||
from django.views.generic import View
|
||||
from django.shortcuts import render
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
from django.utils.translation import ugettext as _
|
||||
from django.utils.translation import gettext as _
|
||||
from django.db import models
|
||||
|
||||
# Old: http://xml.coverpages.org/country3166.html
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ from django import forms
|
|||
from django.contrib.auth import authenticate
|
||||
from django.core.mail import EmailMultiAlternatives
|
||||
from django.template.loader import render_to_string
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
from captcha.fields import ReCaptchaField
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ from django.http import HttpResponseRedirect
|
|||
from django.shortcuts import render
|
||||
from django.utils.encoding import force_bytes
|
||||
from django.utils.http import urlsafe_base64_encode, urlsafe_base64_decode
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from django.views.decorators.cache import cache_control
|
||||
from django.views.generic import FormView, CreateView
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue