SQLite3 and web server

Steven D'Aprano steve at pearwood.info
Fri Aug 21 08:50:29 CEST 2015


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
Javascript, instead of HTML, so that the website is broken and unusable in
browsers without JS, and those with JS turned off.


> 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 someone
telling terrorists how best to build a dirty bomb. Oh well.

https://docs.python.org/3/library/sqlite3.html

But surely you need to find out how to access Sqlite from Javascript, not
Python? This doesn't seem to be related to Python in any way. Just because
the web server is written in Python doesn't mean that it's a Python
problem. Your web page is generated from Javascript, not Python.




Making-the-Internet-a-worse-place-one-piece-of-Javascript-at-a-time-ly y'rs,

-- 
Steven



More information about the Python-list mailing list