when bootstrap customizer data is missing it doesn't gracefully handle the error
Closed this issue · 2 comments
david-dumke commented
- Package version: django-bootstrap-customizer = "^0.1.3"
- Django version: 2.2
- Python version: 3.7.4
- Operating System: WSL / Ubuntu 18.04
- Env: Pyenv, poetry, postgres
Description
Trying to use bootstrap customizer in my app. I expected bootstrap customizer to run without errors out of the box. It looks like it needs a fixture and some initial data to work properly.
What I Did
Install the bootstrap customizer app
./manage.py runserver
The error
File "/home/nautel/.cache/pypoetry/virtualenvs/fosscred-py3.7/lib/python3.7/site-packages/bootstrap_customizer/templatetags/bootstrap_customizer.py", line 11, in bootstrap_theme_css_above_the_fold
bootstrap_theme = context['request'].bootstrap_theme
AttributeError: 'WSGIRequest' object has no attribute 'bootstrap_theme'
johnfraney commented
@strike5150 Thanks for reporting this. I'm working on two changes that should help:
- Adding more informative error messages when trying to use the template tags without a
BootstrapTheme
and aBootstrapSiteTheme
configured in the admin - Adding a management command to create a
BootstrapTheme
and aBootstrapSiteTheme
so it's easier to get up and running
I'm working on docs and the release now, so it'll be out soon!
johnfraney commented
Fixed in version v0.3.0