title: Django: How to include a view within another template
body: <p>I am using a 3rd party Django package to manage my avatar upload and display in my website. The package requires the upload view to display in a new window and is configured as normal in Django in urls.py like so:</p>
  
  <pre><code> url(r'^avatar/', include('avatar.urls')),
  </code></pre>
  
  <p>So that when I go to <strong>mysite.com/avatar/add.html</strong> I see the add view for uploading an avatar.</p>
  
  <p>What I want to do is to create a modal window in my main view which loads the avatar upload view (add.html) into the same view. I have achieved this by doing:</p>
  
  <pre><code>{% include 'avatar/add.html' %}
  </code></pre>
  
  <p>But what I realise is it displays everything but the upload form, because django does not get a chance to run the 3rd avatar view code associated with this template to inject the context before rendering out in the same way it would if I access it as a URL.</p>
  
  <p>My question is: Is it possible to get inline a 3rd party view Django so that it processes it and injects into my own view/template at render time, still respecting the GET/POST logic in the 3rd party view? </p>
  
  <p>I have full access to the 3rd party view code (which is a view function, I'm using class based view), but heaven forbid me copying and pasting their code into my own which defeats purpose.</p>
  
  <p>Thanks in advance</p>