Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Pole-Web
Website
Commits
6b70e76a
Commit
6b70e76a
authored
Sep 05, 2021
by
HEVELINE Thomas
Browse files
Correction relecture MR
parent
2d049728
Changes
3
Hide whitespace changes
Inline
Side-by-side
boutique/static/boutique/js/item_manage.js
View file @
6b70e76a
...
...
@@ -15,7 +15,7 @@ window.addEventListener("load", function (e) {
queryJson
(
document
.
location
,
{
message
:
"
begin-delivery
"
,
id
:
id
,
},
cb
,
"
OPTIONS
"
);
},
cb
,
"
POST
"
);
});
}
});
...
...
@@ -37,7 +37,7 @@ window.addEventListener("load", function (e) {
queryJson
(
document
.
location
,
{
message
:
"
stop-delivery
"
,
id
:
id
,
},
cb
,
"
OPTIONS
"
);
},
cb
,
"
POST
"
);
});
}
});
...
...
@@ -71,7 +71,8 @@ window.addEventListener("load", function (e) {
queryJson
(
listProvider
,
{
message
:
"
see-orders
"
,
id
:
id
,
},
this
.
populate
.
bind
(
this
));
},
this
.
populate
.
bind
(
this
),
'
POST
'
);
};
SeeOrdersList
.
prototype
=
Object
.
create
(
TableList
.
prototype
,
{
...
...
boutique/tests/test_views.py
View file @
6b70e76a
...
...
@@ -88,7 +88,7 @@ class ItemListViewTest(ItemTestCase, UserTestCase):
self
.
assertContains
(
resp
,
shown_item
.
name
)
self
.
assertContains
(
resp
,
no_bargain_item
.
name
)
self
.
assertNotContains
(
resp
,
hidden_item
.
name
)
self
.
assert
Not
Contains
(
resp
,
"prix cotisant"
)
self
.
assertContains
(
resp
,
"prix cotisant
:
"
)
# Logged in, not contributor
self
.
client
.
force_login
(
self
.
user
)
...
...
@@ -574,3 +574,4 @@ class DeliveryViewTest(PaymentTestCase, OrderItemTestCase):
self
.
assertEqual
(
qs
.
count
(),
3
)
self
.
assertIn
(
paid_ordered_partial_oi
,
qs
.
all
())
self
.
assertIn
(
paid_ordered_undelivered_oi
,
qs
.
all
())
self
.
assertIn
(
paid_ordered_delivered_oi
,
qs
.
all
())
boutique/views.py
View file @
6b70e76a
...
...
@@ -212,7 +212,7 @@ class ItemManageView(PermissionRequiredMixin, ListView):
template_name
=
"boutique/item_manage.html"
permission_required
=
"boutique.management"
def
options
(
self
,
request
:
HttpRequest
,
*
args
,
**
kwargs
)
->
JsonResponse
:
def
post
(
self
,
request
:
HttpRequest
,
*
args
,
**
kwargs
)
->
JsonResponse
:
req
=
json
.
loads
(
request
.
read
().
decode
())
pk
=
req
.
get
(
"id"
)
...
...
Write
Preview
Supports
Markdown
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