Generating the response for `get_list` - Deepstash

Generating the response for `get_list`

The following actions will be done when calling the get_list:

  1. All the available objects are fetched via `Resource.obj_get_list`
  2. Objects are sorted via `Resource.apply_sorting` and paginated with the built-in Paginator
  3. the data will be dehydrated, meaning Tastypie will keep only the allowed fields
  4. `Resource.create_response` is called, which serializes the data in the proper format and returns a HttpResponse object with the data

Observation: For POST/PUT, there will be an extra step, the hydrate cycle, that will take the request payload and convert it in raw data, for DB storage

1

11 reads

CURATED FROM

IDEAS CURATED BY

teni

Normal person with peculiar dreams @unkl's protégé @cristianmezei's disciple

My takes after reading the Tastypie documentation, regarding how a request is handled inside an endpoint

The idea is part of this collection:

Machine Learning With Google

Learn more about computerscience with this collection

Understanding machine learning models

Improving data analysis and decision-making

How Google uses logic in machine learning

Related collections

Read & Learn

20x Faster

without
deepstash

with
deepstash

with

deepstash

Personalized microlearning

100+ Learning Journeys

Access to 200,000+ ideas

Access to the mobile app

Unlimited idea saving

Unlimited history

Unlimited listening to ideas

Downloading & offline access

Supercharge your mind with one idea per day

Enter your email and spend 1 minute every day to learn something new.

Email

I agree to receive email updates