I'm not clear from the example which of the code from base you want to
keep, and which you want to be overriden. What should the resulting HTML
look like?
_Nik
On 4/3/2014 2:52 AM, Fred DJar wrote:
> actually i want the exact opposite
> i want to KEEP my html with all the tags like <fieldset> and <section>
>
> On Tuesday, 1 April 2014 02:53:00 UTC+1, Nikolas Stevenson-Molnar wrote:
>
> It depends on what you want to do. If you want to override/replace
> the form in base.html, then place the block tag around the form,
> like so (in base.html):
>
> {% block content %}
> <form action="" class="sky-form">
> ...
> </form>
> {% endblock %}
>
> Any template extending from base.html which defines a "content"
> block will override the form in base.html.
>
> _Nik
>
> On 3/27/2014 6:48 AM, Fred DJar wrote:
>> Hello,
>> I am a beginner in python and django programming, i have a
>> question that already have been asked in stackoverflow and many
>> forums, but i couldnt solve my own.
>>
>> this exactly my situation:
>>
>> this the code in my app html page:
>>
>> /{% extends 'base.html' %}/
>> /
>> /
>> /{% block content %}/
>> /
>> /
>> /<form method="POST" action=""> {% csrf_token %} /
>> / {{ form.as_p }} /
>> / <footer>/
>> / <button type="submit" class="button">Confirmer</button>/
>> / </footer> /
>> /</form>/
>> /
>> /
>> /{% endblock %}/
>> /
>> /
>> /
>> /
>>
>> but in my base.html i have already this form and this classes:
>>
>> /<form action="" class="sky-form">
>> /
>> / <section>/
>> / <label class="input">/
>> / <input type="password" placeholder="Confirmation">/
>> / <b class="tooltip tooltip-bottom-right">Retaper
>> votre mot de passe</b>/
>> / </label>/
>> / </section>/
>> /./
>> /./
>> /./
>> /./
>> /</form>/
>>
>>
>> where should i put /{% block content %}/ and /{% endblock %}/ in
>> my base.html!!!!!!
>>
>> i've also followed the tutorial from the official docs, but it
>> did,'t work out for me
>>
>> i'm sorry if my question seem silly!
>> Thanks in advance.
>> --
>> You received this message because you are subscribed to the
>> Google Groups "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it,
>> send an email to [email protected] <javascript:>.
>> To post to this group, send email to [email protected]
>> <javascript:>.
>> Visit this group at http://groups.google.com/group/django-users
>> <http://groups.google.com/group/django-users>.
>> To view this discussion on the web visit
>>
>> https://groups.google.com/d/msgid/django-users/0d9ee9e7-7cc5-4e6b-8fdb-c02d9d1d7049%40googlegroups.com
>>
>> <https://groups.google.com/d/msgid/django-users/0d9ee9e7-7cc5-4e6b-8fdb-c02d9d1d7049%40googlegroups.com?utm_medium=email&utm_source=footer>.
>> For more options, visit https://groups.google.com/d/optout
>> <https://groups.google.com/d/optout>.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to [email protected]
> <mailto:[email protected]>.
> To post to this group, send email to [email protected]
> <mailto:[email protected]>.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/63a7883b-7c51-4baa-8df8-2e2143a53345%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/63a7883b-7c51-4baa-8df8-2e2143a53345%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/53486D1B.9000108%40consbio.org.
For more options, visit https://groups.google.com/d/optout.