Add childpage types for module
This commit is contained in:
parent
c4ba21aedd
commit
74e67e925e
2
Pipfile
2
Pipfile
|
|
@ -21,7 +21,7 @@ django-extensions = "==1.9.8"
|
||||||
graphene-django = "==2.0.0"
|
graphene-django = "==2.0.0"
|
||||||
django-filter = "==2.0.0.dev1"
|
django-filter = "==2.0.0.dev1"
|
||||||
pillow = "==5.0.0"
|
pillow = "==5.0.0"
|
||||||
wagtail = "==2.1.2"
|
wagtail = "==2.2.1"
|
||||||
django-cors-headers = "==2.2.0"
|
django-cors-headers = "==2.2.0"
|
||||||
django-storages = "*"
|
django-storages = "*"
|
||||||
boto3 = "*"
|
boto3 = "*"
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"_meta": {
|
"_meta": {
|
||||||
"hash": {
|
"hash": {
|
||||||
"sha256": "a98be2f577f66fa2b6ecc23230bca4e6140a92bf4c15e94caf6e0d122c0feb9e"
|
"sha256": "83e632a0bffc255c06251dcfcb35eb3972b2758050aaa451e6b96aca729ae5d4"
|
||||||
},
|
},
|
||||||
"pipfile-spec": 6,
|
"pipfile-spec": 6,
|
||||||
"requires": {},
|
"requires": {},
|
||||||
|
|
@ -31,25 +31,25 @@
|
||||||
},
|
},
|
||||||
"boto3": {
|
"boto3": {
|
||||||
"hashes": [
|
"hashes": [
|
||||||
"sha256:440e3e3674ef9b2e4e7755344fdbf25424edbbdc2c6d4d0d3260f099a810a4f5",
|
"sha256:7fdc2f6f21372572fec9df52e70b5ae11c263fe5905fc61dbd7ac3b01350cb4a",
|
||||||
"sha256:8cd59afafe0b314161ddab1335d877d5d70cb5b70f265db269baca7ab22e4a0f"
|
"sha256:e3ac48844b5ee6adafd27f6682efdd009a9c5f70abef0b72092d039ae3050279"
|
||||||
],
|
],
|
||||||
"index": "pypi",
|
"index": "pypi",
|
||||||
"version": "==1.7.73"
|
"version": "==1.7.77"
|
||||||
},
|
},
|
||||||
"botocore": {
|
"botocore": {
|
||||||
"hashes": [
|
"hashes": [
|
||||||
"sha256:293d547eb1b093e20d916d8009cd66c49ac744199096001f7248163b72edbae1",
|
"sha256:bcd30fdd029f4d402b39fd52d89e90cdc26b7fb1a56e4b5778e6eff00608fd11",
|
||||||
"sha256:9a3961a4ce49c6464d835756f9fe57550ab41a33f3b638b0e8e9d800f1e009a7"
|
"sha256:d9a0d504034f75341dde22a8917531071205dff92cc3f5f0962a3605951792b0"
|
||||||
],
|
],
|
||||||
"version": "==1.10.73"
|
"version": "==1.10.77"
|
||||||
},
|
},
|
||||||
"certifi": {
|
"certifi": {
|
||||||
"hashes": [
|
"hashes": [
|
||||||
"sha256:13e698f54293db9f89122b0581843a782ad0934a4fe0172d2a980ba77fc61bb7",
|
"sha256:4c1d68a1408dd090d2f3a869aa94c3947cc1d967821d1ed303208c9f41f0f2f4",
|
||||||
"sha256:9fa520c1bacfb634fa7af20a76bcbd3d5fb390481724c597da32c719a7dca4b0"
|
"sha256:b6e8b28b2b7e771a41ecdd12d4d43262ecab52adebbafa42c77d6b57fb6ad3a4"
|
||||||
],
|
],
|
||||||
"version": "==2018.4.16"
|
"version": "==2018.8.13"
|
||||||
},
|
},
|
||||||
"chardet": {
|
"chardet": {
|
||||||
"hashes": [
|
"hashes": [
|
||||||
|
|
@ -184,10 +184,10 @@
|
||||||
},
|
},
|
||||||
"faker": {
|
"faker": {
|
||||||
"hashes": [
|
"hashes": [
|
||||||
"sha256:0e9a1227a3a0f3297a485715e72ee6eb77081b17b629367042b586e38c03c867",
|
"sha256:ea7cfd3aeb1544732d08bd9cfba40c5b78e3a91e17b1a0698ab81bfc5554c628",
|
||||||
"sha256:b4840807a94a3bad0217d6ed3f9b65a1cc6e1db1c99e1184673056ae2c0a4c4d"
|
"sha256:f6d67f04abfb2b4bea7afc7fa6c18cf4c523a67956e455668be9ae42bccc21ad"
|
||||||
],
|
],
|
||||||
"version": "==0.8.17"
|
"version": "==0.9.0"
|
||||||
},
|
},
|
||||||
"graphene": {
|
"graphene": {
|
||||||
"hashes": [
|
"hashes": [
|
||||||
|
|
@ -461,10 +461,10 @@
|
||||||
},
|
},
|
||||||
"unidecode": {
|
"unidecode": {
|
||||||
"hashes": [
|
"hashes": [
|
||||||
"sha256:280a6ab88e1f2eb5af79edff450021a0d3f0448952847cd79677e55e58bad051",
|
"sha256:72f49d3729f3d8f5799f710b97c1451c5163102e76d64d20e170aedbbd923582",
|
||||||
"sha256:61f807220eda0203a774a09f84b4304a3f93b5944110cc132af29ddb81366883"
|
"sha256:8c33dd588e0c9bc22a76eaa0c715a5434851f726131bd44a6c26471746efabf5"
|
||||||
],
|
],
|
||||||
"version": "==0.4.21"
|
"version": "==1.0.22"
|
||||||
},
|
},
|
||||||
"urllib3": {
|
"urllib3": {
|
||||||
"hashes": [
|
"hashes": [
|
||||||
|
|
@ -475,11 +475,11 @@
|
||||||
},
|
},
|
||||||
"wagtail": {
|
"wagtail": {
|
||||||
"hashes": [
|
"hashes": [
|
||||||
"sha256:185fc87a34219ea5eed88aa424b476d4cd15ce55d2222c5d7889a0a9041bacc9",
|
"sha256:27d27242bbc88b64d433702c409569408485b4dd9a352f938f3987a857929413",
|
||||||
"sha256:280f522302cb6fdfb57a4414c5a015cbe4ebcc93d6ca27c0d41fe3c2460fb822"
|
"sha256:67b0fce3487e9dc2378e8ecdbc6ee8469d1baddcdf1061b35f41ad54ca98268d"
|
||||||
],
|
],
|
||||||
"index": "pypi",
|
"index": "pypi",
|
||||||
"version": "==2.1.2"
|
"version": "==2.2.1"
|
||||||
},
|
},
|
||||||
"wagtail-factories": {
|
"wagtail-factories": {
|
||||||
"git": "https://github.com/mvantellingen/wagtail-factories.git",
|
"git": "https://github.com/mvantellingen/wagtail-factories.git",
|
||||||
|
|
@ -519,11 +519,11 @@
|
||||||
},
|
},
|
||||||
"awscli": {
|
"awscli": {
|
||||||
"hashes": [
|
"hashes": [
|
||||||
"sha256:6e706bca2b38cfacc795ecb0f7e60ae8174d48ddae0d7f7c3878b9ad5322e609",
|
"sha256:3f41026284d42e0ad543ea115766859069e24e240164345b299b554bb4c40e99",
|
||||||
"sha256:8e149ccd7f03347aa7939327c1374c1fd7024fbaf2e4a1860659dafaf6142fa6"
|
"sha256:ba844ca7711c92893c237fde2dc9d2c007582d20a34b7a2eafd181efb265bc68"
|
||||||
],
|
],
|
||||||
"index": "pypi",
|
"index": "pypi",
|
||||||
"version": "==1.15.74"
|
"version": "==1.15.78"
|
||||||
},
|
},
|
||||||
"backcall": {
|
"backcall": {
|
||||||
"hashes": [
|
"hashes": [
|
||||||
|
|
@ -534,10 +534,10 @@
|
||||||
},
|
},
|
||||||
"botocore": {
|
"botocore": {
|
||||||
"hashes": [
|
"hashes": [
|
||||||
"sha256:293d547eb1b093e20d916d8009cd66c49ac744199096001f7248163b72edbae1",
|
"sha256:bcd30fdd029f4d402b39fd52d89e90cdc26b7fb1a56e4b5778e6eff00608fd11",
|
||||||
"sha256:9a3961a4ce49c6464d835756f9fe57550ab41a33f3b638b0e8e9d800f1e009a7"
|
"sha256:d9a0d504034f75341dde22a8917531071205dff92cc3f5f0962a3605951792b0"
|
||||||
],
|
],
|
||||||
"version": "==1.10.73"
|
"version": "==1.10.77"
|
||||||
},
|
},
|
||||||
"colorama": {
|
"colorama": {
|
||||||
"hashes": [
|
"hashes": [
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,6 @@ class Chapter(Page):
|
||||||
parent_page_types = ['book.Module']
|
parent_page_types = ['book.Module']
|
||||||
subpage_types = ['book.ContentBlock']
|
subpage_types = ['book.ContentBlock']
|
||||||
|
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def get_module_chapters(cls, module):
|
def get_module_chapters(cls, module):
|
||||||
return cls.objects.filter(id__in=module.get_child_ids()).live()
|
return cls.objects.filter(id__in=module.get_child_ids()).live()
|
||||||
|
|
|
||||||
|
|
@ -53,6 +53,7 @@ class Module(Page):
|
||||||
template = 'generic_page.html'
|
template = 'generic_page.html'
|
||||||
|
|
||||||
parent_page_types = ['book.Topic']
|
parent_page_types = ['book.Topic']
|
||||||
|
subpage_types = ['book.Chapter']
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def get_topic_modules(cls, topic):
|
def get_topic_modules(cls, topic):
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue