Skip to content

Commit

Permalink
Adds wagtail inventory to search wagtail pages based on the block type
Browse files Browse the repository at this point in the history
  • Loading branch information
SaptakS committed Aug 6, 2019
1 parent bd6ae8e commit f82b0c7
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ environment, run the following your first run:
# Inject development data (also only needs to be run once)
docker-compose exec django ./manage.py createdevdata
# Add wagtail inventory to search wagtail pages by block type
docker-compose exec django ./manage.py block_inventory
You should be able to hit the web server interface by running ``make open-browser``

Note: the ``createdevdata`` command fetches images from the internet
Expand Down
1 change: 1 addition & 0 deletions dev-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ wagtail-autocomplete==0.3.1
wagtail-django-recaptcha==1.0
wagtail-factories==1.1.0
wagtail-metadata==2.0.1
wagtail-inventory==0.7
wagtail==2.3
wcwidth==0.1.7 # via prompt-toolkit
webencodings==0.5.1
Expand Down
3 changes: 3 additions & 0 deletions devops/docker/django-start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ django_start() {
if [ "${DJANGO_CREATEDEVDATA:-no}" == "yes" ]; then
./manage.py createdevdata
fi
if [ "${DJANGO_CREATEINVENTORY:-no}" == "yes" ]; then
./manage.py block_inventory
fi
if [ "${DEPLOY_ENV}" == "dev" ]; then
./devops/scripts/version-file.sh
./manage.py runserver 0.0.0.0:8000
Expand Down
1 change: 1 addition & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ services:
- postgresql
environment:
DJANGO_CREATEDEVDATA: "${DJANGO_CREATEDEVDATA:-no}"
DJANGO_CREATEINVENTORY: "${DJANGO_CREATEINVENTORY:-no}"
DJANGO_DB_PASSWORD: trackerpassword
DJANGO_DB_USER: tracker
DJANGO_DB_NAME: trackerdb
Expand Down
1 change: 1 addition & 0 deletions incident/models/export.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
'live_revision',
'search_image',
'blog_posts',
'page_blocks',
}


Expand Down
1 change: 1 addition & 0 deletions prod-docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ services:
DJANGO_ALLOWED_HOSTS: app
DJANGO_COLLECT_STATIC: "yes"
DJANGO_CREATEDEVDATA: "${DJANGO_CREATEDEVDATA:-no}"
DJANGO_CREATEINVENTORY: "${DJANGO_CREATEINVENTORY:-no}"
DJANGO_SETTINGS_MODULE: tracker.settings.production-ci
DJANGO_SECRET_KEY: 64a235ef65834d8b42fa2802dd4290cf61c773c3f31332039ec5c48165f744da
DJANGO_STATIC_ROOT: /django-static
Expand Down
1 change: 1 addition & 0 deletions requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,5 @@ wagtail-autocomplete
wagtail-factories
wagtail-django-recaptcha
wagtail-metadata
wagtail-inventory
unittest-xml-reporting
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ wagtail-autocomplete==0.3.1
wagtail-django-recaptcha==1.0
wagtail-factories==1.1.0
wagtail-metadata==2.0.1
wagtail-inventory==0.7
wagtail==2.3
webencodings==0.5.1 # via bleach, html5lib
willow==1.1 # via wagtail
1 change: 1 addition & 0 deletions tracker/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
'wagtailmetadata',
'webpack_loader',
'wagtailautocomplete',
'wagtailinventory',

'django.contrib.admin',
'django.contrib.auth',
Expand Down

0 comments on commit f82b0c7

Please sign in to comment.