I've been trying to make a custom class/type, defined in a separate db.py file, to be properly serialized as an int when doing a manage.py dumpdata command, but
I have a Cart model and Cartserializers. I am trying to do that is if cart defects exist in the cart and then update the cart by increasing the quantity of cart
In Models.py class Interview(models.Model): Current_Date = models.DateField(auto_now_add=True ) User = models.ForeignKey(User,
I have an application where I've two models both models have same fields client buyer I'm using separate models because client can also signs up as a buyer usin
I have been working on a project on django and it is very similar to instagram and twitter, one of the functions it needs to have is to mention users using "@"
Hello I'm new to django and I don't understand the following error: ValueError: Field 'id' expected a number but got 'Abidjan'. Here is the model code for more
should I be building a function to achieve what I am trying to do?
Lets have simple model: class NewModel(models.Model): json_data = models.JSONField(default=dict) Then lets get it: model = NewModel.objects.get(pk=1)
So , I am trying to make an register and login system . I want to customize it using the custom user model , where I can save my data and extend the model. I am
I want to have a default value in my django model response value Sample model query myModel.objects.filter().values("username", "user_gender") I want to have a
models.py def upload_org_logo(instance, filename): ts = calendar.timegm(time.gmtime()) filepath = f"Timesheet/org_logo/{ts}" if instance: b
If I want to describe some information such as ordering, if the model is proxy or abstract, which fields must be unique together, then I need to put this inform
Im novice and I didnt find solution for this problem. Im writing code for a blog. I have a model Post where I want to create field author which is ForeighKey to
can any one help me with assigning value to a foreign key field. Im trying to create user profile where user can add there countries. when creating the models,
Suppose I have an object: survey = Survey.objects.all().first() and I want to create a relationship between it and a group of objects: respondents = Respond
I am currently building a Django app that requires two different user types and I know that storing authentication information across multiple models/tables is
To display objects (members) in particular order, I have made a field, order: order = models.IntegerField(unique=True,null=True,blank=True) so that I can do an
I'm trying to replicate this model from here: https://github.com/Davidham3/ASTGCN/tree/master/model but when I try to run the model code in my colab import torc
I have a model named "Product" and it has an attribute like price, quantity, and remarks. Thru the models.py, if remarks has a property of "null=True", it will
How to retrieve the data from Django queryset for use in a variable When an output is received in below form after running the query <QuerySet [{'name': 'J