My form returns back to itself

return render_to_response('chkinv.html', {'errors': errors})

before and after the post.

During the post, status is calculated through a model that a piece of
inventory is or is not available. What is the best way to put that
status back into the message field in the form?

Right now, I'm doing this through errors, but I'd like the information
to be contained in the form.

{% extends "base.html" %}

{% block content %}
    <h2>Check Endpoint Serial Number Against AMR Inventory</h2>

    {% if errors %}
        {% for error in errors %}
            {{ error }}
        {% endfor %}
        <br></br>
    {% endif %}

    <br></br>
    <form action="." method="post"> {% csrf_token %}
    Serial Number:
    <input type="text" name="EndpointSerialNumber" size="10">
    <br></br>
    <input type="submit" value="Check Serial Number">
    <br></br>
    Endpoint Type:
    <input type="text" name="EndpointType" size="2">
    <br></br>
    <input type="text" name="message" size="40">
    </form>
    <br></br><br></br>
    <a href="/">AMR Application Main Page</a>
{% endblock content

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to