Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #95526
| From | Cecil Westerhof <Cecil@decebal.nl> |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | Re: SQLite3 and web server |
| Date | 2015-08-21 17:23 +0200 |
| Organization | Decebal Computing |
| Message-ID | <878u94psx3.fsf@Equus.decebal.nl> (permalink) |
| References | (1 earlier) <55d6ca35$0$1665$c3e8da3$5496439d@news.astraweb.com> <87lhd5p0zv.fsf@Equus.decebal.nl> <mailman.6.1440142039.13558.python-list@python.org> <87h9ntou1c.fsf@Equus.decebal.nl> <mailman.8.1440166803.13558.python-list@python.org> |
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? If so, you would just replace the python dict lookups with a
> call to SQLite3's function to perform a query on the database. You
> say you already know how to work with SQLite, so I assume this is
> what you're doing.
>
> http://raspberrywebserver.com/sql-databases/accessing-an-sqlite-database-with-python.html
>
> As to the traceback you reported, I don't know enough about using
> http.server and socketserver to answer. Typically web development in
> Python is done via WSGI protocol, in conjunction with a web server
> like Apache using mod_wsgi[1], which is available in most distro's
> repos.
>
> 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 to get info on how to
> set up apache to execute CGI scripts (in any language).
>
> [1] https://code.google.com/p/modwsgi/wiki/QuickConfigurationGuide
I did manage to get something working:
https://github.com/CecilWesterhof/PublishedPhotos
--
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