forked from ungleich-public/dynamicweb
run manage.py check successfully
This commit is contained in:
parent
5c439fd8a6
commit
dc59e39dad
7 changed files with 39 additions and 9 deletions
|
|
@ -13,6 +13,8 @@ from .views import ContactView, IndexView, HistoryView, LoginView, SignupView,\
|
|||
|
||||
# from membership.views import LoginRegistrationView
|
||||
|
||||
app_name = "digitalglarus"
|
||||
|
||||
urlpatterns = [
|
||||
url(_(r'booking/payment/edit/?$'),
|
||||
EditCreditCardView.as_view(), name='edit_credit_card'),
|
||||
|
|
@ -22,7 +24,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/?$', auth_views.logout,
|
||||
url(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>.+)/$',
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
from copy import deepcopy
|
||||
|
||||
from aldryn_apphooks_config.admin import BaseAppHookConfig, ModelAppHookConfig
|
||||
from cms.admin.placeholderadmin import FrontendEditableAdminMixin, PlaceholderAdminMixin
|
||||
#TODO: from cms.admin.placeholderadmin import FrontendEditableAdminMixin, PlaceholderAdminMixin
|
||||
from cms.admin.placeholderadmin import FrontendEditableAdminMixin
|
||||
from cms.models import CMSPlugin, ValidationError
|
||||
from django.apps import apps
|
||||
from django.conf import settings
|
||||
|
|
@ -107,7 +108,8 @@ class BlogCategoryAdmin(ModelAppHookConfig, TranslatableAdmin):
|
|||
|
||||
|
||||
@admin.register(Post)
|
||||
class PostAdmin(PlaceholderAdminMixin, FrontendEditableAdminMixin, ModelAppHookConfig, TranslatableAdmin):
|
||||
class PostAdmin(FrontendEditableAdminMixin, ModelAppHookConfig, TranslatableAdmin):
|
||||
#TODO: class PostAdmin(PlaceholderAdminMixin, FrontendEditableAdminMixin, ModelAppHookConfig, TranslatableAdmin):
|
||||
form = PostAdminForm
|
||||
list_display = ["title", "author", "date_published", "app_config", "all_languages_column", "date_published_end"]
|
||||
search_fields = ("translations__title",)
|
||||
|
|
|
|||
|
|
@ -97,17 +97,37 @@ class PostWizard(Wizard):
|
|||
pass
|
||||
|
||||
|
||||
for config in BlogConfig.objects.all().order_by("namespace"):
|
||||
from django.db.utils import OperationalError, ProgrammingError
|
||||
|
||||
|
||||
try:
|
||||
blog_configs = list(
|
||||
BlogConfig.objects.all().order_by("namespace")
|
||||
)
|
||||
except (OperationalError, ProgrammingError):
|
||||
blog_configs = []
|
||||
|
||||
|
||||
for config in blog_configs:
|
||||
seed = slugify("{}.{}".format(config.app_title, config.namespace))
|
||||
new_wizard = type(str(seed), (PostWizard,), {})
|
||||
new_form = type("{}Form".format(seed), (PostWizardForm,), {"default_appconfig": config.pk})
|
||||
|
||||
new_form = type(
|
||||
"{}Form".format(seed),
|
||||
(PostWizardForm,),
|
||||
{"default_appconfig": config.pk},
|
||||
)
|
||||
|
||||
post_wizard = new_wizard(
|
||||
title=_("New {0}").format(config.object_name),
|
||||
weight=200,
|
||||
form=new_form,
|
||||
model=Post,
|
||||
description=_("Create a new {0} in {1}").format(config.object_name, config.app_title),
|
||||
description=_(
|
||||
"Create a new {0} in {1}"
|
||||
).format(config.object_name, config.app_title),
|
||||
)
|
||||
|
||||
try:
|
||||
wizard_pool.register(post_wizard)
|
||||
except AlreadyRegisteredException: # pragma: no cover
|
||||
|
|
@ -116,7 +136,8 @@ for config in BlogConfig.objects.all().order_by("namespace"):
|
|||
else:
|
||||
warnings.warn(
|
||||
f"Wizard {seed} cannot be registered. Please make sure that "
|
||||
f"BlogConfig.namespace {config.namespace} and BlogConfig.app_title {config.app_title} are"
|
||||
f"BlogConfig.namespace {config.namespace} and "
|
||||
f"BlogConfig.app_title {config.app_title} are "
|
||||
"unique together",
|
||||
stacklevel=2,
|
||||
)
|
||||
|
|
|
|||
|
|
@ -2,7 +2,8 @@ import hashlib
|
|||
|
||||
from aldryn_apphooks_config.fields import AppHookConfigField
|
||||
from aldryn_apphooks_config.managers.parler import AppHookConfigTranslatableManager
|
||||
from cms.models import CMSPlugin, PlaceholderField
|
||||
from cms.models import CMSPlugin
|
||||
from cms.models.fields import PlaceholderField
|
||||
from django.conf import settings as dj_settings
|
||||
from django.contrib.auth import get_user_model
|
||||
from django.contrib.sites.shortcuts import get_current_site
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@ INSTALLED_APPS = (
|
|||
'bootstrap3',
|
||||
'compressor',
|
||||
'filer',
|
||||
#'djangocms_blog',
|
||||
'djangocms_blog',
|
||||
'cms', # django CMS itself
|
||||
#TODO'aldryn_apphooks_config',
|
||||
#TODO'aldryn_boilerplates',
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@ from django.conf.urls import url
|
|||
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()),
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@ from django.conf.urls import url
|
|||
from .views import ContactView, LandingView
|
||||
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'),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue