Show substances in a nicer way
This commit is contained in:
@@ -65,14 +65,9 @@ class DrugDetail(LoginRequiredMixin, StaffMemberRequiredMixin, ObjectRead):
|
||||
detail_url_args = ["type", "pk"]
|
||||
|
||||
def get_object(self, **kwargs):
|
||||
print("GET")
|
||||
pk = kwargs.get("pk")
|
||||
info = Drug.objects.get(pk=pk)
|
||||
|
||||
# self.extra_context = {}
|
||||
print("info", info)
|
||||
# return dictionary
|
||||
return info.__dict__
|
||||
return info
|
||||
|
||||
|
||||
class DrugClear(LoginRequiredMixin, StaffMemberRequiredMixin, APIView):
|
||||
|
||||
Reference in New Issue
Block a user