Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #95518
| References | <87pp2hp3vg.fsf@Equus.decebal.nl> <55d6ca35$0$1665$c3e8da3$5496439d@news.astraweb.com> <87lhd5p0zv.fsf@Equus.decebal.nl> |
|---|---|
| Date | 2015-08-21 17:27 +1000 |
| Subject | Re: SQLite3 and web server |
| From | Chris Angelico <rosuav@gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.6.1440142039.13558.python-list@python.org> (permalink) |
On Fri, Aug 21, 2015 at 5:13 PM, Cecil Westerhof <Cecil@decebal.nl> wrote: > I know how to work with SQLite. What I do not know how to make a > python web-server that accepts a request from the JavaScript code and > responds with data from the SQLite3 database. The request from JS will be some sort of HTTP transaction. It'll be AJAX or similar, and to your web server, it'll simply be another page request. (You might be using a method other than GET/POST (which are the only two that regular page loads use), but it's still a standard HTTP request.) You then respond to that request with data that you got from the database. Check out this video from PyCon. Its main thrust is "here's why websockets are great, and why other technologies are insufficient", but the background info is a tidy summary of how the web works. https://www.youtube.com/watch?v=u5QT3luWx7w ChrisA
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
SQLite3 and web server Cecil Westerhof <Cecil@decebal.nl> - 2015-08-21 08:11 +0200
Re: SQLite3 and web server Steven D'Aprano <steve@pearwood.info> - 2015-08-21 16:50 +1000
Re: SQLite3 and web server Cecil Westerhof <Cecil@decebal.nl> - 2015-08-21 09:13 +0200
Re: SQLite3 and web server Chris Angelico <rosuav@gmail.com> - 2015-08-21 17:27 +1000
Re: SQLite3 and web server Cecil Westerhof <Cecil@decebal.nl> - 2015-08-21 11:44 +0200
Re: SQLite3 and web server Michael Torrie <torriem@gmail.com> - 2015-08-21 08:19 -0600
Re: SQLite3 and web server Cecil Westerhof <Cecil@decebal.nl> - 2015-08-21 17:23 +0200
Re: SQLite3 and web server Michael Torrie <torriem@gmail.com> - 2015-08-21 08:57 -0600
Re: SQLite3 and web server Cecil Westerhof <Cecil@decebal.nl> - 2015-08-22 13:38 +0200
Re: SQLite3 and web server Peter Otten <__peter__@web.de> - 2015-08-21 11:32 +0200
Re: SQLite3 and web server Cecil Westerhof <Cecil@decebal.nl> - 2015-08-21 17:12 +0200
Re: SQLite3 and web server Peter Otten <__peter__@web.de> - 2015-08-22 09:51 +0200
Re: SQLite3 and web server Cecil Westerhof <Cecil@decebal.nl> - 2015-08-22 13:41 +0200
Re: SQLite3 and web server Peter Otten <__peter__@web.de> - 2015-08-22 14:23 +0200
csiph-web