开发者

Sending a request to retrieve the data from Django

I am doing a Web project, where I am using HTML5 and Django to store database in sqlite3. The part being, since I had to use python, I installed mod_python for apache2. Now the thing is I went through many sites for head start to store the data and retrieve it. When I check in google related to how to use mod_python I did get certain informatio开发者_JAVA技巧n on how I can send a request to a .py file and then execute it. But with Django documentation providing a tutorial which is to develop a polling webApp, I am not finding it measurable to the part I am trying to achieve.

I want to send the request from an Html file where I have a search box and some radio buttons, to Django through Apache2 (mod_python) and then access my database in sqlite3. Please could anyone give me brief idea on whether I am doing it right? Also if yes, can u give me a hint as in how can I send the request from HTML file to the database from Django and mod_python being used? I am a bit confused with Django tutorial. Please if anyone can just let me know what exactly I should do! Or if any link with a proper guidance would be of great help.

Thank you.


Well, for starters, if you can install and use mod_wsgi instead of mod_python, you should -- mod_python hasn't been supported for years. I'd also strongly recommend that you use anything other than SQLite for a production web application -- SQLite doesn't cope well with multiple simultaneous transactions.

If you're stuck using mod_python, then see the Django documentation for using mod_python.

Once you've got that working, the rest of your questions can be answered by the Django Tutorial, particularly part 4, which covers the use of HTML forms with Django views and templates:

  • http://docs.djangoproject.com/en/1.3/intro/tutorial01/
  • http://docs.djangoproject.com/en/1.3/intro/tutorial02/
  • http://docs.djangoproject.com/en/1.3/intro/tutorial03/
  • http://docs.djangoproject.com/en/1.3/intro/tutorial04/
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜