Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
third-party
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cooperatic-foodcoops
third-party
Commits
c5b11509
Commit
c5b11509
authored
Sep 12, 2022
by
François C.
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't allow unsubscribe member to subscribe shift_template
parent
4f7740d4
Pipeline
#2369
failed with stage
in 1 minute 24 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletions
+10
-1
views.py
members_space/views.py
+10
-1
No files found.
members_space/views.py
View file @
c5b11509
...
@@ -173,9 +173,18 @@ def home(request):
...
@@ -173,9 +173,18 @@ def home(request):
then the front-end index will call this endpoint to load the home page
then the front-end index will call this endpoint to load the home page
"""
"""
template
=
loader
.
get_template
(
getattr
(
settings
,
'MEMBERS_SPACE_HOME_TEMPLATE'
,
'members_space/home.html'
))
template
=
loader
.
get_template
(
getattr
(
settings
,
'MEMBERS_SPACE_HOME_TEMPLATE'
,
'members_space/home.html'
))
coop_can_change_shift_template
=
getattr
(
settings
,
'COOP_CAN_CHANGE_SHIFT_TEMPLATE'
,
False
)
if
coop_can_change_shift_template
is
True
:
# make further investigation only if COOP_CAN_CHANGE_SHIFT_TEMPLATE is True
if
'id'
in
request
.
COOKIES
:
partner_id
=
request
.
COOKIES
[
'id'
]
cs
=
CagetteShift
()
partnerData
=
cs
.
get_data_partner
(
partner_id
)
if
partnerData
[
'cooperative_state'
]
==
"unsubscribed"
:
coop_can_change_shift_template
=
False
context
=
{
context
=
{
'title'
:
'Espace Membres'
,
'title'
:
'Espace Membres'
,
'coop_can_change_shift_template'
:
getattr
(
settings
,
'COOP_CAN_CHANGE_SHIFT_TEMPLATE'
,
False
)
,
'coop_can_change_shift_template'
:
coop_can_change_shift_template
,
'max_begin_hour'
:
settings
.
MAX_BEGIN_HOUR
,
'max_begin_hour'
:
settings
.
MAX_BEGIN_HOUR
,
}
}
# Get messages to display
# Get messages to display
...
...
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