[gotowebinar-reg key=”upcoming” timezone=”Australia/Sydney”]

This is test:

I’m using Django Rest Framework.

The model class is

class MyModel(models.Model):
       id = models.CharField(max_length=200)
       name = models.CharField(max_length=200)
       genre = models.CharField(max_length=200)

And what I have set up so far is that, when the user does a POST request, the backend will take the request data and run a python script (which takes some parameters from the request data) which will in turn return a list of IDs corresponding to the “id” in MyModel. But the problem is, let’s say I want to return only the ids that point to the model instances with genre “forensic”, how do I do that?

I don’t really have a clue how to do that, apart from doing a query on each id returned by the python script and filtering out the ones I want based on the genre returned from the query?


Event Details

Topic: Test Webex virtual meeting
Hosted By: Amanda Christe
Start: December 15, 2023, 2:03 pm
Current Timezone: Australia/Sydney