Comments (5)
Weird, because the template is tested. You might try to debug at the point of failure in the traceback to see if this is caused by another problem.
from django-contrib-comments.
Here's the full trace:
ERROR:django.request:Internal Server Error: /comments/post/
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py", line 132, in get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/usr/local/lib/python2.7/dist-packages/django/utils/decorators.py", line 110, in _wrapped_view
response = view_func(request, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/django/views/decorators/http.py", line 45, in inner
return func(request, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/django_comments/views/comments.py", line 103, in post_comment
"next": data.get("next", next),
File "/usr/local/lib/python2.7/dist-packages/django/shortcuts.py", line 67, in render
template_name, context, request=request, using=using)
File "/usr/local/lib/python2.7/dist-packages/django/template/loader.py", line 96, in render_to_string
template = select_template(template_name, using=using)
File "/usr/local/lib/python2.7/dist-packages/django/template/loader.py", line 64, in select_template
return engine.get_template(template_name, dirs)
File "/usr/local/lib/python2.7/dist-packages/django/template/backends/django.py", line 30, in get_template
return Template(self.engine.get_template(template_name, dirs))
File "/usr/local/lib/python2.7/dist-packages/django/template/engine.py", line 167, in get_template
template, origin = self.find_template(template_name, dirs)
File "/usr/local/lib/python2.7/dist-packages/django/template/engine.py", line 141, in find_template
source, display_name = loader(name, dirs)
File "/usr/local/lib/python2.7/dist-packages/django/template/loaders/base.py", line 13, in __call__
return self.load_template(template_name, template_dirs)
File "/usr/local/lib/python2.7/dist-packages/django/template/loaders/base.py", line 23, in load_template
template = Template(source, origin, template_name, self.engine)
File "/usr/local/lib/python2.7/dist-packages/django/template/base.py", line 191, in __init__
self.nodelist = engine.compile_string(template_string, origin)
File "/usr/local/lib/python2.7/dist-packages/django/template/engine.py", line 261, in compile_string
return parser.parse()
File "/usr/local/lib/python2.7/dist-packages/django/template/base.py", line 342, in parse
compiled_result = compile_func(self, token)
File "/usr/local/lib/python2.7/dist-packages/django/template/loader_tags.py", line 210, in do_extends
nodelist = parser.parse()
File "/usr/local/lib/python2.7/dist-packages/django/template/base.py", line 342, in parse
compiled_result = compile_func(self, token)
File "/usr/local/lib/python2.7/dist-packages/django/template/loader_tags.py", line 184, in do_block
nodelist = parser.parse(('endblock',))
File "/usr/local/lib/python2.7/dist-packages/django/template/base.py", line 340, in parse
self.invalid_block_tag(token, command, parse_until)
File "/usr/local/lib/python2.7/dist-packages/django/template/base.py", line 395, in invalid_block_tag
(command, get_text_list(["'%s'" % p for p in parse_until])))
TemplateSyntaxError: Invalid block tag: 'comment_form_target', expected 'endblock'
from django-contrib-comments.
It's odd, the preview.html
template seems to load the comments template tags.
I didn't know {% load %}
tags could be used this way, I always assumed they had to be placed at the top of the file.
from django-contrib-comments.
@maurizi Could you try changing the location of the load tag to see if this makes any difference?
from django-contrib-comments.
I moved the {% load comments %}
up to the top of the page, but it didn't seem to fix the problem.
from django-contrib-comments.
Related Issues (20)
- Using comments in multi site environments
- Minor bug in 'Approve.html' HOT 1
- 'comments-post-comment' is not a valid view function or pattern name. HOT 4
- Unable to customize textarea for comment HOT 2
- list index out of range HOT 4
- Template does not exist at comments/comment_notification_email.txt HOT 1
- How do I create a new comment programmatically? HOT 1
- Documentation bug: get_comment_create_data() requires **kwargs HOT 2
- Broken link in documentation. HOT 3
- Wheel for v2.0.0 missing on PyPI HOT 3
- Add reason field to CommentFlag HOT 1
- Release 2.1.0 ? HOT 1
- Move CI to travis-ci.com? HOT 3
- Comment notification email template does not exist error
- Missing migration detected with Django 4.0.1 HOT 1
- CSP compliance HOT 4
- How to custom LogEntry?
- Insufficient `content-type` validation in `post_comment` HOT 1
- Add request.FILES to post_comment form
- Releasing a new version with Django 4.2 support HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from django-contrib-comments.