Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception Value: Invalid block tag on line 17: 'webush_button'. Did you forget to register or load this tag? #42

Closed
makelove opened this issue Jun 20, 2018 · 7 comments

Comments

@makelove
Copy link

Your document is not correct!

<head>
    <meta charset="utf-8"/>
    <title>Chat Rooms</title>
    {% load webpush_notifications %}
    {% webpush_header %}
{#    {{ webpush_header() }}#}
</head>
<body>
<div id="webpush">
    <span>notifications</span>
    {% webush_button %}
{#    {{ webush_button() }}#}
</div>
</body>

could you write down your document in more specific detail ?
Django==2.0.6
django-webpush==0.2.4

@safwanrahman
Copy link
Owner

Hi @makelove Can you remove completely the jinja tag and try? Its registered

@makelove
Copy link
Author

{% load webpush_notifications %}
{% webpush_header %}
is working
but
{% webush_button %}
will raise that error

@safwanrahman
Copy link
Owner

Can you please post the full error log?

@makelove
Copy link
Author

TemplateSyntaxError at /chat/
Invalid block tag on line 17: 'webush_button'. Did you forget to register or load this tag?
Request Method: GET
Request URL: http://127.0.0.1:8000/chat/
Django Version: 2.0.6
Exception Type: TemplateSyntaxError
Exception Value:
Invalid block tag on line 17: 'webush_button'. Did you forget to register or load this tag?
Exception Location: /Users/play/Test测试/django-example-channels/env/lib/python3.6/site-packages/django/template/base.py in invalid_block_tag, line 539
Python Executable: /Users/play/Test测试/django-example-channels/env/bin/python3.6
Python Version: 3.6.4
Python Path:
['/Users/play/Test测试/channels/mysite',
'/Users/play/Test测试/channels/mysite',
'/Users/play/Test测试/django-example-channels/env/lib/python36.zip',
'/Users/play/Test测试/django-example-channels/env/lib/python3.6',
'/Users/play/Test测试/django-example-channels/env/lib/python3.6/lib-dynload',
'/usr/local/Cellar/python/3.6.4_4/Frameworks/Python.framework/Versions/3.6/lib/python3.6',
'/Users/play/Test测试/django-example-channels/env/lib/python3.6/site-packages']
Server time: Wed, 20 Jun 2018 12:48:12 +0000

@safwanrahman
Copy link
Owner

safwanrahman commented Jun 20, 2018

Oh! It was a typo!
it should be {% webpush_button %} not {% webush_button %}

@safwanrahman
Copy link
Owner

@makelove could you solve it?

@makelove
Copy link
Author

makelove commented Jun 25, 2018

yes,Thank you

But still have problems on sending message to browser,because I am at China
you use Google service, So it's a problem to connect to Google service

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants