Related
Facebook facebook Rahul Nama to contact I am creating a REST API using DRF (Django Rest Framework). The API just takes the user's twitter handle and returns their twitter data. Here, I'm not using a model here because it's not required. Should I be using a ser
Coderaemon: I am using Django Rest Framework . I want to serialize multiple models and send as response. Currently, only one model can be sent per view (as CartViewshown below, only Cart objects are sent). The following models (unrelated) can be there. class S
Coderaemon: I am using Django Rest Framework . I want to serialize multiple models and send as response. Currently, only one model can be sent per view (as CartViewshown below, only Cart objects are sent). The following models (unrelated) can be there. class S
Coderaemon I am using Django Rest Framework . I want to serialize multiple models and send as response. Currently I can only send one model per view (as CartViewbelow, only the Cart object). The following models (unrelated) can be there. class Ship_address(mod
Coderaemon: I am using Django Rest Framework . I want to serialize multiple models and send as response. Currently, only one model can be sent per view (as CartViewshown below, only Cart objects are sent). The following models (unrelated) can be there. class S
Farid El Nasire: I'm working on several endpoints that aggregate data. For example, one of the endpoints will return an array of objects, one for each day, and it will have the number of comments, likes, and photos posted by a particular user. The object has a
daveoncode I'm trying to figure out how to save related models using Django REST framework. In my app I have a model Recipewith 2 related models: RecipeIngredientand RecipeStep. An Recipeobject must have at least 3 related RecipeIngredientand 3 RecipeStep. Bef
Momokjaaaaa This is django and django rest framework. I have 2 models: User and Phone. first question: I want to be able to update user data (email) as well as phone data (phone number) in 1 api update response. Phone numbers can be 0 or many. Well, it's actua
Newt I have django models, simplified to: class Client(models.Model):
name = models.CharField(max_length=255)
def __str__(self):
return self.name
class ClientDetail(models.Model):
client = models.ForeignKey(Client, on_delete=models.CASCA
daveoncode I'm trying to figure out how to save related models using Django REST framework. In my app I have a model Recipewith 2 related models: RecipeIngredientand RecipeStep. An Recipeobject must have at least 3 related RecipeIngredientand 3 RecipeStep. Bef
bdex I'm having trouble serializing an intermediate "pivot" model and attaching it to each item in a "many-to-many" relationship in Django Rest Framework. example: models.py: class Member(models.Model):
name = models.CharField(max_length = 20)
groups =
Johan Khanye I'm using a simple DRF API and although I can access some models from the same application, I can't seem to access one of the many models from the admin site, please help! project/app/models.py looks like this: class ImportantModel(models.Model):
Rocky Quentin I am learning Django and Vuejs. I don't understand how it works. I have a "Nc" model which has some foreign keys to other models like Affaire. How can I get the instance 's str return value instead of the actual value in the JSON file... models.p
Rocky Quentin I am learning Django and Vuejs. I don't understand how it works. I have a "Nc" model which has some foreign keys to other models like Affaire. How can I get the instance 's str return value instead of the actual value in the JSON file... models.p
sonar ford I have a model in django, let's call it, which is referenced productby multiple purchaseinstances . Purchases can be made for any number of items product, subject to the following restrictions: The total of all items in all purchases for a given pro
Johan Khanye I'm using a simple DRF API and although I can access some models from the same application, I can't seem to access one of the many models from the admin site, please help! project/app/models.py looks like this: class ImportantModel(models.Model):
Rocky Quentin I am learning Django and Vuejs. I don't understand how it works. I have a "Nc" model which has some foreign keys to other models like Affaire. How can I get the instance 's str return value instead of the actual value in the JSON file... models.p
Ben2pop I'm very new to using REST frameworks and I didn't find in tutorials how to achieve what I'm looking for; In my serialiser.py I have a class for serializing MyUser model class MyUserSerializer(ModelSerializer):
class Meta:
model = MyUser
Farid El Nasire: I'm working on several endpoints that aggregate data. For example, one of the endpoints will return an array of objects, one for each day, and it will have the number of comments, likes, and photos posted by a particular user. The object has a
daveoncode I'm trying to figure out how to save related models using Django REST framework. In my app I have a model Recipewith 2 related models: RecipeIngredientand RecipeStep. An Recipeobject must have at least 3 related RecipeIngredientand 3 RecipeStep. Bef
Momokjaaaaa This is django and django rest framework. I have 2 models: User and Phone. first question: I want to be able to update user data (email) as well as phone data (phone number) in 1 api update response. Phone numbers can be 0 or many. Well, it's actua
DjangoNoob I have 3 tables PC(ID, PcNAME, Brand) , CellPhoness(ID, CellPhoneName, Brand) , Printers(ID, PrinterName, Brand) . There is no relationship between these three tables. I want to run a query where the user can enter a search string and the program wi
Momokjaaaaa This is django and django rest framework. I have 2 models: User and Phone. first question: I want to be able to update user data (email) as well as phone data (phone number) in 1 api update response. Phone numbers can be 0 or many. Well, it's actua
jelly Bean I created a simple html page that allows me to upload images and store them in a directory without using models. My goal is to use the REST API framework and display a specific image uploaded in the REST API, i.e. {"image": "uploaded_image_by_user"}
bdex I'm having trouble serializing an intermediate "pivot" model and attaching it to each item in a "many-to-many" relationship in Django Rest Framework. example: models.py: class Member(models.Model):
name = models.CharField(max_length = 20)
groups =
Newt I have django models, simplified to: class Client(models.Model):
name = models.CharField(max_length=255)
def __str__(self):
return self.name
class ClientDetail(models.Model):
client = models.ForeignKey(Client, on_delete=models.CASCA
jelly Bean I created a simple html page that allows me to upload images and store them in a directory without using models. My goal is to use the REST API framework and display a specific image uploaded in the REST API, i.e. {"image": "uploaded_image_by_user"}
Johan Khanye I'm using a simple DRF API and although I can access some models from the same application, I can't seem to access one of the many models from the admin site, please help! project/app/models.py looks like this: class ImportantModel(models.Model):
Rocky Quentin I am learning Django and Vuejs. I don't understand how it works. I have a "Nc" model which has some foreign keys to other models like Affaire. How can I get the instance 's str return value instead of the actual value in the JSON file... models.p