Skip to content

Commit

Permalink
More official wagtail inventory (#1640)
Browse files Browse the repository at this point in the history
* rebase

* use wagtail-inventory 0.5

* use wagtail-inventory 0.5

* add block inventory instruction to the inv tasks

* pipfile lock update

* ensure the block inventory triggers on deploy
  • Loading branch information
alanmoo committed Jul 20, 2018
1 parent 80ef473 commit 7186e76
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 15 deletions.
1 change: 1 addition & 0 deletions Pipfile
Expand Up @@ -28,6 +28,7 @@ factory_boy = "*"
Faker = "*"
wagtail-factories = {ref = "1ead51cadaad3b4530ba2197ccf45d2dca87dbdf", git = "https://github.com/mvantellingen/wagtail-factories"}
mezzanine = {ref = "521a98c39bb6351c4b46067069f33caf95fe0a5e", git = "https://github.com/stephenmcd/mezzanine"}
wagtail-inventory = "*"

[dev-packages]
django-debug-toolbar = "*"
Expand Down
42 changes: 28 additions & 14 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Procfile
@@ -1,2 +1,2 @@
release: cd network-api && python ./manage.py migrate --no-input
release: cd network-api && python ./manage.py migrate --no-input && python ./manage.py block_inventory --no-input
web: cd network-api && gunicorn networkapi.wsgi:application
1 change: 1 addition & 0 deletions network-api/networkapi/settings.py
Expand Up @@ -152,6 +152,7 @@
'wagtail.admin',
'wagtail.core',
'wagtail.contrib.modeladmin',
'wagtailinventory',
'wagtail.contrib.styleguide' if DEBUG else None,

'modelcluster',
Expand Down
4 changes: 4 additions & 0 deletions tasks.py
Expand Up @@ -70,6 +70,8 @@ def setup(ctx):
ctx.run("inv migrate")
print("Creating fake data")
ctx.run("inv manage load_fake_data")
print("Updating block information")
ctx.run("inv manage block_inventory")
# Windows doesn't support pty, skipping this step
if platform == 'win32':
print("All done!\n"
Expand All @@ -89,3 +91,5 @@ def catch_up(ctx):
ctx.run("pipenv install --dev")
print("Applying database migrations.")
ctx.run("inv migrate")
print("Updating block information")
ctx.run("inv manage block_inventory")

0 comments on commit 7186e76

Please sign in to comment.