Re: how to write routers for the modelviewset based view function

2018-10-07 Thread Jun Ren
I solved it , thanks your reply. On Mon, Oct 8, 2018 at 1:36 AM Jason wrote: > Are you sure you have a record in the db with machine_code = 60? > > your model defines that field as a CharField, so using an integer in the > URL makes me suspect you're using a primary key, which is very different

Re: how to write routers for the modelviewset based view function

2018-10-07 Thread Jason
Are you sure you have a record in the db with machine_code = 60? your model defines that field as a CharField, so using an integer in the URL makes me suspect you're using a primary key, which is very different from the definition of get_queryset -- You received this message because you are