Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

bennylope/django-ajaxify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Django Ajaxify

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.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages