I found when my site www.paradondevamos.com get live that for the
comment contrib app is necesary do a preview.html template.

But the workflow not work when the user is not logged. Appear all the
fields, I fiil it then return to preview, then I do the final post and
get back asking for the user login and get stuck in the loop.

I do this:

  <form action="../post/" method="post">
    {% if comment_form.has_errors %}
      <p class="error"><strong>Corriga los siguientes errores.</
strong></p>
    {% else %}
      <ol id="comment-list">
        {% include "comments/list.html" %}
      </ol>
      <fieldset>
                        <input type="submit" id="id_submit" name="post" 
value="Post
comment" /></p>
      </fieldset>

      <h3>O modifiquelo de nuevo...</h3>
    {% endif %}

    <fieldset>
    {% if comment_form.username.errors or comment_form.password.errors
%}
                <dl>
                        <dt><label for="id_username">Usuario</label></dt>
                        <dd>{{ comment_form.username }}</dd>
                        {% if comment_form.username.errors %}<dd
class="error">{{ comment_form.username.errors.0 }}</dd>{% endif %}
                        <dt><label for="id_password">Clave</label></dt>
                        <dd>{{ comment_form.password }}</dd>
                        {% if comment_form.password.errors %}<dd
class="error">{{ comment_form.password.errors.0 }}</dd>{% endif %}
                </dl>
                <h3>Olvido su clave?</h3>
                <p>
                        <a href="{% url resetpwd %}" title="Recuperar 
clave">Recuperar mi
clave de acceso.</a>
                </p>
    {% endif %}

    {% if comment_form.comment.errors %}
{{ comment_form.comment.html_error_list }}{% endif %}
            <label for="id_comment">Comentario:</label>
        {{ comment_form.comment }}<br />
      <input type="hidden" name="options" value="{{ options }}" />
      <input type="hidden" name="target" value="{{ target }}" />
      <input type="hidden" name="gonzo" value="{{ hash }}" />

                <input type="submit" id="id_preview" name="preview" 
value="Preview" /
>
    </fieldset>
  </form>
I do this:

  <form action="../post/" method="post">
    {% if comment_form.has_errors %}
      <p class="error"><strong>Corriga los siguientes errores.</
strong></p>
    {% else %}
      <ol id="comment-list">
        {% include "comments/list.html" %}
      </ol>
      <fieldset>
                        <input type="submit" id="id_submit" name="post" 
value="Post
comment" /></p>
      </fieldset>

      <h3>O modifiquelo de nuevo...</h3>
    {% endif %}

    <fieldset>
    {% if comment_form.username.errors or comment_form.password.errors
%}
                <dl>
                        <dt><label for="id_username">Usuario</label></dt>
                        <dd>{{ comment_form.username }}</dd>
                        {% if comment_form.username.errors %}<dd
class="error">{{ comment_form.username.errors.0 }}</dd>{% endif %}
                        <dt><label for="id_password">Clave</label></dt>
                        <dd>{{ comment_form.password }}</dd>
                        {% if comment_form.password.errors %}<dd
class="error">{{ comment_form.password.errors.0 }}</dd>{% endif %}
                </dl>
                <h3>Olvido su clave?</h3>
                <p>
                        <a href="{% url resetpwd %}" title="Recuperar 
clave">Recuperar mi
clave de acceso.</a>
                </p>
    {% endif %}

    {% if comment_form.comment.errors %}
{{ comment_form.comment.html_error_list }}{% endif %}
            <label for="id_comment">Comentario:</label>
        {{ comment_form.comment }}<br />
      <input type="hidden" name="options" value="{{ options }}" />
      <input type="hidden" name="target" value="{{ target }}" />
      <input type="hidden" name="gonzo" value="{{ hash }}" />

                <input type="submit" id="id_preview" name="preview" 
value="Preview" /
>
    </fieldset>
  </form>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to