Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
SCODOC_R6A06
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Paul-louis Gomis
SCODOC_R6A06
Commits
9fb8796e
There was an error fetching the commit references. Please try again later.
Commit
9fb8796e
authored
3 years ago
by
Emmanuel Viennet
Browse files
Options
Downloads
Patches
Plain Diff
Corrige calcul URL "zope compatibles" en http/https en mode production
parent
fc3e7ba0
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
app/decorators.py
+8
-6
8 additions, 6 deletions
app/decorators.py
app/scodoc/sco_evaluations.py
+1
-0
1 addition, 0 deletions
app/scodoc/sco_evaluations.py
config.py
+2
-0
2 additions, 0 deletions
config.py
with
11 additions
and
6 deletions
app/decorators.py
+
8
−
6
View file @
9fb8796e
...
...
@@ -41,13 +41,15 @@ class ZRequest(object):
"
Emulating Zope 2 REQUEST
"
def
__init__
(
self
):
if
current_app
.
config
[
"
DEBUG
"
]:
self
.
URL
=
request
.
base_url
self
.
URL0
=
self
.
URL
self
.
BASE0
=
request
.
url_root
self
.
QUERY_STRING
=
request
.
query_string
.
decode
(
"
utf-8
"
)
# query_string is bytes
else
:
self
.
URL
=
request
.
base_url
.
replace
(
"
http://
"
,
"
https://
"
)
self
.
BASE0
=
request
.
url_root
.
replace
(
"
http://
"
,
"
https://
"
)
self
.
URL0
=
self
.
URL
# query_string is bytes:
self
.
QUERY_STRING
=
request
.
query_string
.
decode
(
"
utf-8
"
)
self
.
REQUEST_METHOD
=
request
.
method
self
.
AUTHENTICATED_USER
=
current_user
self
.
REMOTE_ADDR
=
request
.
remote_addr
...
...
This diff is collapsed.
Click to expand it.
app/scodoc/sco_evaluations.py
+
1
−
0
View file @
9fb8796e
...
...
@@ -37,6 +37,7 @@ import flask
from
flask
import
url_for
from
flask
import
g
from
flask_login
import
current_user
from
flask
import
request
from
app.scodoc.notes_log
import
log
,
logCallStack
import
app.scodoc.sco_utils
as
scu
...
...
This diff is collapsed.
Click to expand it.
config.py
+
2
−
0
View file @
9fb8796e
...
...
@@ -45,6 +45,7 @@ class ProdConfig(Config):
SQLALCHEMY_DATABASE_URI
=
(
os
.
environ
.
get
(
"
SCODOC_DATABASE_URI
"
)
or
"
postgresql:///SCODOC
"
)
PREFERRED_URL_SCHEME
=
"
https
"
class
DevConfig
(
Config
):
...
...
@@ -59,6 +60,7 @@ class DevConfig(Config):
class
TestConfig
(
DevConfig
):
TESTING
=
True
DEBUG
=
True
SQLALCHEMY_DATABASE_URI
=
(
os
.
environ
.
get
(
"
SCODOC_TEST_DATABASE_URI
"
)
or
"
postgresql:///SCODOC_TEST
"
)
...
...
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