basic tags in django

1. extends:
 
eg: {% extends "base.html" %}

 2.block title:

eg: {% block title %}User Registration{% endblock %}

3. block head

eg: {% block head %}User Registration{% endblock %}

4. block content

eg: {% block content %}
    <form method="post" action=".">{% csrf_token %}
        <table border="0">
            {{ form.as_table }}
        </table>
        <input type="submit" value="Register" />
    </form>
    <a href="/">Login</a>
{% endblock %}

No comments:

Post a Comment