This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description


  1. pip install django_render_partial
  2. Add 'django_render_partial' to INSTALLED_APPS
  3. Ensure that 'django.core.context_processors.request' is in TEMPLATE_CONTEXT_PROCESSORS


Write a template for partial view, e.g. partial_view.html:

<p>{{ arg1 }} + {{ arg2 }} = {{ result }}</p>

Write a partial view:

def partial_view(request, *args, **kwargs):
    result = kwargs['arg1'] + kwargs['arg2']
    kwargs['result'] = result
    return render(request, 'partial_view.html', kwargs)

if you are using function-based views, or:

class PartialView(TemplateView):
    template_name = 'partial_view.html'

    def get_context_data(self, **kwargs):
        result = kwargs['arg1'] + kwargs['arg2']
        kwargs['result'] = result
        return super(PartialView, self).get_context_data(**kwargs)

if you are using class-based views.

Add it to




In your template:

{% load render_partial %}
{% with some_var=2 %}
  {% render_partial 'partial_view' arg1=40 arg2=some_var %}
{% endwith %}

The render_partial tag would be rendered to:

<p>40 + 2 = 42</p>

Note that the with tag above is not required for render_partial to work. It is used to show that render_partial accepts variables. Every argument will be evaluated against context except for the names of any keyword arguments.

If you don’t want to expose your partial view in, you can also use fully qualified dot separated view name:

{% render_partial 'partial_test.views.PartialView' arg1=40 arg2=some_var %}
{% render_partial 'partial_test.views.partial_view' arg1=40 arg2=some_var %}

IMPORTANT: the calling template must receive a context variable called request containing the original HttpRequest. Don’t forget to add 'django.core.context_processors.request' to TEMPLATE_CONTEXT_PROCESSORS.

Adapted from

Release History

Release History


This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date (7.4 kB) Copy SHA256 Checksum SHA256 Source Jul 19, 2014

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting