Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cubicweb
cubes
registration
Commits
b958f4fa3904
Commit
4dcfcd3b
authored
Sep 16, 2014
by
Rémi Cardona
Browse files
[views] Always generate HTTPS URLs if the instance supports said protocol
Closes #4491860
parent
ac99463b1d6f
Changes
1
Hide whitespace changes
Inline
Side-by-side
views.py
View file @
b958f4fa
...
...
@@ -102,7 +102,7 @@ See you soon on %(base_url)s !
data
.
setdefault
(
qname
(
'surname'
),
''
)
if
not
(
data
.
get
(
qname
(
'firstname'
))
or
data
.
get
(
qname
(
'surname'
))):
data
[
qname
(
'firstname'
)]
=
data
[
qname
(
'login'
)]
data
.
update
({
'base_url'
:
self
.
_cw
.
vreg
.
config
[
'
base
-
url
'
]
,
data
.
update
({
'base_url'
:
self
.
_cw
.
base
_
url
(
secure
=
True
)
,
'url'
:
activationurl
})
content
=
self
.
_cw
.
_
(
self
.
content
)
%
data
subject
=
self
.
_cw
.
_
(
self
.
subject
)
%
data
...
...
@@ -112,7 +112,7 @@ See you soon on %(base_url)s !
def
activation_url
(
self
,
data
):
data
.
pop
(
qname
(
'upassword'
)
+
'-confirm'
,
None
)
key
=
crypto
.
encrypt
(
data
,
self
.
_cw
.
vreg
.
config
[
'registration-cypher-seed'
])
return
self
.
_cw
.
build_url
(
'registration_confirm'
,
key
=
key
)
return
self
.
_cw
.
build_url
(
'registration_confirm'
,
key
=
key
,
__secure__
=
True
)
def
success_redirect_url
(
self
):
msg
=
self
.
_cw
.
_
(
u
'Your registration email has been sent. Follow '
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment