以Python为后端的Ajax

I'm currently working on a web application, hosted on Google App Engine with the back-end written in Python. Now I feel the need to add Ajax-like features into my website. When I went through some of the Ajax tutorials on the internet, I found that all of them taught in context to having the back-end written in PHP.

So my question is, can't I use Ajax-like features on my application written in Python, hosted on Google App Engine? And if yes, can someone suggest some good tutorials for learning Ajax which uses Python as the back-end example?

EDIT: I'm using webapp2 framework, and am not familiar with Django.

If your are using Django, you can read this https://racingtadpole.com/blog/django-ajax-and-jquery/

The important part is to use the {% csrf_token %}

Yes, it is perfectly possible to do this.

A popular construction in new apps these days is running a "one page application", together with a 'completely separate' backend application providing an API.

The web page, with client-side javascript, effectively becomes its own client. It then talks (most commonly over JSON) to the server.

For example, one might construct a client-side application with AngularJS, and let to talk to a Flask backend using some sort of Restful API plugin to make things super easy to construct. The client and server would communicate over AJAX JSON requests / responses.

Here's an example app I quickly found of someone implementing such a thing.

Of course Angular and Flask are not the only technology choices you can make, there are plenty of others as well.

The backend is irrelevant when doing Ajax. You could write it in PHP, Python, or even COBOL if that's what floats your boat. The main thing is that your Javascript is asynchronously requesting data, and that your backend is providing it in the format your frontend expects. These days, that's mostly JSON. Python is of course perfectly capable of providing JSON data (via the json module from the standard library).