Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
jcmundy committed May 16, 2019
1 parent 25926f1 commit d62c269
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions apps/cms/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

from wagtail.core.models import Page
from wagtail.core.fields import RichTextField, StreamField
#from wagtailautocomplete.edit_handlers import AutocompletePanel
from wagtailautocomplete.edit_handlers import AutocompletePanel
from wagtail.admin.edit_handlers import FieldPanel, StreamFieldPanel, InlinePanel

from modelcluster.fields import ParentalKey, ParentalManyToManyField
Expand Down Expand Up @@ -46,11 +46,11 @@ class HomePage(Page):
volumes = Manifest.objects.all

content_panels = Page.content_panels + [
# AutocompletePanel('featured_volume', target_model='manifests.Manifest'),
AutocompletePanel('featured_volumes', target_model='manifests.Manifest'),
FieldPanel('tagline', classname="full"),
FieldPanel('content_display', classname="full"),
FieldPanel('featured_collections', widget=forms.CheckboxSelectMultiple, classname="full"),
FieldPanel('featured_collections_sort_order', classname="full"),
FieldPanel('featured_volumes', widget=forms.CheckboxSelectMultiple, classname="full"),
#FieldPanel('featured_volumes', widget=forms.CheckboxSelectMultiple, classname="full"),
FieldPanel('featured_volumes_sort_order', classname="full"),
]
8 changes: 4 additions & 4 deletions apps/iiif/manifests/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import config.settings.local as settings
from ..kollections.models import Collection
from django.contrib.postgres.fields import JSONField
#from wagtailautocomplete.edit_handlers import AutocompletePanel
from wagtailautocomplete.edit_handlers import AutocompletePanel
import uuid

class Manifest(models.Model):
Expand All @@ -25,7 +25,7 @@ class Manifest(models.Model):
viewingDirection = models.CharField(max_length=13, choices=DIRECTIONS, default="left-to-right")
created_at = models.DateTimeField(auto_now_add=True)
#starting_page = models.ForeignKey('canvases.Canvas', related_name="first", on_delete=models.SET_NULL, null=True, blank=True, help_text="Choose the page that will show on loading.")
# autocomplete_search_field = 'label'
autocomplete_search_field = 'label'

@property
def note_list(self):
Expand All @@ -44,8 +44,8 @@ def start_canvas(self):
first = self.canvas_set.all().exclude(is_starting_page=False).first()
return first.identifier if first else self.canvas_set.all().first().identifier

# def autocomplete_label(self):
# return self.label
def autocomplete_label(self):
return self.label

def __str__(self):
return self.label
Expand Down

0 comments on commit d62c269

Please sign in to comment.