Skip to content
Snippets Groups Projects
Commit 255c058a authored by Claude Becker's avatar Claude Becker
Browse files

web: wwwshare.wsgi example code

parent 39a2b8ae
No related branches found
No related tags found
No related merge requests found
......@@ -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:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment