Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #95523
| Path | csiph.com!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | Cecil Westerhof <Cecil@decebal.nl> |
| Newsgroups | comp.lang.python |
| Subject | Re: SQLite3 and web server |
| Date | Fri, 21 Aug 2015 17:12:57 +0200 |
| Organization | Decebal Computing |
| Lines | 34 |
| Message-ID | <87d1ygptdy.fsf@Equus.decebal.nl> (permalink) |
| References | <87pp2hp3vg.fsf@Equus.decebal.nl> <mailman.7.1440149603.13558.python-list@python.org> |
| Mime-Version | 1.0 |
| Content-Type | text/plain |
| Injection-Info | mx02.eternal-september.org; posting-host="528adfd6ad074c92fdc6a7f8fb9e23d8"; logging-data="15179"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/DYvkQYlyW+JfaMbvSN9G6CN0cpiXyp/Y=" |
| User-Agent | Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
| X-Homepage | http://www.decebal.nl/ |
| Cancel-Lock | sha1:doF3VQ0STBnClLlMR2d68PpLGkw= sha1:xjZQfUEPzU2NN/hkgVIdmDmAOLk= |
| Xref | csiph.com comp.lang.python:95523 |
Show key headers only | View raw
On Friday 21 Aug 2015 11:32 CEST, Peter Otten wrote:
> Cecil Westerhof wrote:
>
>> At the moment I serve a AngularJS web application with:
>> python3 -m http-server
>>
>> This only servers static html pages with the data contained in js
>> files, like:
>> $scope.links = [
>> { desc: 'Album', url:
>> { 'https://plus.google.com/collection/MuwPX'
>> { }, desc: 'Heron Sunbathing', url:
>
>> I would like to retrieve the information out a SQLite3 database. I
>> did some Googling, but until now I did not find something useful.
>> How would I implement this?
>
> I like bottle for (not much) dabbling around with generated html.
> Assuming there is an sqlite database "links.sqlite" with a table
> "links" featuring columns "desc" and "url" you get a traditional
> html page built on the fly from the data in that table with the code
> shown below. Producing JSON is also demonstrated.
Thanks. I made a first try:
https://github.com/CecilWesterhof/PublishedPhotos
The thing I do not like is that all my static files have to be put in
/static/, but I think I can life with it.
--
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof
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