Upgrade to Wagtail 3.0
This commit is contained in:
parent
d02afcf501
commit
3a9ad53e7a
|
|
@ -1,2 +1,2 @@
|
||||||
nodejs 16.10.0
|
nodejs 16.10.0
|
||||||
python 3.10.0
|
python 3.10.5
|
||||||
|
|
|
||||||
|
|
@ -2,10 +2,9 @@
|
||||||
Base settings to build other settings files upon.
|
Base settings to build other settings files upon.
|
||||||
"""
|
"""
|
||||||
import logging
|
import logging
|
||||||
from pathlib import Path
|
|
||||||
|
|
||||||
import structlog
|
import structlog
|
||||||
from environs import Env
|
from environs import Env
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
from vbv_lernwelt.core.utils import structlog_add_app_info
|
from vbv_lernwelt.core.utils import structlog_add_app_info
|
||||||
|
|
||||||
|
|
@ -82,6 +81,7 @@ THIRD_PARTY_APPS = [
|
||||||
|
|
||||||
'wagtail.contrib.forms',
|
'wagtail.contrib.forms',
|
||||||
'wagtail.contrib.redirects',
|
'wagtail.contrib.redirects',
|
||||||
|
'wagtail.contrib.styleguide',
|
||||||
'wagtail.embeds',
|
'wagtail.embeds',
|
||||||
'wagtail.sites',
|
'wagtail.sites',
|
||||||
'wagtail.users',
|
'wagtail.users',
|
||||||
|
|
@ -90,7 +90,7 @@ THIRD_PARTY_APPS = [
|
||||||
'wagtail.images',
|
'wagtail.images',
|
||||||
'wagtail.search',
|
'wagtail.search',
|
||||||
'wagtail.admin',
|
'wagtail.admin',
|
||||||
'wagtail.core',
|
'wagtail',
|
||||||
'wagtail.locales',
|
'wagtail.locales',
|
||||||
'wagtail.api.v2',
|
'wagtail.api.v2',
|
||||||
|
|
||||||
|
|
@ -222,15 +222,6 @@ WAGTAILSEARCH_BACKENDS = {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Wagtails Grapple Config:
|
|
||||||
GRAPHENE = {"SCHEMA": "grapple.schema.schema"}
|
|
||||||
GRAPPLE = {
|
|
||||||
"APPS": ["learnpath"],
|
|
||||||
"EXPOSE_GRAPHIQL" : True
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
# TEMPLATES
|
# TEMPLATES
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
# https://docs.djangoproject.com/en/dev/ref/settings/#templates
|
# https://docs.djangoproject.com/en/dev/ref/settings/#templates
|
||||||
|
|
|
||||||
|
|
@ -7,11 +7,10 @@ from django.contrib.staticfiles.urls import staticfiles_urlpatterns
|
||||||
from django.urls import include, path, re_path
|
from django.urls import include, path, re_path
|
||||||
from django.views import defaults as default_views
|
from django.views import defaults as default_views
|
||||||
from drf_spectacular.views import SpectacularAPIView, SpectacularSwaggerView
|
from drf_spectacular.views import SpectacularAPIView, SpectacularSwaggerView
|
||||||
from grapple import urls as grapple_urls
|
|
||||||
from ratelimit.exceptions import Ratelimited
|
from ratelimit.exceptions import Ratelimited
|
||||||
from rest_framework.authtoken.views import obtain_auth_token
|
from rest_framework.authtoken.views import obtain_auth_token
|
||||||
|
from wagtail import urls as wagtail_urls
|
||||||
from wagtail.admin import urls as wagtailadmin_urls
|
from wagtail.admin import urls as wagtailadmin_urls
|
||||||
from wagtail.core import urls as wagtail_urls
|
|
||||||
from wagtail.documents import urls as wagtaildocs_urls
|
from wagtail.documents import urls as wagtaildocs_urls
|
||||||
|
|
||||||
from vbv_lernwelt.core.middleware.auth import django_view_authentication_exempt
|
from vbv_lernwelt.core.middleware.auth import django_view_authentication_exempt
|
||||||
|
|
@ -63,7 +62,6 @@ urlpatterns += [
|
||||||
path("auth-token/", obtain_auth_token),
|
path("auth-token/", obtain_auth_token),
|
||||||
path("api/schema/", SpectacularAPIView.as_view(), name="api-schema"),
|
path("api/schema/", SpectacularAPIView.as_view(), name="api-schema"),
|
||||||
path("api/docs/", SpectacularSwaggerView.as_view(url_name="api-schema"), name="api-docs",),
|
path("api/docs/", SpectacularSwaggerView.as_view(url_name="api-schema"), name="api-docs",),
|
||||||
path("", include(grapple_urls)),
|
|
||||||
]
|
]
|
||||||
|
|
||||||
if settings.APP_ENVIRONMENT != 'production':
|
if settings.APP_ENVIRONMENT != 'production':
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,6 @@ Werkzeug[watchdog] # https://github.com/pallets/werkzeug
|
||||||
ipdb # https://github.com/gotcha/ipdb
|
ipdb # https://github.com/gotcha/ipdb
|
||||||
watchgod # https://github.com/samuelcolvin/watchgod
|
watchgod # https://github.com/samuelcolvin/watchgod
|
||||||
pip-tools
|
pip-tools
|
||||||
pip<22
|
|
||||||
|
|
||||||
# Testing
|
# Testing
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,6 @@
|
||||||
#
|
#
|
||||||
# pip-compile --output-file=requirements-dev.txt requirements-dev.in
|
# pip-compile --output-file=requirements-dev.txt requirements-dev.in
|
||||||
#
|
#
|
||||||
aniso8601==7.0.0
|
|
||||||
# via graphene
|
|
||||||
anyascii==0.3.1
|
anyascii==0.3.1
|
||||||
# via wagtail
|
# via wagtail
|
||||||
anyio==3.5.0
|
anyio==3.5.0
|
||||||
|
|
@ -80,7 +78,7 @@ distlib==0.3.4
|
||||||
# via virtualenv
|
# via virtualenv
|
||||||
dj-database-url==0.5.0
|
dj-database-url==0.5.0
|
||||||
# via -r requirements.in
|
# via -r requirements.in
|
||||||
django==3.2.12
|
django==3.2.13
|
||||||
# via
|
# via
|
||||||
# -r requirements.in
|
# -r requirements.in
|
||||||
# django-cors-headers
|
# django-cors-headers
|
||||||
|
|
@ -89,6 +87,8 @@ django==3.2.12
|
||||||
# django-filter
|
# django-filter
|
||||||
# django-htmx
|
# django-htmx
|
||||||
# django-model-utils
|
# django-model-utils
|
||||||
|
# django-modelcluster
|
||||||
|
# django-permissionedforms
|
||||||
# django-redis
|
# django-redis
|
||||||
# django-stubs
|
# django-stubs
|
||||||
# django-stubs-ext
|
# django-stubs-ext
|
||||||
|
|
@ -96,9 +96,7 @@ django==3.2.12
|
||||||
# django-treebeard
|
# django-treebeard
|
||||||
# djangorestframework
|
# djangorestframework
|
||||||
# drf-spectacular
|
# drf-spectacular
|
||||||
# graphene-django
|
|
||||||
# wagtail
|
# wagtail
|
||||||
# wagtail-grapple
|
|
||||||
django-click==2.3.0
|
django-click==2.3.0
|
||||||
# via -r requirements.in
|
# via -r requirements.in
|
||||||
django-cors-headers==3.11.0
|
django-cors-headers==3.11.0
|
||||||
|
|
@ -117,7 +115,9 @@ django-ipware==4.0.2
|
||||||
# via -r requirements.in
|
# via -r requirements.in
|
||||||
django-model-utils==4.2.0
|
django-model-utils==4.2.0
|
||||||
# via -r requirements.in
|
# via -r requirements.in
|
||||||
django-modelcluster==5.3
|
django-modelcluster==6.0
|
||||||
|
# via wagtail
|
||||||
|
django-permissionedforms==0.1
|
||||||
# via wagtail
|
# via wagtail
|
||||||
django-ratelimit==3.0.1
|
django-ratelimit==3.0.1
|
||||||
# via -r requirements.in
|
# via -r requirements.in
|
||||||
|
|
@ -170,18 +170,6 @@ gitdb2==4.0.2
|
||||||
# via gitpython
|
# via gitpython
|
||||||
gitpython==3.0.6
|
gitpython==3.0.6
|
||||||
# via trufflehog
|
# via trufflehog
|
||||||
graphene==2.1.9
|
|
||||||
# via graphene-django
|
|
||||||
graphene-django==2.13.0
|
|
||||||
# via wagtail-grapple
|
|
||||||
graphql-core==2.3.2
|
|
||||||
# via
|
|
||||||
# graphene
|
|
||||||
# graphene-django
|
|
||||||
# graphql-relay
|
|
||||||
# wagtail-grapple
|
|
||||||
graphql-relay==2.0.1
|
|
||||||
# via graphene
|
|
||||||
gunicorn==20.1.0
|
gunicorn==20.1.0
|
||||||
# via -r requirements.in
|
# via -r requirements.in
|
||||||
h11==0.13.0
|
h11==0.13.0
|
||||||
|
|
@ -265,7 +253,7 @@ pillow==9.0.1
|
||||||
# via
|
# via
|
||||||
# -r requirements.in
|
# -r requirements.in
|
||||||
# wagtail
|
# wagtail
|
||||||
pip-tools==6.5.1
|
pip-tools==6.6.2
|
||||||
# via -r requirements-dev.in
|
# via -r requirements-dev.in
|
||||||
platformdirs==2.5.1
|
platformdirs==2.5.1
|
||||||
# via
|
# via
|
||||||
|
|
@ -278,11 +266,6 @@ portalocker==2.4.0
|
||||||
# via concurrent-log-handler
|
# via concurrent-log-handler
|
||||||
pre-commit==2.17.0
|
pre-commit==2.17.0
|
||||||
# via -r requirements-dev.in
|
# via -r requirements-dev.in
|
||||||
promise==2.3
|
|
||||||
# via
|
|
||||||
# graphene-django
|
|
||||||
# graphql-core
|
|
||||||
# graphql-relay
|
|
||||||
prompt-toolkit==3.0.28
|
prompt-toolkit==3.0.28
|
||||||
# via ipython
|
# via ipython
|
||||||
psycopg2-binary==2.9.3
|
psycopg2-binary==2.9.3
|
||||||
|
|
@ -353,25 +336,15 @@ requests==2.27.1
|
||||||
# coreapi
|
# coreapi
|
||||||
# djangorestframework-stubs
|
# djangorestframework-stubs
|
||||||
# wagtail
|
# wagtail
|
||||||
rx==1.6.1
|
|
||||||
# via graphql-core
|
|
||||||
sentry-sdk==1.5.8
|
sentry-sdk==1.5.8
|
||||||
# via -r requirements.in
|
# via -r requirements.in
|
||||||
singledispatch==3.7.0
|
|
||||||
# via graphene-django
|
|
||||||
six==1.16.0
|
six==1.16.0
|
||||||
# via
|
# via
|
||||||
# asttokens
|
# asttokens
|
||||||
# django-coverage-plugin
|
# django-coverage-plugin
|
||||||
# graphene
|
|
||||||
# graphene-django
|
|
||||||
# graphql-core
|
|
||||||
# graphql-relay
|
|
||||||
# html5lib
|
# html5lib
|
||||||
# l18n
|
# l18n
|
||||||
# promise
|
|
||||||
# python-dateutil
|
# python-dateutil
|
||||||
# singledispatch
|
|
||||||
# virtualenv
|
# virtualenv
|
||||||
smmap==5.0.0
|
smmap==5.0.0
|
||||||
# via gitdb
|
# via gitdb
|
||||||
|
|
@ -427,8 +400,6 @@ typing-extensions==4.1.1
|
||||||
# django-stubs-ext
|
# django-stubs-ext
|
||||||
# djangorestframework-stubs
|
# djangorestframework-stubs
|
||||||
# mypy
|
# mypy
|
||||||
unidecode==1.3.4
|
|
||||||
# via graphene-django
|
|
||||||
uritemplate==4.1.1
|
uritemplate==4.1.1
|
||||||
# via
|
# via
|
||||||
# coreapi
|
# coreapi
|
||||||
|
|
@ -443,18 +414,12 @@ uvloop==0.16.0
|
||||||
# via uvicorn
|
# via uvicorn
|
||||||
virtualenv==20.14.0
|
virtualenv==20.14.0
|
||||||
# via pre-commit
|
# via pre-commit
|
||||||
wagtail==2.16.2
|
wagtail==3.0.0
|
||||||
# via
|
# via
|
||||||
# -r requirements.in
|
# -r requirements.in
|
||||||
# wagtail-factories
|
# wagtail-factories
|
||||||
# wagtail-grapple
|
|
||||||
# wagtail-headless-preview
|
|
||||||
wagtail-factories==2.0.1
|
wagtail-factories==2.0.1
|
||||||
# via -r requirements.in
|
# via -r requirements.in
|
||||||
wagtail-grapple==0.14.1
|
|
||||||
# via -r requirements.in
|
|
||||||
wagtail-headless-preview==0.2.1
|
|
||||||
# via wagtail-grapple
|
|
||||||
watchdog==2.1.7
|
watchdog==2.1.7
|
||||||
# via werkzeug
|
# via werkzeug
|
||||||
watchgod==0.8.1
|
watchgod==0.8.1
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,5 @@ structlog
|
||||||
python-json-logger
|
python-json-logger
|
||||||
concurrent-log-handler
|
concurrent-log-handler
|
||||||
|
|
||||||
wagtail<3
|
wagtail>=3,<4
|
||||||
wagtail-factories
|
wagtail-factories
|
||||||
wagtail-grapple==0.14.1
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,6 @@
|
||||||
#
|
#
|
||||||
# pip-compile --output-file=requirements.txt requirements.in
|
# pip-compile --output-file=requirements.txt requirements.in
|
||||||
#
|
#
|
||||||
aniso8601==7.0.0
|
|
||||||
# via graphene
|
|
||||||
anyascii==0.3.1
|
anyascii==0.3.1
|
||||||
# via wagtail
|
# via wagtail
|
||||||
anyio==3.5.0
|
anyio==3.5.0
|
||||||
|
|
@ -48,21 +46,21 @@ deprecated==1.2.13
|
||||||
# via redis
|
# via redis
|
||||||
dj-database-url==0.5.0
|
dj-database-url==0.5.0
|
||||||
# via -r requirements.in
|
# via -r requirements.in
|
||||||
django==3.2.12
|
django==3.2.13
|
||||||
# via
|
# via
|
||||||
# -r requirements.in
|
# -r requirements.in
|
||||||
# django-cors-headers
|
# django-cors-headers
|
||||||
# django-filter
|
# django-filter
|
||||||
# django-htmx
|
# django-htmx
|
||||||
# django-model-utils
|
# django-model-utils
|
||||||
|
# django-modelcluster
|
||||||
|
# django-permissionedforms
|
||||||
# django-redis
|
# django-redis
|
||||||
# django-taggit
|
# django-taggit
|
||||||
# django-treebeard
|
# django-treebeard
|
||||||
# djangorestframework
|
# djangorestframework
|
||||||
# drf-spectacular
|
# drf-spectacular
|
||||||
# graphene-django
|
|
||||||
# wagtail
|
# wagtail
|
||||||
# wagtail-grapple
|
|
||||||
django-click==2.3.0
|
django-click==2.3.0
|
||||||
# via -r requirements.in
|
# via -r requirements.in
|
||||||
django-cors-headers==3.11.0
|
django-cors-headers==3.11.0
|
||||||
|
|
@ -75,7 +73,9 @@ django-ipware==4.0.2
|
||||||
# via -r requirements.in
|
# via -r requirements.in
|
||||||
django-model-utils==4.2.0
|
django-model-utils==4.2.0
|
||||||
# via -r requirements.in
|
# via -r requirements.in
|
||||||
django-modelcluster==5.3
|
django-modelcluster==6.0
|
||||||
|
# via wagtail
|
||||||
|
django-permissionedforms==0.1
|
||||||
# via wagtail
|
# via wagtail
|
||||||
django-ratelimit==3.0.1
|
django-ratelimit==3.0.1
|
||||||
# via -r requirements.in
|
# via -r requirements.in
|
||||||
|
|
@ -102,18 +102,6 @@ factory-boy==3.2.1
|
||||||
# via wagtail-factories
|
# via wagtail-factories
|
||||||
faker==13.11.1
|
faker==13.11.1
|
||||||
# via factory-boy
|
# via factory-boy
|
||||||
graphene==2.1.9
|
|
||||||
# via graphene-django
|
|
||||||
graphene-django==2.13.0
|
|
||||||
# via wagtail-grapple
|
|
||||||
graphql-core==2.3.2
|
|
||||||
# via
|
|
||||||
# graphene
|
|
||||||
# graphene-django
|
|
||||||
# graphql-relay
|
|
||||||
# wagtail-grapple
|
|
||||||
graphql-relay==2.0.1
|
|
||||||
# via graphene
|
|
||||||
gunicorn==20.1.0
|
gunicorn==20.1.0
|
||||||
# via -r requirements.in
|
# via -r requirements.in
|
||||||
h11==0.13.0
|
h11==0.13.0
|
||||||
|
|
@ -148,11 +136,6 @@ pillow==9.0.1
|
||||||
# wagtail
|
# wagtail
|
||||||
portalocker==2.4.0
|
portalocker==2.4.0
|
||||||
# via concurrent-log-handler
|
# via concurrent-log-handler
|
||||||
promise==2.3
|
|
||||||
# via
|
|
||||||
# graphene-django
|
|
||||||
# graphql-core
|
|
||||||
# graphql-relay
|
|
||||||
psycopg2-binary==2.9.3
|
psycopg2-binary==2.9.3
|
||||||
# via -r requirements.in
|
# via -r requirements.in
|
||||||
pycparser==2.21
|
pycparser==2.21
|
||||||
|
|
@ -188,23 +171,13 @@ redis==4.2.1
|
||||||
# django-redis
|
# django-redis
|
||||||
requests==2.27.1
|
requests==2.27.1
|
||||||
# via wagtail
|
# via wagtail
|
||||||
rx==1.6.1
|
|
||||||
# via graphql-core
|
|
||||||
sentry-sdk==1.5.8
|
sentry-sdk==1.5.8
|
||||||
# via -r requirements.in
|
# via -r requirements.in
|
||||||
singledispatch==3.7.0
|
|
||||||
# via graphene-django
|
|
||||||
six==1.16.0
|
six==1.16.0
|
||||||
# via
|
# via
|
||||||
# graphene
|
|
||||||
# graphene-django
|
|
||||||
# graphql-core
|
|
||||||
# graphql-relay
|
|
||||||
# html5lib
|
# html5lib
|
||||||
# l18n
|
# l18n
|
||||||
# promise
|
|
||||||
# python-dateutil
|
# python-dateutil
|
||||||
# singledispatch
|
|
||||||
sniffio==1.2.0
|
sniffio==1.2.0
|
||||||
# via anyio
|
# via anyio
|
||||||
soupsieve==2.3.2.post1
|
soupsieve==2.3.2.post1
|
||||||
|
|
@ -219,8 +192,6 @@ telepath==0.2
|
||||||
# via wagtail
|
# via wagtail
|
||||||
text-unidecode==1.3
|
text-unidecode==1.3
|
||||||
# via python-slugify
|
# via python-slugify
|
||||||
unidecode==1.3.4
|
|
||||||
# via graphene-django
|
|
||||||
uritemplate==4.1.1
|
uritemplate==4.1.1
|
||||||
# via drf-spectacular
|
# via drf-spectacular
|
||||||
urllib3==1.26.9
|
urllib3==1.26.9
|
||||||
|
|
@ -231,18 +202,12 @@ uvicorn[standard]==0.17.6
|
||||||
# via -r requirements.in
|
# via -r requirements.in
|
||||||
uvloop==0.16.0
|
uvloop==0.16.0
|
||||||
# via uvicorn
|
# via uvicorn
|
||||||
wagtail==2.16.2
|
wagtail==3.0.0
|
||||||
# via
|
# via
|
||||||
# -r requirements.in
|
# -r requirements.in
|
||||||
# wagtail-factories
|
# wagtail-factories
|
||||||
# wagtail-grapple
|
|
||||||
# wagtail-headless-preview
|
|
||||||
wagtail-factories==2.0.1
|
wagtail-factories==2.0.1
|
||||||
# via -r requirements.in
|
# via -r requirements.in
|
||||||
wagtail-grapple==0.14.1
|
|
||||||
# via -r requirements.in
|
|
||||||
wagtail-headless-preview==0.2.1
|
|
||||||
# via wagtail-grapple
|
|
||||||
watchgod==0.8.1
|
watchgod==0.8.1
|
||||||
# via uvicorn
|
# via uvicorn
|
||||||
webencodings==0.5.1
|
webencodings==0.5.1
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import djclick as click
|
import djclick as click
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
from wagtail.core.models import Locale
|
from wagtail.models import Locale
|
||||||
|
|
||||||
|
|
||||||
@click.command()
|
@click.command()
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,8 @@
|
||||||
from django.db import migrations, models
|
from django.db import migrations, models
|
||||||
import django.db.models.deletion
|
import django.db.models.deletion
|
||||||
import modelcluster.fields
|
import modelcluster.fields
|
||||||
import wagtail.core.blocks
|
import wagtail.blocks
|
||||||
import wagtail.core.fields
|
import wagtail.fields
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
@ -65,7 +65,7 @@ class Migration(migrations.Migration):
|
||||||
('page_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='wagtailcore.page')),
|
('page_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='wagtailcore.page')),
|
||||||
('minutes', models.PositiveIntegerField(default=15)),
|
('minutes', models.PositiveIntegerField(default=15)),
|
||||||
('package', models.CharField(blank=True, default='', max_length=255)),
|
('package', models.CharField(blank=True, default='', max_length=255)),
|
||||||
('contents', wagtail.core.fields.StreamField([('video', wagtail.core.blocks.StructBlock([('description', wagtail.core.blocks.TextBlock()), ('url', wagtail.core.blocks.URLBlock())])), ('rise_training', wagtail.core.blocks.StructBlock([('description', wagtail.core.blocks.TextBlock()), ('url', wagtail.core.blocks.URLBlock())])), ('podcast', wagtail.core.blocks.StructBlock([('description', wagtail.core.blocks.TextBlock()), ('url', wagtail.core.blocks.URLBlock())])), ('competence', wagtail.core.blocks.StructBlock([('description', wagtail.core.blocks.TextBlock())])), ('exercise', wagtail.core.blocks.StructBlock([('description', wagtail.core.blocks.TextBlock())])), ('self_evaluation', wagtail.core.blocks.StructBlock([('description', wagtail.core.blocks.TextBlock())])), ('document', wagtail.core.blocks.StructBlock([('description', wagtail.core.blocks.TextBlock())])), ('knowledge', wagtail.core.blocks.StructBlock([('description', wagtail.core.blocks.TextBlock())]))])),
|
('contents', wagtail.fields.StreamField([('video', wagtail.blocks.StructBlock([('description', wagtail.blocks.TextBlock()), ('url', wagtail.blocks.URLBlock())])), ('rise_training', wagtail.blocks.StructBlock([('description', wagtail.blocks.TextBlock()), ('url', wagtail.blocks.URLBlock())])), ('podcast', wagtail.blocks.StructBlock([('description', wagtail.blocks.TextBlock()), ('url', wagtail.blocks.URLBlock())])), ('competence', wagtail.blocks.StructBlock([('description', wagtail.blocks.TextBlock())])), ('exercise', wagtail.blocks.StructBlock([('description', wagtail.blocks.TextBlock())])), ('self_evaluation', wagtail.blocks.StructBlock([('description', wagtail.blocks.TextBlock())])), ('document', wagtail.blocks.StructBlock([('description', wagtail.blocks.TextBlock())])), ('knowledge', wagtail.blocks.StructBlock([('description', wagtail.blocks.TextBlock())]))])),
|
||||||
],
|
],
|
||||||
options={
|
options={
|
||||||
'verbose_name': 'Learning Unit',
|
'verbose_name': 'Learning Unit',
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,10 @@
|
||||||
# Create your models here.
|
# Create your models here.
|
||||||
|
|
||||||
from django.utils.text import slugify
|
from django.utils.text import slugify
|
||||||
from grapple.helpers import register_query_field
|
|
||||||
from wagtail.api import APIField
|
from wagtail.api import APIField
|
||||||
from wagtail.core.blocks import StreamBlock
|
from wagtail.blocks import StreamBlock
|
||||||
from wagtail.core.fields import StreamField
|
from wagtail.fields import StreamField
|
||||||
from wagtail.core.models import Page, Orderable
|
from wagtail.models import Page, Orderable
|
||||||
|
|
||||||
from vbv_lernwelt.learnpath.models_competences import *
|
from vbv_lernwelt.learnpath.models_competences import *
|
||||||
from vbv_lernwelt.learnpath.models_learning_unit_content import RiseTrainingBlock, VideoBlock, PodcastBlock, \
|
from vbv_lernwelt.learnpath.models_learning_unit_content import RiseTrainingBlock, VideoBlock, PodcastBlock, \
|
||||||
|
|
@ -13,7 +12,6 @@ from vbv_lernwelt.learnpath.models_learning_unit_content import RiseTrainingBloc
|
||||||
from vbv_lernwelt.learnpath.serializer_helpers import get_it_serializer_class
|
from vbv_lernwelt.learnpath.serializer_helpers import get_it_serializer_class
|
||||||
|
|
||||||
|
|
||||||
@register_query_field("learning_path")
|
|
||||||
class LearningPath(Page):
|
class LearningPath(Page):
|
||||||
# PageChooserPanel('related_page', 'demo.PublisherPage'),
|
# PageChooserPanel('related_page', 'demo.PublisherPage'),
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
from django.db import models
|
from django.db import models
|
||||||
from wagtail.core.models import Page, Orderable
|
from wagtail.models import Page, Orderable
|
||||||
from modelcluster.fields import ParentalKey
|
from modelcluster.fields import ParentalKey
|
||||||
from wagtail.admin.edit_handlers import FieldPanel, StreamFieldPanel, InlinePanel
|
from wagtail.admin.panels import FieldPanel, StreamFieldPanel, InlinePanel
|
||||||
|
|
||||||
|
|
||||||
class CompetencePage(Page):
|
class CompetencePage(Page):
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
from wagtail.core import blocks
|
from wagtail import blocks
|
||||||
|
|
||||||
|
|
||||||
class VideoBlock(blocks.StructBlock):
|
class VideoBlock(blocks.StructBlock):
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import wagtail_factories
|
import wagtail_factories
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
from wagtail.core.models import Site, Page
|
from wagtail.models import Site, Page
|
||||||
|
|
||||||
from vbv_lernwelt.core.admin import User
|
from vbv_lernwelt.core.admin import User
|
||||||
from vbv_lernwelt.learnpath.models import LearningPath, Topic, Circle, LearningSequence, LearningUnit
|
from vbv_lernwelt.learnpath.models import LearningPath, Topic, Circle, LearningSequence, LearningUnit
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
from django.test import TestCase
|
from django.test import TestCase
|
||||||
from wagtail.core.models import Locale
|
from wagtail.models import Locale
|
||||||
|
|
||||||
from vbv_lernwelt.learnpath.models import LearningPath
|
from vbv_lernwelt.learnpath.models import LearningPath
|
||||||
from vbv_lernwelt.learnpath.tests.create_default_learning_path import create_default_learning_path
|
from vbv_lernwelt.learnpath.tests.create_default_learning_path import create_default_learning_path
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue