Skip to content

Tag: django

django manytomany field inseting empty data

model view serializers error: It means dependents is not inserting Here I am trying to send nested data for my dependents(ManyToManyField) But, Getting above error while inserting data. Is there any way we can achive this ? Above is the data i am sending using post method. please have a look Answer

Django: def save() in models.py

I’m trying to add the save-function inside my models.py, but it seems I’m doing something wrong. The user has to type the first- and last-name. Without him or her entering any more data, another field inside my models.py should be filled with a combination from these fields. models.py: Is this eve…

Passing an html element from anchor tag to django view

I would like to know how i can pass the html link element as a string into a django view and have the information rendered on that specific view. to be clear: I have this In html A django view rendered the items from a list and each item would ideally be clickable and the specific item would be passed