Mercurial > p > roundup > code
annotate frontends/wsgi.py @ 7971:fe0348bbe45b
issue2551353 - Add roundup-classhelper for 2.4.0 release
Changes to the classic template are not done yet. Still testing.
This commit has document updates and changes to rest.py.
rest.py:
add /rest/data/user/role endpoint to core so the user doesn't have
to add the /rest/roles endpoint via interfaces.py. It will only send
roles for a user with Admin role and there is no way to override
this currently.
acknowledgements.txt:
Added members of team3 to other contributors. Specified for all
other contributes what they worked on.
upgrading.txt:
added classhelper section and basic template change
directions. Linked to admin_guide for full directions.
admin_guide.txt:
documented install, translation, troubleshooting, config etc.
user_guide.txt:
added section on using the classhelper. Added reference to section
earlier in the doc. Added image for section.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Tue, 21 May 2024 01:17:28 -0400 |
| parents | 285d9adfefdb |
| children |
| rev | line source |
|---|---|
|
6390
7c852cad2ca8
Add wsgi.py to frontends. Update docs.
John Rouillard <rouilj@ieee.org>
parents:
diff
changeset
|
1 # If you installed roundup to the system locations |
|
7c852cad2ca8
Add wsgi.py to frontends. Update docs.
John Rouillard <rouilj@ieee.org>
parents:
diff
changeset
|
2 # using pip you don't need to change this |
|
7c852cad2ca8
Add wsgi.py to frontends. Update docs.
John Rouillard <rouilj@ieee.org>
parents:
diff
changeset
|
3 # section. If you installed roundup in a custom |
|
7c852cad2ca8
Add wsgi.py to frontends. Update docs.
John Rouillard <rouilj@ieee.org>
parents:
diff
changeset
|
4 # location, uncomment these lines and change the |
|
7c852cad2ca8
Add wsgi.py to frontends. Update docs.
John Rouillard <rouilj@ieee.org>
parents:
diff
changeset
|
5 # path in the append() method to your custom path. |
|
7c852cad2ca8
Add wsgi.py to frontends. Update docs.
John Rouillard <rouilj@ieee.org>
parents:
diff
changeset
|
6 #import sys |
|
7c852cad2ca8
Add wsgi.py to frontends. Update docs.
John Rouillard <rouilj@ieee.org>
parents:
diff
changeset
|
7 #sys.path.append('/custom/location/where/roundup/is/installed') |
|
7c852cad2ca8
Add wsgi.py to frontends. Update docs.
John Rouillard <rouilj@ieee.org>
parents:
diff
changeset
|
8 |
|
7c852cad2ca8
Add wsgi.py to frontends. Update docs.
John Rouillard <rouilj@ieee.org>
parents:
diff
changeset
|
9 # Obtain the WSGI request dispatcher |
|
7c852cad2ca8
Add wsgi.py to frontends. Update docs.
John Rouillard <rouilj@ieee.org>
parents:
diff
changeset
|
10 from roundup.cgi.wsgi_handler import RequestDispatcher |
|
7c852cad2ca8
Add wsgi.py to frontends. Update docs.
John Rouillard <rouilj@ieee.org>
parents:
diff
changeset
|
11 |
|
7c852cad2ca8
Add wsgi.py to frontends. Update docs.
John Rouillard <rouilj@ieee.org>
parents:
diff
changeset
|
12 # Set the path to tracker home. |
|
7c852cad2ca8
Add wsgi.py to frontends. Update docs.
John Rouillard <rouilj@ieee.org>
parents:
diff
changeset
|
13 tracker_home = '/path/to/tracker' |
|
7c852cad2ca8
Add wsgi.py to frontends. Update docs.
John Rouillard <rouilj@ieee.org>
parents:
diff
changeset
|
14 |
|
6747
d32d43e4a5ba
wsgi can cache tracker instance enabled by feature flag.
John Rouillard <rouilj@ieee.org>
parents:
6390
diff
changeset
|
15 # Enable the feature flag to speed up wsgi response by caching the |
|
d32d43e4a5ba
wsgi can cache tracker instance enabled by feature flag.
John Rouillard <rouilj@ieee.org>
parents:
6390
diff
changeset
|
16 # Roundup tracker instance on startup. See upgrading.txt for |
|
d32d43e4a5ba
wsgi can cache tracker instance enabled by feature flag.
John Rouillard <rouilj@ieee.org>
parents:
6390
diff
changeset
|
17 # more info. |
|
d32d43e4a5ba
wsgi can cache tracker instance enabled by feature flag.
John Rouillard <rouilj@ieee.org>
parents:
6390
diff
changeset
|
18 feature_flags = { "cache_tracker": "" } |
|
d32d43e4a5ba
wsgi can cache tracker instance enabled by feature flag.
John Rouillard <rouilj@ieee.org>
parents:
6390
diff
changeset
|
19 |
|
6390
7c852cad2ca8
Add wsgi.py to frontends. Update docs.
John Rouillard <rouilj@ieee.org>
parents:
diff
changeset
|
20 # Definition signature for app: app(environ, start_response): |
|
6776
285d9adfefdb
Update comment to allow use with mod_wsgi
John Rouillard <rouilj@ieee.org>
parents:
6772
diff
changeset
|
21 # If using apache mod_wsgi change app to application. |
| 6772 | 22 app = RequestDispatcher(tracker_home, feature_flags=feature_flags) |
