Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
ecommerce
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
0
Merge Requests
0
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
edx
ecommerce
Commits
6f75bd05
Commit
6f75bd05
authored
May 21, 2015
by
Clinton Blackburn
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #110 from edx/csrftoken-fix
Updated CSRF cookie name in JS
parents
233d71b9
d8a315f5
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
11 deletions
+11
-11
ecommerce/settings/base.py
+9
-0
ecommerce/settings/local.py
+0
-9
ecommerce/static/oscar/js/order_list.js
+1
-1
ecommerce/static/oscar/js/refund_list.js
+1
-1
No files found.
ecommerce/settings/base.py
View file @
6f75bd05
...
@@ -399,3 +399,12 @@ REST_FRAMEWORK = {
...
@@ -399,3 +399,12 @@ REST_FRAMEWORK = {
# Resolving deprecation warning
# Resolving deprecation warning
TEST_RUNNER
=
'django.test.runner.DiscoverRunner'
TEST_RUNNER
=
'django.test.runner.DiscoverRunner'
# COOKIE CONFIGURATION
# The purpose of customizing the cookie names is to avoid conflicts when
# multiple Django services are running behind the same hostname.
# Detailed information at: https://docs.djangoproject.com/en/dev/ref/settings/
SESSION_COOKIE_NAME
=
'ecommerce_sessionid'
CSRF_COOKIE_NAME
=
'ecommerce_csrftoken'
LANGUAGE_COOKIE_NAME
=
'ecommerce_language'
# END COOKIE CONFIGURATION
ecommerce/settings/local.py
View file @
6f75bd05
...
@@ -16,15 +16,6 @@ DEBUG = True
...
@@ -16,15 +16,6 @@ DEBUG = True
TEMPLATE_DEBUG
=
DEBUG
TEMPLATE_DEBUG
=
DEBUG
# END DEBUG CONFIGURATION
# END DEBUG CONFIGURATION
# COOKIE CONFIGURATION
# The purpose of customizing the cookie names is to avoid conflicts when
# multiple Django services are running behind the same hostname.
# Detailed information at: https://docs.djangoproject.com/en/dev/ref/settings/
SESSION_COOKIE_NAME
=
'ecommerce_sessionid'
CSRF_COOKIE_NAME
=
'ecommerce_csrftoken'
LANGUAGE_COOKIE_NAME
=
'ecommerce_language'
# END COOKIE CONFIGURATION
# EMAIL CONFIGURATION
# EMAIL CONFIGURATION
# See: https://docs.djangoproject.com/en/dev/ref/settings/#email-backend
# See: https://docs.djangoproject.com/en/dev/ref/settings/#email-backend
EMAIL_BACKEND
=
'django.core.mail.backends.console.EmailBackend'
EMAIL_BACKEND
=
'django.core.mail.backends.console.EmailBackend'
...
...
ecommerce/static/oscar/js/order_list.js
View file @
6f75bd05
...
@@ -12,7 +12,7 @@ $(document).ready(function () {
...
@@ -12,7 +12,7 @@ $(document).ready(function () {
$
.
ajax
({
$
.
ajax
({
url
:
'/api/v2/orders/'
+
order_number
+
'/fulfill/'
,
url
:
'/api/v2/orders/'
+
order_number
+
'/fulfill/'
,
method
:
'PUT'
,
method
:
'PUT'
,
headers
:
{
'X-CSRFToken'
:
$
.
cookie
(
'csrftoken'
)}
headers
:
{
'X-CSRFToken'
:
$
.
cookie
(
'
ecommerce_
csrftoken'
)}
}).
success
(
function
(
data
)
{
}).
success
(
function
(
data
)
{
$
(
'tr[data-order-number='
+
order_number
+
'] .order-status'
).
text
(
data
.
status
);
$
(
'tr[data-order-number='
+
order_number
+
'] .order-status'
).
text
(
data
.
status
);
addMessage
(
'alert-success'
,
'icon-check-sign'
,
'Order '
+
order_number
+
' has been fulfilled.'
);
addMessage
(
'alert-success'
,
'icon-check-sign'
,
'Order '
+
order_number
+
' has been fulfilled.'
);
...
...
ecommerce/static/oscar/js/refund_list.js
View file @
6f75bd05
...
@@ -16,7 +16,7 @@ $(document).ready(function () {
...
@@ -16,7 +16,7 @@ $(document).ready(function () {
url
:
'/api/v2/refunds/'
+
refund_id
+
'/process/'
,
url
:
'/api/v2/refunds/'
+
refund_id
+
'/process/'
,
data
:
{
action
:
decision
},
data
:
{
action
:
decision
},
method
:
'PUT'
,
method
:
'PUT'
,
headers
:
{
'X-CSRFToken'
:
$
.
cookie
(
'csrftoken'
)}
headers
:
{
'X-CSRFToken'
:
$
.
cookie
(
'
ecommerce_
csrftoken'
)}
}).
success
(
function
(
data
)
{
}).
success
(
function
(
data
)
{
$
(
'tr[data-refund-id='
+
refund_id
+
'] .refund-status'
).
text
(
data
.
status
);
$
(
'tr[data-refund-id='
+
refund_id
+
'] .refund-status'
).
text
(
data
.
status
);
addMessage
(
'alert-success'
,
'icon-check-sign'
,
'Refund #'
+
refund_id
+
' has been processed.'
);
addMessage
(
'alert-success'
,
'icon-check-sign'
,
'Refund #'
+
refund_id
+
' has been processed.'
);
...
...
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