Hi Luna,

Why not do something like:

Have a base template that you will use for the basic editing, let's call it
`base_content_edit.html`:

{% extends whatever-you-use-as-base-template %}

{% block editor %}
<textarea></textarea>
{% endblock %}
<button>

and then, when you need a rich editor, you have a new template, say
`rich_content_edit.html`:

{% extend "base_content_edit" %}

{% block editor %}
<rich-content-editor></rich-content-editor>
{% endblock %}


Django templates are more based on the building on top of previous content
than including bits and pieces (although you can do that with no issues).

On Fri, Jan 5, 2018 at 6:03 PM, Luna Tuna <fruitfulappro...@gmail.com>
wrote:

> Say I have a content editing template with a simple text area and title
> field.   Then I'll need a publish button for it of course.
>
> But if I include this conten editor in a larger template, the position of
> the publish button will go to the bottom of additionally included content,
>
> so I only want to render the publish button in the first template if I
> know that content_edit.hml is not included in a larger template.
>
> How would I accomplish this?
>
> --
> 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 django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/django-users/ddb6d351-113d-4ff7-ba12-602a9a12a6a0%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/ddb6d351-113d-4ff7-ba12-602a9a12a6a0%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
*Julio Biason*, Sofware Engineer
*AZION*  |  Deliver. Accelerate. Protect.
Office: +55 51 3083 8101 <callto:+555130838101>  |  Mobile: +55 51
<callto:+5551996209291>*99907 0554*

-- 
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 django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAEM7gE3nNY5%3DT%3D6EvRE4RperstWwcScpsfDdTCW-ELCTOVDYvw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to