Skip to content

Tag: django

JSON POST and GET 404 (Not Found)

I am trying to create an API in Django but am receiving the following errors message in the JavaScript console. Does anyone know how to fix this problem? API url: path(“edit/<int:post_id>”, views.edit, name=”edit”) views.py JavaScript HTML I think something might be wrong in the …

Change object label on specific value in js

I’m working on charts in React.js and i want to display data sorted by month. In django i’ve created view for displaying json with total events per month and it looks like this: I would like to sort every object in that array and change value ‘month’ from numbers to month name, so it w…