skip to navigation
skip to content

Not Logged In

django-ajaxify 0.0.1b

Rendering helpers for AJAX enabled views

A few little helpers.

Instead of this:

def view(request):
    context_dict = {'items': MyModel.objects.all()}
    return render(request, "template.html", context_dict)

Use this:

from ajaxify import render_ajax

def view(request):
    context_dict = {'items': MyModel.objects.all()}
    return render_ajax(request, "template.html", template_fragment.html", context_dict)

Now if your view is responding to AJAX requests it will respond with only the generated fragment.

 
File Type Py Version Uploaded on Size
django-ajaxify-0.0.1b.tar.gz (md5) Source 2012-10-28 2KB
  • Downloads (All Versions):
  • 28 downloads in the last day
  • 88 downloads in the last week
  • 259 downloads in the last month