Tag: django

57 votes
10 answers
1.9K views
How can I temporarily disable a foreign key constraint in MySQL?

Is it possible to temporarily disable constraints in MySQL? I have two Django models, each with a foreign key

avatar
Hildegard
0 1 0 9
asked 07 September, 2021
56 votes
6 answers
731 views
How to send a correct authorization header for basic authentication

I am trying to POST data from my API but I can't pass the basic authentication. I try: $.ajax({ type: &

avatar
Kristopher
0 1 0 9
asked 07 September, 2021
65 votes
5 answers
1.9K views
Can I detect if my code is running on cPython or Jython?

I'm working on a small django project that will be deployed in a servlet container later. But development

avatar
Denese
0 1 0 9
asked 07 September, 2021
64 votes
14 answers
1.7K views
NumPy array is not JSON serializable

After creating a NumPy array, and saving it as a Django context variable, I receive the following error when l

avatar
Dorinda
0 1 0 9
asked 07 September, 2021
60 votes
10 answers
2K views
CORS: Cannot use wildcard in Access-Control-Allow-Origin when credentials flag is true

I have a setup involving Frontend server (Node.js, domain: localhost:3000) <---> Backend (Django, Ajax,

avatar
Brianne
0 1 0 9
asked 07 September, 2021