pythondjangomezzanine

How to override Mezzanine comments form?


I am using:

Python 2.7
Django 1.6.11
Mezzanine 3.1.10

Anyone who logins in my blog website can set the "name" field of the comments form for a blog post. I had the idea to hide this field but I can't find the template for the comment form.

Does anyone know where the comment form template is or another way to prevent users from setting the "name" field for comments?


Solution

  • You can try to change the templates by first copying the relevant template into your static/templates directory. Use the command

    ./manage.py findstatic templates\something.html

    Ensure that your static files directory is set, then check that

    ./manage.py findstatic templates\something.html

    finds both files, one from mezzanine and one from your static directory.

    Example:

    ./manage.py findstatic css\bootstrap.css
    
    Found 'css\bootstrap.css' here:
      C:\Python34\lib\site-packages\mezzanine\core\static\css\bootstrap.css
      c:\users\me\documents\mezz-project\mez\static\css\bootstrap.css