Learn how to to restrict Ajax views to allow only requests generated via Ajax.
We're going to create a decorator for checking…the HTTP X requested with header in our views.…A decorator is a function that takes another function…and extends the behavior of the latter…without explicitly modifying it.…If the concept of decorators is foreign to you,…you might want to take a look at this site…before you continue.…Since our decorator will be generic…and could be applied to any view,…we'll create a common Python package in our project.…Now, go to the bookmark directory and create a new folder…
Note: This course was created by Packt Publishing. We are pleased to host this training in our library.
- Building a social website
- Sharing content in your website
- Creating an image bookmarking website
- Adding Ajax actions with jQuery
- Tracking user actions
- Using Redis to store item views