removed graphql fields
This commit is contained in:
parent
23c1ccfe7a
commit
56a14d2942
|
|
@ -27,9 +27,6 @@ class LearningPath(Page):
|
||||||
|
|
||||||
subpage_types = ['learnpath.Circle']
|
subpage_types = ['learnpath.Circle']
|
||||||
|
|
||||||
graphql_fields = [
|
|
||||||
GraphQLString("title", required=True),
|
|
||||||
]
|
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
verbose_name = "Learning Path"
|
verbose_name = "Learning Path"
|
||||||
|
|
@ -53,11 +50,6 @@ class Topic(Orderable):
|
||||||
FieldPanel('is_visible'),
|
FieldPanel('is_visible'),
|
||||||
]
|
]
|
||||||
|
|
||||||
graphql_fields = [
|
|
||||||
GraphQLString("title"),
|
|
||||||
GraphQLBoolean("is_visible"),
|
|
||||||
]
|
|
||||||
|
|
||||||
api_fields = [
|
api_fields = [
|
||||||
APIField('title'),
|
APIField('title'),
|
||||||
APIField('is_visible'),
|
APIField('is_visible'),
|
||||||
|
|
@ -71,6 +63,8 @@ class Topic(Orderable):
|
||||||
|
|
||||||
# parent_page_types = ['learnpath.LearningPath']
|
# parent_page_types = ['learnpath.LearningPath']
|
||||||
# subpage_types = ['learnpath.Circle']
|
# subpage_types = ['learnpath.Circle']
|
||||||
|
|
||||||
|
|
||||||
def full_clean(self, *args, **kwargs):
|
def full_clean(self, *args, **kwargs):
|
||||||
self.slug = find_available_slug(Topic, slugify(self.title, allow_unicode=True))
|
self.slug = find_available_slug(Topic, slugify(self.title, allow_unicode=True))
|
||||||
super(Topic, self).full_clean(*args, **kwargs)
|
super(Topic, self).full_clean(*args, **kwargs)
|
||||||
|
|
@ -98,16 +92,9 @@ class Circle(Page, Orderable):
|
||||||
|
|
||||||
content_panels = Page.content_panels + [
|
content_panels = Page.content_panels + [
|
||||||
FieldPanel('description'),
|
FieldPanel('description'),
|
||||||
FieldPanel('topic'),
|
|
||||||
FieldPanel('goals'),
|
FieldPanel('goals'),
|
||||||
InlinePanel('learning_sequences', label="Learning Sequences"),
|
InlinePanel('learning_sequences', label="Learning Sequences"),
|
||||||
]
|
]
|
||||||
#
|
|
||||||
graphql_fields = [
|
|
||||||
GraphQLString("title", required=True),
|
|
||||||
GraphQLString("description"),
|
|
||||||
GraphQLString("goals"),
|
|
||||||
]
|
|
||||||
|
|
||||||
# Export fields over the API
|
# Export fields over the API
|
||||||
api_fields = [
|
api_fields = [
|
||||||
|
|
@ -155,12 +142,6 @@ class LearningSequence(Orderable):
|
||||||
panels = [FieldPanel('title'), FieldPanel('category'), FieldPanel('circle')]
|
panels = [FieldPanel('title'), FieldPanel('category'), FieldPanel('circle')]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
graphql_fields = [
|
|
||||||
GraphQLString("title", required=True),
|
|
||||||
GraphQLBoolean("category"),
|
|
||||||
]
|
|
||||||
|
|
||||||
api_fields = [
|
api_fields = [
|
||||||
APIField('title'),
|
APIField('title'),
|
||||||
APIField('category'),
|
APIField('category'),
|
||||||
|
|
@ -192,15 +173,15 @@ class LearningPackage(Orderable):
|
||||||
)
|
)
|
||||||
panels = [FieldPanel('title')]
|
panels = [FieldPanel('title')]
|
||||||
|
|
||||||
graphql_fields = [
|
|
||||||
GraphQLString("title", required=False),
|
|
||||||
]
|
|
||||||
|
|
||||||
api_fields = [
|
api_fields = [
|
||||||
APIField('title'),
|
APIField('title'),
|
||||||
APIField('learning_units'),
|
APIField('my_title'),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@property
|
||||||
|
def my_title(self):
|
||||||
|
return self.title
|
||||||
|
|
||||||
|
|
||||||
def full_clean(self, *args, **kwargs):
|
def full_clean(self, *args, **kwargs):
|
||||||
self.slug = find_available_slug(LearningPackage, slugify(self.title, allow_unicode=True))
|
self.slug = find_available_slug(LearningPackage, slugify(self.title, allow_unicode=True))
|
||||||
|
|
@ -236,16 +217,10 @@ class LearningUnit(Page, Orderable):
|
||||||
StreamFieldPanel('contents'),
|
StreamFieldPanel('contents'),
|
||||||
]
|
]
|
||||||
|
|
||||||
graphql_fields = [
|
|
||||||
GraphQLString("title", required=True),
|
|
||||||
GraphQLStreamfield('contents')
|
|
||||||
]
|
|
||||||
|
|
||||||
|
|
||||||
api_fields = [
|
api_fields = [
|
||||||
APIField('title'),
|
APIField('title'),
|
||||||
|
APIField('contents'),
|
||||||
|
APIField('content_blocks'),
|
||||||
]
|
]
|
||||||
|
|
||||||
subpage_types = []
|
subpage_types = []
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue