Skip to content

Django ajax: in call does not make any changes

So I made this ajax view for my user model I extends my user model with an Integerfield of notification, but when I call the ajax it does not give +1 to my notification model, does anybody know what is going on? my urls.py and my ajax call my user profile model Answer So, change url: Then, change the view

Drive API – Save file ID with Python

I´m triying to use Google Drive API quickstart to save all files ids with Python. I want to save files ids in a txt document This is my code I want to save all files ids,but my program is not working properly only saves the last file id What is happening? Answer Delete from (for items in items:) to (archivo.c…

Pip is selecting wrong path

I’m using windows 10 and I got rid of python 3.8 and installed 3.7 as the only python version on my system. When trying to install libraries using pip I now get the error: when I checked in the console which -a pip I got: Now when I look for Python in my variable path it is alright… Anyways I

how to merge similar observations by key attributes in json python

Im working with JSON in python, It new to me, and im trying to merge similar observations by key attributes. The JSON looks like this: I tried to create a list with unique observations using this: the output is: then I tried to look for that list values and to add to them the observations but for some reason,…