tastypie Questions

1

Solved

I have a tastypie resource for a model. I also have a view which comes up with a queryset which needs to be serialised and sent to client. I am looking for a way to let tastypie resource handle the...
Battlement asked 26/11, 2012 at 13:37

1

Solved

I'm using django-tastypie and I need to create classes like this from my django models: class MyModelResource(ModelResource): class Meta: queryset = MyModel.objects.all() allowed_methods = ['ge...
Cirrate asked 27/11, 2012 at 16:8

1

Solved

Tastypie returns an array, including nested resources as follows: data = [ {"adult_price": "123", "child_price": "123", "currency": [{"abbrev": "USD", "id": "1", "name": "US Dollars", "resource_u...
Yellowgreen asked 27/11, 2012 at 4:48

2

I am trying to get my api to give me the reverse relationship data with tastypie. I have two models, DocumentContainer, and DocumentEvent, they are related as: DocumentContainer has many Document...
Cletuscleve asked 19/11, 2012 at 21:34

2

I'm trying to deal with a very puzzling error in a Django app. When DEBUG=False, trying to delete a user (via user.delete()) gives this database error: DatabaseError: relation "social_auth_usersoc...
Willowwillowy asked 13/11, 2012 at 11:50

2

I will build an iOS application whose functionality will be based on access permissions provided by a Django REST application. Django manages the permissions for the activities in the iOS app. Use...
Hyperextension asked 29/9, 2011 at 2:19

1

Solved

In my Django model, I have 10 fields and there are 3 fields which are foreign keys. In my JSON data which is received from a GET request, I am getting all the fields but not the foreign keys. I ha...
Tameika asked 9/11, 2012 at 2:18

2

Solved

I use Django/Tastypie to manage my user collection. Is it possible to allow anonymous users to POST in the API (when creating a new user at some endpoint) and restrict authenticated users to GET o...
Aquiculture asked 24/10, 2012 at 14:40

2

Solved

I am creating an API with Tastypie and I want to access to the API from Backbone. To send credentials I use an user_id and a api_key. I do this in android and with curl and this work great, but I ...
Reinold asked 25/10, 2012 at 17:52

1

Solved

I'm quite new to Django & Tastypie. I would like to return only one of the objects from the query. I've tried almost everything and cannot seem to find the solution. Here is my code below: cla...
Curson asked 20/10, 2012 at 16:43

1

Solved

I want to grab some information from Foursquare , add some fields and return it via django-tastypie. UPDATE: def obj_get_list(self, request=None, **kwargs): near = '' if 'near' in request.GET a...
Joanniejoao asked 18/10, 2012 at 15:54

1

Solved

I'm still new to tastypie, but it seems like a really neat library. Unfortunately, I'm having some difficulties with it. I have two models, and two resources associated with those models: class C...
Sapajou asked 9/10, 2012 at 16:18

1

Solved

When I POST a new resource to my RESTful Tastypie API, I create a resource and get a 201 response like this: HTTP/1.1 201 CREATED Content-Type: text/html; charset=utf-8 Date: Wed, 19 Sep 2012 01:0...
Lansing asked 19/9, 2012 at 3:51

1

Solved

How does the Tastypie APIKey authentication work? I know there is a signal as mentioned in the documentation: from django.contrib.auth.models import User from django.db import models from tastyp...
Edson asked 18/9, 2012 at 21:7

1

Solved

Could anyone give a complete example on using the tastypie FileField, both server-side and client-side please? Here's what I have tried: #models.py class Foo(models.Model): img = models.ImageFie...
Lederhosen asked 12/9, 2012 at 3:59

1

Solved

Using django-tastypie v0.9.11 django 1.4.1 and geodjango. Before geodjango I used to save my lat and lng values straight into my model. Then when I'd call the API I'd just pull my values easily. S...
Ulterior asked 6/9, 2012 at 13:26

1

Solved

I am using Tastypie 0.9.11 and I want to have unauthenticated users be allowed read-only permissions to the API while on the same time, if a user authenticates with an API Key authentication, that ...
Innsbruck asked 3/9, 2012 at 13:33

3

Solved

Given the following code I was wondering how to populate RecordsResource with each real record data: models.py class Record(models.Model): content_type = models.ForeignKey(ContentType, editable=...
Helminthiasis asked 12/8, 2012 at 17:12

1

Solved

Let's assume we have these models, original project differs but this would be the common task: class Cart(models.Model): owner = models.ForeignKey(User) products = models.ManyToManyField(Product...
Puck asked 23/12, 2011 at 7:51

1

Solved

If I try to filter on a field in a related object then Tastypie returns an error. For example, running curl -H "Accept: application/json" \ "http://localhost:8080/wordgame/api/v1/rounds/?format=j...
Particiaparticipant asked 10/8, 2012 at 15:55

1

Solved

I have the following resource: class MyUserResource(resources.MongoEngineResource): class Meta: ... authentication = MyKeyAuthentication() authorization = ApiKeyAuthorization() def override...
Deepdyed asked 6/8, 2012 at 11:27

1

Solved

I'm trying to use Tastypie with ManyToMany relationships using intermediate models (through keyword) (https://docs.djangoproject.com/en/dev/topics/db/models/#extra-fields-on-many-to-many-relationsh...
Fraud asked 17/7, 2012 at 15:20

1

Solved

I was following the tastypie tutorial word for word until i reached the post part: http://django-tastypie.readthedocs.org/en/latest/interacting.html#creating-a-new-resource-post When i run this co...
Milldam asked 9/7, 2012 at 20:39

1

Solved

I keep getting a 401 response when I try to use authentication = ApiKeyAuthentication() in my ModelResource. I looked at Django Tastypie: How to Authenticate with API Key and he uses the get parame...
Insular asked 11/6, 2012 at 10:33

1

Solved

I am creating UserResource and UserProfileResource. When I create a new user I see that my userprofile database table is also being updated. Which is good. But when I GET the user I get an error sa...
Sillimanite asked 15/5, 2012 at 14:49

© 2022 - 2024 — McMap. All rights reserved.