Re: SQLite3 and web server

2015-08-22 Thread Peter Otten
Cecil Westerhof wrote: > On Saturday 22 Aug 2015 09:51 CEST, Peter Otten wrote: > >> Cecil Westerhof wrote: >> >>> 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 th

Re: SQLite3 and web server

2015-08-22 Thread Cecil Westerhof
On Friday 21 Aug 2015 16:57 CEST, Michael Torrie wrote: > On 08/21/2015 08:19 AM, Michael Torrie wrote: >> But of course you can use straight CGI with Apache too. Probably >> this is the easiest way for you to get started. Don't try to run >> your own http server. That's just a waste of time and e

Re: SQLite3 and web server

2015-08-22 Thread Cecil Westerhof
On Saturday 22 Aug 2015 09:51 CEST, Peter Otten wrote: > Cecil Westerhof wrote: > >> 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. > > Is that

Re: SQLite3 and web server

2015-08-22 Thread Peter Otten
Cecil Westerhof wrote: > 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. Is that really required by bottle? Where would you like to put the files?

Re: SQLite3 and web server

2015-08-21 Thread Cecil Westerhof
On Friday 21 Aug 2015 16:19 CEST, Michael Torrie wrote: > On 08/21/2015 03:44 AM, Cecil Westerhof wrote: >> Interesting, but it does not help me. I need to know how to server >> data from SQLite instead of static files. > > Is your program already working with data coming from your Python > dict?

Re: SQLite3 and web server

2015-08-21 Thread Cecil Westerhof
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',

Re: SQLite3 and web server

2015-08-21 Thread Michael Torrie
On 08/21/2015 08:19 AM, Michael Torrie wrote: > But of course you can use straight CGI with Apache too. Probably this > is the easiest way for you to get started. Don't try to run your own > http server. That's just a waste of time and effort. Run the CGIs under > Apache. Google for Apache CGI

Re: SQLite3 and web server

2015-08-21 Thread Michael Torrie
On 08/21/2015 03:44 AM, Cecil Westerhof wrote: > Interesting, but it does not help me. I need to know how to server > data from SQLite instead of static files. Is your program already working with data coming from your Python dict? If so, you would just replace the python dict lookups with a call

Re: SQLite3 and web server

2015-08-21 Thread Cecil Westerhof
On Friday 21 Aug 2015 09:27 CEST, Chris Angelico wrote: > On Fri, Aug 21, 2015 at 5:13 PM, Cecil Westerhof 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 dat

Re: SQLite3 and web server

2015-08-21 Thread Peter Otten
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://plu

Re: SQLite3 and web server

2015-08-21 Thread Chris Angelico
On Fri, Aug 21, 2015 at 5:13 PM, Cecil Westerhof 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 transact

Re: SQLite3 and web server

2015-08-21 Thread Cecil Westerhof
On Friday 21 Aug 2015 08:50 CEST, Steven D'Aprano wrote: >> 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 feel that by answering this question, I'm in the same position as

Re: SQLite3 and web server

2015-08-20 Thread Steven D'Aprano
On Fri, 21 Aug 2015 04:11 pm, 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, Ah, so you're one of *them*. People who serve static content out of Javascr

SQLite3 and web server

2015-08-20 Thread Cecil Westerhof
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' },