Giter Site home page Giter Site logo

Comments (5)

claudep avatar claudep commented on May 22, 2024

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.

maurizi avatar maurizi commented on May 22, 2024

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.

charettes avatar charettes commented on May 22, 2024

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.

claudep avatar claudep commented on May 22, 2024

@maurizi Could you try changing the location of the load tag to see if this makes any difference?

from django-contrib-comments.

maurizi avatar maurizi commented on May 22, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.