Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
readme
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
isgphys
readme
Commits
255c058a
Commit
255c058a
authored
2 years ago
by
Claude Becker
Browse files
Options
Downloads
Patches
Plain Diff
web: wwwshare.wsgi example code
parent
39a2b8ae
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
web/wsgi.markdown
+16
-1
16 additions, 1 deletion
web/wsgi.markdown
with
16 additions
and
1 deletion
web/wsgi.markdown
+
16
−
1
View file @
255c058a
...
...
@@ -11,7 +11,22 @@ which is enabled on demand only (please [[contact us|services/contact]]).
-
WSGI entry point:
`/home/wwwshare/public/wwwshare.wsgi`
All new WSGI webshares will come with a dummy app in
`wwwshare.wsgi`
.
Edit this file to load your application.
Edit this file to load your app into the
`application`
variable.
```
python
from
pathlib
import
Path
import
sys
# Add /home/wwwshare/public to the Python search path
PUBLICDIR
=
Path
(
__file__
).
parents
[
0
]
sys
.
path
.
insert
(
0
,
str
(
PUBLICDIR
))
# Import your app. Details depend on your code and framework.
from
your_custom_app_code
import
app
# Assign the app to the special wsgi 'application' variable
application
=
app
```
If you make changes to the source code, you have to tell the webserver to
restart the WSGI app by modifying the file time stamp on the WSGI entry point:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment