0👍
✅
My Solution:
{% extends x|yesno:"stamped/blank.html,stamped/home.html" %}
Where blank.html
contains:
{% block results %}{% endblock %}
<!-- to allow for corrected shared rendering
with ajax posts and normal django rendering -->
and home.html
is my standard app page with a results block to extend.
1👍
Wouldn’t this, or some variant, do?
{% if request.is_ajax %}
{# ajax! #}
{% else %}
{% block 'some_div' %}{% endbock %}
{% endif %}
- [Answer]-Submitting files to django server from outside via Ajax
- [Answer]-Django multiple Forms in a single Form instance,validation error
Source:stackexchange.com