Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7611723
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T01:43:59+00:00 2026-05-31T01:43:59+00:00

By default, when using django-tastypie and fetching a resource list, the response is of

  • 0

By default, when using django-tastypie and fetching a resource list, the response is of the format:

{
    "meta": {
        "limit": 20,
        "next": null,
        "offset": 0,
        "previous": null,
        "total_count": 3
    },
    "objects": [{
        "body": "Welcome to my blog!",
        "id": "1",
        "pub_date": "2011-05-20T00:46:38",
        "resource_uri": "/api/v1/entry/1/",
        "slug": "first-post",
        "title": "First Post",
        "user": "/api/v1/user/1/"
    },
    ...
    ]
}

I’ve dug into the documentation and looked & looked, but I can’t seem to find any kind of meta option or setting to change the “objects” key to actually describe the returned items. For example, let’s say I have list of locations in one api call and a list of people in another. I’d like to be able to differentiate the key to “locations” and “people”. The real reason for this is because I’m using RestKit on iOS and want to be able to set up multiple mappings.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T01:44:01+00:00Added an answer on May 31, 2026 at 1:44 am

    The Resource hooks alter_* can be used to alter the structure of the data.

    An example Resource using ‘locations’ would be:

    class MyLocationsResource(ModelResource):
        def alter_list_data_to_serialize(self, request, data):
            data['locations'] = data['objects']
            del data['objects']
            return data
    
        def alter_deserialized_list_data(self, request, data):
            data['objects'] = data['locations']
            del data['locations']
            return data
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I implemented a simple sitemap class using Django's default sitemap application. As it was
I am using django-haystack for search. By default it is showing oldest objects first
By default, when a form is created in django using ModelForm, the labels for
I am using the django default pagination but I am concerned about its efficiency.I
I need to perform case-insensitive queries on username by default when using the Django
I am using Django's default authentication system to run my website. So whenever a
I'm trying to determine the current paper type selection on the default printer using
Even using the default test code on my app I can't get this working.
im using a Default.png file for my iPad-app. It appears correctly but i could'nt
I am using their default POS tagging and default tokenization..and it seems sufficient. I'd

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.