Rename book to books and reset migrations
This commit is contained in:
parent
5956bab1df
commit
7a91d9ce77
|
|
@ -8,7 +8,7 @@ from api import graphene_wagtail # Keep this import exactly here, it's necessar
|
|||
from assignments.schema.mutations import AssignmentMutations
|
||||
from assignments.schema.queries import AssignmentsQuery
|
||||
|
||||
from book.schema.mutations import BookMutations
|
||||
from books.schema.mutations import BookMutations
|
||||
from filteredbook.schema import BookQuery
|
||||
from objectives.schema import ObjectivesQuery
|
||||
from rooms.mutations import RoomMutations
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
# Generated by Django 2.0.6 on 2018-09-27 09:45
|
||||
# Generated by Django 2.0.6 on 2018-10-04 07:39
|
||||
|
||||
from django.conf import settings
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
import django_extensions.db.fields
|
||||
|
|
@ -11,7 +10,6 @@ class Migration(migrations.Migration):
|
|||
initial = True
|
||||
|
||||
dependencies = [
|
||||
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||||
]
|
||||
|
||||
operations = [
|
||||
|
|
@ -38,7 +36,8 @@ class Migration(migrations.Migration):
|
|||
('created', django_extensions.db.fields.CreationDateTimeField(auto_now_add=True, verbose_name='created')),
|
||||
('modified', django_extensions.db.fields.ModificationDateTimeField(auto_now=True, verbose_name='modified')),
|
||||
('text', models.TextField(blank=True)),
|
||||
('document', models.FilePathField(null=True)),
|
||||
('document', models.URLField(blank=True, default='', max_length=255)),
|
||||
('final', models.BooleanField(default=False)),
|
||||
],
|
||||
options={
|
||||
'ordering': ('-modified', '-created'),
|
||||
|
|
@ -61,16 +60,6 @@ class Migration(migrations.Migration):
|
|||
migrations.AddField(
|
||||
model_name='studentsubmission',
|
||||
name='assignment',
|
||||
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='assignments.Assignment'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='studentsubmission',
|
||||
name='student',
|
||||
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='assignment',
|
||||
name='owner',
|
||||
field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL),
|
||||
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='submissions', to='assignments.Assignment'),
|
||||
),
|
||||
]
|
||||
|
|
|
|||
|
|
@ -1,24 +0,0 @@
|
|||
# Generated by Django 2.0.6 on 2018-10-01 12:54
|
||||
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('assignments', '0001_initial'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='studentsubmission',
|
||||
name='final',
|
||||
field=models.BooleanField(default=False),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='studentsubmission',
|
||||
name='assignment',
|
||||
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='submissions', to='assignments.Assignment'),
|
||||
),
|
||||
]
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
# Generated by Django 2.0.6 on 2018-10-04 07:39
|
||||
|
||||
from django.conf import settings
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
initial = True
|
||||
|
||||
dependencies = [
|
||||
('assignments', '0001_initial'),
|
||||
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='studentsubmission',
|
||||
name='student',
|
||||
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='assignment',
|
||||
name='owner',
|
||||
field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL),
|
||||
),
|
||||
]
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
# Generated by Django 2.0.6 on 2018-10-02 14:35
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('assignments', '0002_auto_20181001_1254'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='studentsubmission',
|
||||
name='document',
|
||||
field=models.URLField(blank=True, default='', max_length=255),
|
||||
),
|
||||
]
|
||||
|
|
@ -1,27 +0,0 @@
|
|||
# Generated by Django 2.0.6 on 2018-09-13 07:38
|
||||
|
||||
from django.db import migrations, models
|
||||
import wagtail.core.blocks
|
||||
import wagtail.core.fields
|
||||
import wagtail.images.blocks
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('user', '0001_initial'),
|
||||
('book', '0001_initial'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='contentblock',
|
||||
name='hidden_for',
|
||||
field=models.ManyToManyField(to='user.UserGroup'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='contentblock',
|
||||
name='contents',
|
||||
field=wagtail.core.fields.StreamField([('text_block', wagtail.core.blocks.StructBlock([('text', wagtail.core.blocks.RichTextBlock())], icon='doc-full')), ('basic_knowledge', wagtail.core.blocks.StructBlock([('description', wagtail.core.blocks.RichTextBlock()), ('url', wagtail.core.blocks.URLBlock())], icon='placeholder')), ('student_entry', wagtail.core.blocks.StructBlock([('task_text', wagtail.core.blocks.RichTextBlock())], icon='download')), ('image_block', wagtail.images.blocks.ImageChooserBlock(icon='image')), ('link_block', wagtail.core.blocks.StructBlock([('text', wagtail.core.blocks.TextBlock()), ('url', wagtail.core.blocks.URLBlock())], icon='link')), ('task', wagtail.core.blocks.StructBlock([('text', wagtail.core.blocks.RichTextBlock())], icon='tick')), ('video_block', wagtail.core.blocks.StructBlock([('url', wagtail.core.blocks.URLBlock())], icon='media')), ('document_block', wagtail.core.blocks.StructBlock([('url', wagtail.core.blocks.URLBlock())], icon='doc-full'))], blank=True, null=True),
|
||||
),
|
||||
]
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
# Generated by Django 2.0.6 on 2018-09-18 16:05
|
||||
|
||||
from django.db import migrations
|
||||
import wagtail.core.blocks
|
||||
import wagtail.core.fields
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('book', '0002_auto_20180913_0738'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='contentblock',
|
||||
name='contents',
|
||||
field=wagtail.core.fields.StreamField([('text_block', wagtail.core.blocks.StructBlock([('text', wagtail.core.blocks.RichTextBlock())], icon='doc-full')), ('basic_knowledge', wagtail.core.blocks.StructBlock([('description', wagtail.core.blocks.RichTextBlock()), ('url', wagtail.core.blocks.URLBlock())], icon='placeholder')), ('student_entry', wagtail.core.blocks.StructBlock([('task_text', wagtail.core.blocks.RichTextBlock())], icon='download')), ('image_block', wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.RichTextBlock()), ('url', wagtail.core.blocks.URLBlock())], icon='image')), ('link_block', wagtail.core.blocks.StructBlock([('text', wagtail.core.blocks.TextBlock()), ('url', wagtail.core.blocks.URLBlock())], icon='link')), ('task', wagtail.core.blocks.StructBlock([('text', wagtail.core.blocks.RichTextBlock())], icon='tick')), ('video_block', wagtail.core.blocks.StructBlock([('url', wagtail.core.blocks.URLBlock())], icon='media')), ('document_block', wagtail.core.blocks.StructBlock([('url', wagtail.core.blocks.URLBlock())], icon='doc-full'))], blank=True, null=True),
|
||||
),
|
||||
]
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
# Generated by Django 2.0.6 on 2018-09-27 09:45
|
||||
|
||||
from django.db import migrations
|
||||
import wagtail.core.blocks
|
||||
import wagtail.core.fields
|
||||
import wagtail.images.blocks
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('book', '0003_auto_20180918_1605'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='contentblock',
|
||||
name='contents',
|
||||
field=wagtail.core.fields.StreamField([('text_block', wagtail.core.blocks.StructBlock([('text', wagtail.core.blocks.RichTextBlock())])), ('basic_knowledge', wagtail.core.blocks.StructBlock([('description', wagtail.core.blocks.RichTextBlock()), ('url', wagtail.core.blocks.URLBlock())])), ('student_entry', wagtail.core.blocks.StructBlock([('task_text', wagtail.core.blocks.RichTextBlock())])), ('image_block', wagtail.images.blocks.ImageChooserBlock()), ('image_url_block', wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.RichTextBlock()), ('url', wagtail.core.blocks.URLBlock())])), ('link_block', wagtail.core.blocks.StructBlock([('text', wagtail.core.blocks.TextBlock()), ('url', wagtail.core.blocks.URLBlock())])), ('task', wagtail.core.blocks.StructBlock([('text', wagtail.core.blocks.RichTextBlock())], icon='tick')), ('video_block', wagtail.core.blocks.StructBlock([('url', wagtail.core.blocks.URLBlock())])), ('document_block', wagtail.core.blocks.StructBlock([('url', wagtail.core.blocks.URLBlock())]))], blank=True, null=True),
|
||||
),
|
||||
]
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
# Generated by Django 2.0.6 on 2018-10-01 12:54
|
||||
|
||||
from django.db import migrations
|
||||
import wagtail.core.blocks
|
||||
import wagtail.core.fields
|
||||
import wagtail.images.blocks
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('book', '0004_auto_20180927_0945'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='contentblock',
|
||||
name='contents',
|
||||
field=wagtail.core.fields.StreamField([('text_block', wagtail.core.blocks.StructBlock([('text', wagtail.core.blocks.RichTextBlock())])), ('basic_knowledge', wagtail.core.blocks.StructBlock([('description', wagtail.core.blocks.RichTextBlock()), ('url', wagtail.core.blocks.URLBlock())])), ('assignment', wagtail.core.blocks.StructBlock([('assignment_id', wagtail.core.blocks.IntegerBlock())])), ('image_block', wagtail.images.blocks.ImageChooserBlock()), ('image_url_block', wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.RichTextBlock()), ('url', wagtail.core.blocks.URLBlock())])), ('link_block', wagtail.core.blocks.StructBlock([('text', wagtail.core.blocks.TextBlock()), ('url', wagtail.core.blocks.URLBlock())])), ('task', wagtail.core.blocks.StructBlock([('text', wagtail.core.blocks.RichTextBlock())], icon='tick')), ('video_block', wagtail.core.blocks.StructBlock([('url', wagtail.core.blocks.URLBlock())])), ('document_block', wagtail.core.blocks.StructBlock([('url', wagtail.core.blocks.URLBlock())]))], blank=True, null=True),
|
||||
),
|
||||
]
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
# Generated by Django 2.0.6 on 2018-10-02 13:59
|
||||
|
||||
from django.db import migrations
|
||||
import wagtail.core.blocks
|
||||
import wagtail.core.fields
|
||||
import wagtail.images.blocks
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('book', '0005_auto_20181001_1254'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='contentblock',
|
||||
name='contents',
|
||||
field=wagtail.core.fields.StreamField([('text_block', wagtail.core.blocks.StructBlock([('text', wagtail.core.blocks.RichTextBlock())])), ('basic_knowledge', wagtail.core.blocks.StructBlock([('description', wagtail.core.blocks.RichTextBlock()), ('url', wagtail.core.blocks.URLBlock())])), ('assignment', wagtail.core.blocks.StructBlock([('assignment_id', wagtail.core.blocks.IntegerBlock())])), ('image_block', wagtail.images.blocks.ImageChooserBlock()), ('image_url_block', wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.TextBlock()), ('url', wagtail.core.blocks.URLBlock())])), ('link_block', wagtail.core.blocks.StructBlock([('text', wagtail.core.blocks.TextBlock()), ('url', wagtail.core.blocks.URLBlock())])), ('task', wagtail.core.blocks.StructBlock([('text', wagtail.core.blocks.RichTextBlock())], icon='tick')), ('video_block', wagtail.core.blocks.StructBlock([('url', wagtail.core.blocks.URLBlock())])), ('document_block', wagtail.core.blocks.StructBlock([('url', wagtail.core.blocks.URLBlock())]))], blank=True, null=True),
|
||||
),
|
||||
]
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
# Generated by Django 2.0.6 on 2018-10-03 16:44
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('book', '0006_auto_20181002_1359'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='chapter',
|
||||
name='description',
|
||||
field=models.TextField(blank=True),
|
||||
),
|
||||
]
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
from django.contrib import admin
|
||||
|
||||
from book.models import Book, Topic, Module, ContentBlock
|
||||
from book.models.chapter import Chapter
|
||||
from books.models import Book, Topic, Module, ContentBlock
|
||||
from books.models.chapter import Chapter
|
||||
from core.wagtail_utils import wagtail_parent_filter
|
||||
|
||||
|
||||
|
|
@ -2,4 +2,4 @@ from django.apps import AppConfig
|
|||
|
||||
|
||||
class BookConfig(AppConfig):
|
||||
name = 'book'
|
||||
name = 'books'
|
||||
|
|
@ -7,8 +7,8 @@ from factory import CREATE_STRATEGY
|
|||
from wagtail.core.rich_text import RichText
|
||||
|
||||
from assignments.models import Assignment
|
||||
from book.blocks import BasicKnowledgeBlock, ImageUrlBlock, LinkBlock, AssignmentBlock, VideoBlock
|
||||
from book.models import Book, Topic, Module, Chapter, ContentBlock, TextBlock
|
||||
from books.blocks import BasicKnowledgeBlock, ImageUrlBlock, LinkBlock, AssignmentBlock, VideoBlock
|
||||
from books.models import Book, Topic, Module, Chapter, ContentBlock, TextBlock
|
||||
from core.factories import BasePageFactory, fake, DummyImageFactory, fake_paragraph, fake_title
|
||||
|
||||
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
# Generated by Django 2.0.6 on 2018-09-11 14:14
|
||||
# Generated by Django 2.0.6 on 2018-10-04 07:39
|
||||
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
|
@ -32,6 +32,7 @@ class Migration(migrations.Migration):
|
|||
name='Chapter',
|
||||
fields=[
|
||||
('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')),
|
||||
('description', models.TextField(blank=True)),
|
||||
],
|
||||
options={
|
||||
'verbose_name': 'Kapitel',
|
||||
|
|
@ -43,7 +44,7 @@ class Migration(migrations.Migration):
|
|||
name='ContentBlock',
|
||||
fields=[
|
||||
('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')),
|
||||
('contents', wagtail.core.fields.StreamField([('text_block', wagtail.core.blocks.StructBlock([('text', wagtail.core.blocks.RichTextBlock())], icon='doc-full')), ('basic_knowledge', wagtail.core.blocks.StructBlock([('description', wagtail.core.blocks.RichTextBlock()), ('url', wagtail.core.blocks.URLBlock())], icon='placeholder')), ('student_entry', wagtail.core.blocks.StructBlock([('task_text', wagtail.core.blocks.RichTextBlock())], icon='download')), ('image_block', wagtail.images.blocks.ImageChooserBlock(icon='image')), ('link_block', wagtail.core.blocks.StructBlock([('text', wagtail.core.blocks.TextBlock()), ('url', wagtail.core.blocks.URLBlock())], icon='link')), ('task', wagtail.core.blocks.StructBlock([('text', wagtail.core.blocks.RichTextBlock())], icon='tick'))], blank=True, null=True)),
|
||||
('contents', wagtail.core.fields.StreamField([('text_block', wagtail.core.blocks.StructBlock([('text', wagtail.core.blocks.RichTextBlock())])), ('basic_knowledge', wagtail.core.blocks.StructBlock([('description', wagtail.core.blocks.RichTextBlock()), ('url', wagtail.core.blocks.URLBlock())])), ('assignment', wagtail.core.blocks.StructBlock([('assignment_id', wagtail.core.blocks.IntegerBlock())])), ('image_block', wagtail.images.blocks.ImageChooserBlock()), ('image_url_block', wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.TextBlock()), ('url', wagtail.core.blocks.URLBlock())])), ('link_block', wagtail.core.blocks.StructBlock([('text', wagtail.core.blocks.TextBlock()), ('url', wagtail.core.blocks.URLBlock())])), ('task', wagtail.core.blocks.StructBlock([('text', wagtail.core.blocks.RichTextBlock())], icon='tick')), ('video_block', wagtail.core.blocks.StructBlock([('url', wagtail.core.blocks.URLBlock())])), ('document_block', wagtail.core.blocks.StructBlock([('url', wagtail.core.blocks.URLBlock())]))], blank=True, null=True)),
|
||||
('type', models.CharField(choices=[('plain', 'Normal'), ('yellow', 'Gelb'), ('green', 'Grün'), ('blue', 'Blau')], default='plain', max_length=100)),
|
||||
],
|
||||
options={
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
# Generated by Django 2.0.6 on 2018-10-04 07:39
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
initial = True
|
||||
|
||||
dependencies = [
|
||||
('user', '0001_initial'),
|
||||
('books', '0001_initial'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='contentblock',
|
||||
name='hidden_for',
|
||||
field=models.ManyToManyField(to='user.UserGroup'),
|
||||
),
|
||||
]
|
||||
|
|
@ -27,4 +27,4 @@ class Book(StrictHierarchyPage):
|
|||
|
||||
template = 'generic_page.html'
|
||||
|
||||
subpage_types = ['book.Topic']
|
||||
subpage_types = ['books.Topic']
|
||||
|
|
@ -31,6 +31,6 @@ class Chapter(StrictHierarchyPage):
|
|||
|
||||
template = 'generic_page.html'
|
||||
|
||||
parent_page_types = ['book.Module']
|
||||
subpage_types = ['book.ContentBlock']
|
||||
parent_page_types = ['books.Module']
|
||||
subpage_types = ['books.ContentBlock']
|
||||
|
||||
|
|
@ -5,7 +5,7 @@ from wagtail.admin.edit_handlers import FieldPanel, TabbedInterface, ObjectList,
|
|||
from wagtail.core.fields import StreamField
|
||||
from wagtail.images.blocks import ImageChooserBlock
|
||||
|
||||
from book.blocks import TextBlock, BasicKnowledgeBlock, LinkBlock, VideoBlock, DocumentBlock, \
|
||||
from books.blocks import TextBlock, BasicKnowledgeBlock, LinkBlock, VideoBlock, DocumentBlock, \
|
||||
ImageUrlBlock, AssignmentBlock
|
||||
from core.wagtail_utils import StrictHierarchyPage
|
||||
from user.models import UserGroup
|
||||
|
|
@ -67,5 +67,5 @@ class ContentBlock(StrictHierarchyPage):
|
|||
|
||||
template = 'generic_page.html'
|
||||
|
||||
parent_page_types = ['book.Chapter']
|
||||
parent_page_types = ['books.Chapter']
|
||||
subpage_types = []
|
||||
|
|
@ -5,7 +5,7 @@ from wagtail.admin.edit_handlers import FieldPanel, TabbedInterface, ObjectList
|
|||
from wagtail.core.fields import RichTextField
|
||||
from wagtail.images.edit_handlers import ImageChooserPanel
|
||||
|
||||
from book.blocks import DEFAULT_RICH_TEXT_FEATURES
|
||||
from books.blocks import DEFAULT_RICH_TEXT_FEATURES
|
||||
from core.wagtail_utils import StrictHierarchyPage
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
|
@ -51,8 +51,8 @@ class Module(StrictHierarchyPage):
|
|||
|
||||
template = 'generic_page.html'
|
||||
|
||||
parent_page_types = ['book.Topic']
|
||||
subpage_types = ['book.Chapter']
|
||||
parent_page_types = ['books.Topic']
|
||||
subpage_types = ['books.Chapter']
|
||||
|
||||
def get_child_ids(self):
|
||||
return self.get_children().values_list('id', flat=True)
|
||||
|
|
@ -4,7 +4,7 @@ from django.db import models
|
|||
from wagtail.admin.edit_handlers import FieldPanel, TabbedInterface, ObjectList
|
||||
from wagtail.core.fields import RichTextField
|
||||
|
||||
from book.blocks import DEFAULT_RICH_TEXT_FEATURES
|
||||
from books.blocks import DEFAULT_RICH_TEXT_FEATURES
|
||||
from core.wagtail_utils import StrictHierarchyPage
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
|
@ -37,5 +37,5 @@ class Topic(StrictHierarchyPage):
|
|||
|
||||
template = 'generic_page.html'
|
||||
|
||||
parent_page_types = ['book.Book']
|
||||
subpage_types = ['book.Module']
|
||||
parent_page_types = ['books.Book']
|
||||
subpage_types = ['books.Module']
|
||||
|
|
@ -5,9 +5,9 @@ from django.core.exceptions import ValidationError
|
|||
from graphene import relay
|
||||
|
||||
from api.utils import get_object, get_errors
|
||||
from book.models import ContentBlock, Chapter, UserGroup
|
||||
from book.schema.inputs import ContentBlockInput
|
||||
from book.schema.queries import ContentBlockNode
|
||||
from books.models import ContentBlock, Chapter, UserGroup
|
||||
from books.schema.inputs import ContentBlockInput
|
||||
from books.schema.queries import ContentBlockNode
|
||||
|
||||
from .utils import handle_content_block
|
||||
|
||||
|
|
@ -4,8 +4,8 @@ from graphql_relay import to_global_id
|
|||
|
||||
from api.schema import schema
|
||||
from api.utils import get_graphql_mutation, get_object
|
||||
from book.factories import ContentBlockFactory
|
||||
from book.models import ContentBlock
|
||||
from books.factories import ContentBlockFactory
|
||||
from books.models import ContentBlock
|
||||
|
||||
|
||||
class NewContentBlockMutationTest(TestCase):
|
||||
|
|
@ -9,7 +9,7 @@ from django.core.management import BaseCommand
|
|||
from django.db import connection
|
||||
from wagtail.core.models import Page
|
||||
|
||||
from book.factories import BookFactory, TopicFactory, ModuleFactory, ChapterFactory, ContentBlockFactory
|
||||
from books.factories import BookFactory, TopicFactory, ModuleFactory, ChapterFactory, ContentBlockFactory
|
||||
from core.factories import UserFactory
|
||||
from objectives.factories import ObjectiveGroupFactory, ObjectiveFactory
|
||||
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ INSTALLED_APPS = [
|
|||
'core',
|
||||
'api',
|
||||
'user',
|
||||
'book',
|
||||
'books',
|
||||
'objectives',
|
||||
'rooms',
|
||||
'filteredbook',
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# Generated by Django 2.0.6 on 2018-09-11 14:14
|
||||
# Generated by Django 2.0.6 on 2018-10-04 07:39
|
||||
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
|
@ -9,7 +9,7 @@ class Migration(migrations.Migration):
|
|||
initial = True
|
||||
|
||||
dependencies = [
|
||||
('book', '0001_initial'),
|
||||
('books', '0001_initial'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
|
|
@ -17,7 +17,7 @@ class Migration(migrations.Migration):
|
|||
name='Visibility',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('content_block', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='book.ContentBlock')),
|
||||
('content_block', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='visible_to', to='books.ContentBlock')),
|
||||
],
|
||||
options={
|
||||
'verbose_name': 'Visibility',
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# Generated by Django 2.0.6 on 2018-09-11 14:14
|
||||
# Generated by Django 2.0.6 on 2018-10-04 07:39
|
||||
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
|
@ -9,8 +9,8 @@ class Migration(migrations.Migration):
|
|||
initial = True
|
||||
|
||||
dependencies = [
|
||||
('filteredbook', '0001_initial'),
|
||||
('user', '0001_initial'),
|
||||
('filteredbook', '0001_initial'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
|
|
|
|||
|
|
@ -1,19 +0,0 @@
|
|||
# Generated by Django 2.0.6 on 2018-09-11 15:01
|
||||
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('filteredbook', '0002_visibility_user_group'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='visibility',
|
||||
name='content_block',
|
||||
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='visible_to', to='book.ContentBlock'),
|
||||
),
|
||||
]
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
from django.db import models
|
||||
|
||||
from book.models import ContentBlock
|
||||
from books.models import ContentBlock
|
||||
from user.models import UserGroup
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@ from graphene_django import DjangoObjectType
|
|||
from graphene_django.filter import DjangoFilterConnectionField
|
||||
|
||||
from api.utils import get_object
|
||||
from book.models import Book, Topic, Module, Chapter, ContentBlock
|
||||
from book.schema.queries import BookNode, TopicNode, ModuleNode, ContentBlockNode
|
||||
from books.models import Book, Topic, Module, Chapter, ContentBlock
|
||||
from books.schema.queries import BookNode, TopicNode, ModuleNode, ContentBlockNode
|
||||
|
||||
|
||||
class FilteredChapterNode(DjangoObjectType):
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import random
|
|||
import factory
|
||||
from django.contrib.auth import get_user_model
|
||||
|
||||
from book.factories import ModuleFactory
|
||||
from books.factories import ModuleFactory
|
||||
from core.factories import fake
|
||||
from objectives.models import ObjectiveGroup, Objective
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# Generated by Django 2.0.6 on 2018-09-11 14:14
|
||||
# Generated by Django 2.0.6 on 2018-10-04 07:39
|
||||
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# Generated by Django 2.0.6 on 2018-09-11 14:14
|
||||
# Generated by Django 2.0.6 on 2018-10-04 07:39
|
||||
|
||||
from django.conf import settings
|
||||
from django.db import migrations, models
|
||||
|
|
@ -10,9 +10,9 @@ class Migration(migrations.Migration):
|
|||
initial = True
|
||||
|
||||
dependencies = [
|
||||
('book', '0001_initial'),
|
||||
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||||
('books', '0002_contentblock_hidden_for'),
|
||||
('objectives', '0001_initial'),
|
||||
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||||
]
|
||||
|
||||
operations = [
|
||||
|
|
@ -24,7 +24,7 @@ class Migration(migrations.Migration):
|
|||
migrations.AddField(
|
||||
model_name='objectivegroup',
|
||||
name='module',
|
||||
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='objective_groups', to='book.Module'),
|
||||
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='objective_groups', to='books.Module'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='objectivegroup',
|
||||
|
|
@ -2,7 +2,7 @@ from django.contrib.auth import get_user_model
|
|||
from django.db import models
|
||||
from django_extensions.db.models import TitleDescriptionModel
|
||||
|
||||
from book.models import Module
|
||||
from books.models import Module
|
||||
|
||||
|
||||
class ObjectiveGroup(models.Model):
|
||||
|
|
|
|||
|
|
@ -6,8 +6,8 @@ from django.contrib.auth import get_user_model
|
|||
from factory import CREATE_STRATEGY
|
||||
from wagtail.core.rich_text import RichText
|
||||
|
||||
from book.blocks import ImageUrlBlock
|
||||
from book.factories import TextBlockFactory, BasicKnowledgeBlockFactory, ImageUrlBlockFactory, LinkBlockFactory
|
||||
from books.blocks import ImageUrlBlock
|
||||
from books.factories import TextBlockFactory, BasicKnowledgeBlockFactory, ImageUrlBlockFactory, LinkBlockFactory
|
||||
from core.factories import fake, fake_paragraph
|
||||
from rooms.models import Room, RoomEntry
|
||||
from user.models import UserGroup
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import graphene
|
||||
from graphene import InputObjectType
|
||||
|
||||
from book.schema.inputs import ContentElementInput
|
||||
from books.schema.inputs import ContentElementInput
|
||||
from user.inputs import UserGroupInput
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# Generated by Django 2.0.6 on 2018-09-11 14:14
|
||||
# Generated by Django 2.0.6 on 2018-10-04 07:39
|
||||
|
||||
from django.db import migrations, models
|
||||
import django_extensions.db.fields
|
||||
|
|
@ -36,7 +36,7 @@ class Migration(migrations.Migration):
|
|||
('description', models.TextField(blank=True, null=True, verbose_name='description')),
|
||||
('slug', django_extensions.db.fields.AutoSlugField(blank=True, editable=False, populate_from='title', verbose_name='slug')),
|
||||
('subtitle', models.CharField(blank=True, max_length=255)),
|
||||
('contents', wagtail.core.fields.StreamField([('text_block', wagtail.core.blocks.StructBlock([('text', wagtail.core.blocks.RichTextBlock())], icon='doc-full')), ('image_url', wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.RichTextBlock()), ('url', wagtail.core.blocks.URLBlock())], icon='image')), ('link_block', wagtail.core.blocks.StructBlock([('text', wagtail.core.blocks.TextBlock()), ('url', wagtail.core.blocks.URLBlock())], icon='link'))], blank=True, null=True)),
|
||||
('contents', wagtail.core.fields.StreamField([('text_block', wagtail.core.blocks.StructBlock([('text', wagtail.core.blocks.RichTextBlock())])), ('image_url_block', wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.TextBlock()), ('url', wagtail.core.blocks.URLBlock())])), ('link_block', wagtail.core.blocks.StructBlock([('text', wagtail.core.blocks.TextBlock()), ('url', wagtail.core.blocks.URLBlock())])), ('video_block', wagtail.core.blocks.StructBlock([('url', wagtail.core.blocks.URLBlock())]))], blank=True, null=True)),
|
||||
],
|
||||
options={
|
||||
'verbose_name': 'Raumeintrag',
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# Generated by Django 2.0.6 on 2018-09-11 14:14
|
||||
# Generated by Django 2.0.6 on 2018-10-04 07:39
|
||||
|
||||
from django.conf import settings
|
||||
from django.db import migrations, models
|
||||
|
|
@ -10,8 +10,8 @@ class Migration(migrations.Migration):
|
|||
initial = True
|
||||
|
||||
dependencies = [
|
||||
('user', '0001_initial'),
|
||||
('rooms', '0001_initial'),
|
||||
('user', '0001_initial'),
|
||||
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||||
]
|
||||
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
# Generated by Django 2.0.6 on 2018-09-27 09:45
|
||||
|
||||
from django.db import migrations
|
||||
import wagtail.core.blocks
|
||||
import wagtail.core.fields
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('rooms', '0002_auto_20180911_1414'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='roomentry',
|
||||
name='contents',
|
||||
field=wagtail.core.fields.StreamField([('text_block', wagtail.core.blocks.StructBlock([('text', wagtail.core.blocks.RichTextBlock())])), ('image_url_block', wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.RichTextBlock()), ('url', wagtail.core.blocks.URLBlock())])), ('link_block', wagtail.core.blocks.StructBlock([('text', wagtail.core.blocks.TextBlock()), ('url', wagtail.core.blocks.URLBlock())])), ('video_block', wagtail.core.blocks.StructBlock([('url', wagtail.core.blocks.URLBlock())]))], blank=True, null=True),
|
||||
),
|
||||
]
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
# Generated by Django 2.0.6 on 2018-10-02 13:59
|
||||
|
||||
from django.db import migrations
|
||||
import wagtail.core.blocks
|
||||
import wagtail.core.fields
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('rooms', '0003_auto_20180927_0945'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='roomentry',
|
||||
name='contents',
|
||||
field=wagtail.core.fields.StreamField([('text_block', wagtail.core.blocks.StructBlock([('text', wagtail.core.blocks.RichTextBlock())])), ('image_url_block', wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.TextBlock()), ('url', wagtail.core.blocks.URLBlock())])), ('link_block', wagtail.core.blocks.StructBlock([('text', wagtail.core.blocks.TextBlock()), ('url', wagtail.core.blocks.URLBlock())])), ('video_block', wagtail.core.blocks.StructBlock([('url', wagtail.core.blocks.URLBlock())]))], blank=True, null=True),
|
||||
),
|
||||
]
|
||||
|
|
@ -3,8 +3,8 @@ from django.db import models
|
|||
from django_extensions.db.models import TitleDescriptionModel, TitleSlugDescriptionModel
|
||||
from wagtail.core.fields import StreamField
|
||||
|
||||
from book.blocks import ImageUrlBlock, LinkBlock, VideoBlock
|
||||
from book.models import ContentBlock, TextBlock
|
||||
from books.blocks import ImageUrlBlock, LinkBlock, VideoBlock
|
||||
from books.models import ContentBlock, TextBlock
|
||||
from user.models import UserGroup
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import json
|
|||
|
||||
from rest_framework import serializers
|
||||
|
||||
from book.schema.mutations.utils import handle_content_block
|
||||
from books.schema.mutations.utils import handle_content_block
|
||||
from rooms.models import Room, RoomEntry
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# Generated by Django 2.0.6 on 2018-09-11 14:14
|
||||
# Generated by Django 2.0.6 on 2018-10-04 07:39
|
||||
|
||||
from django.conf import settings
|
||||
import django.contrib.auth.models
|
||||
|
|
|
|||
Loading…
Reference in New Issue