FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
PythonSQLiteCommentSystem/wsgi.py at master · codeleta/PythonSQLiteCommentSystem · GitHub
codeleta
/
PythonSQLiteCommentSystem
Public
Notifications
You must be signed in to change notification settings
Fork
0
Star
2
Code
Issues
0
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
PythonSQLiteCommentSystem
/
wsgi.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
20 lines (16 loc) · 541 Bytes
Breadcrumbs
PythonSQLiteCommentSystem
/
wsgi.py
Copy path
File metadata and controls
20 lines (16 loc) · 541 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import
logging
import
os
from
settings
import
DB_NAME
from
controllers
.
routes
import
handler_404
,
static_file
from
urls
import
url_routes
from
db
.
sql
import
create_db
logger
=
logging
.
getLogger
(
__name__
)
def
application
(
environ
,
start_response
):
if
not
os
.
path
.
exists
(
DB_NAME
):
create_db
()
url
=
environ
.
get
(
'PATH_INFO'
)
default_route
=
handler_404
if
url
.
startswith
(
'/static/'
):
default_route
=
static_file
url_route
=
url_routes
.
get
(
url
,
default_route
)
return
url_route
(
environ
,
start_response
)
Back
|
FazBrowse Home
|
New Git URL