Skip to content

Tag: django

Calling an External API That Fails Randomly

I am using Django server to call a Korean government’s weather API to retrieve weather data for around 1800 locations. However, this weather API results in time out most of the time. I tried giving resting periods. For example, for every request, it will sleep for 0.8 seconds and after every 30 requests…

parse json object in django view

I have a form than i need to check if the emails on my form are valid or not here is my ajax code : and this is my code in django view: it raises this error : TypeError: the JSON object must be str, bytes or bytearray, not ‘NoneType’ thanks in advance Answer TypeError: the JSON object must be

Django form: phone field not showing

I would like to create a contact form on my Django website. For now, this is my code: models.py: forms.py: views.py: html: I of course installed phonenumber_field and added it in settings.py This is the result, phone field missing: Any help is hugely appreciated! Thanks for your time. Answer You used a model …