Ticket #5277: commens.patch

File commens.patch, 1.5 KB (added by Densetsu no Ero-sennin <densetsu.no.ero.sennin@…>, 17 years ago)

use URL reversing instead of hardcoded URLs

  • django/contrib/comments/templates/comments/form.html

     
    11{% load i18n %}
    22{% if display_form %}
    3 <form {% if photos_optional or photos_required %}enctype="multipart/form-data" {% endif %}action="/comments/post/" method="post">
     3<form {% if photos_optional or photos_required %}enctype="multipart/form-data" {% endif %}action="{% url django.contrib.comments.views.comments.post_comment %}" method="post">
    44
    55{% if user.is_authenticated %}
    66<p>{% trans "Username:" %} <strong>{{ user.username }}</strong> (<a href="{{ logout_url }}">{% trans "Log out" %}</a>)</p>
  • django/contrib/comments/templates/comments/freeform.html

     
    11{% load i18n %}
    22{% if display_form %}
    3 <form action="/comments/postfree/" method="post">
     3<form action="{% url django.contrib.comments.views.comments.post_free_comment %}" method="post">
    44<p><label for="id_person_name">{% trans "Your name:" %}</label> <input type="text" id="id_person_name" name="person_name" /></p>
    55<p><label for="id_comment">{% trans "Comment:" %}</label><br /><textarea name="comment" id="id_comment" rows="10" cols="60"></textarea></p>
    66<p>
Back to Top