Questions tagged [tastypie]

Tastypie is a reusable Django App and is suitable for providing an API to any application without having to modify the sources of that app.

Tastypie is a reusable Django App and is suitable for providing a REST API to any application without having to modify the sources of that app.

1634 questions
0
votes
0 answers

Tastypie query limit

Is there any way to handle query per user limitations with tastypie API library ? I would like for example to limit all users to 200 queries per day. I looked all over the documentation and only found how to handle query results ranges…
Mibou
  • 826
  • 2
  • 13
  • 22
0
votes
3 answers

Return just single object (detail) instead of list

I have a UserResource defined as: class UserResource(ModelResource): class Meta: queryset = User.objects.all() resource_name = 'user' …
Marin
  • 1,269
  • 15
  • 34
0
votes
1 answer

Ember.js belongsTo relationship undefined but hasMany array populated

Using ember-data with Django REST adapter. Having trouble setting content of controllers based on the model received's relationships in setupController hooks I put break points in and they went in this…
ilovett
  • 2,734
  • 25
  • 35
0
votes
1 answer

Not able to expose 'auth_user_groups' table in Tastypie UserResource

I have been struggling to find out if there is way to expose the 'auth_user_groups' table in my UserResource Tastypie modelResource. I am able to get the Groups and Users, but not sure how to show the Groups that a User is assigned to within my…
bevinlorenzo
  • 446
  • 6
  • 18
0
votes
1 answer

Accessing model subclass attributes with django tastypie

I have a model that is sublcassed class Foo(models.Model): name = models.CharField(max_length=255) child_model = models.CharField(max_length=255) class Bar(Foo): woots = models.ManyToManyField(Woot) class Woot(models.Model): color…
KrisF
  • 1,271
  • 11
  • 26
0
votes
1 answer

Django-Tastypie custom paginator

I've created my own Resource on my Django-Tastypie API. I've been implementing some rest operations and now i would like to implement my custom paginator, that will generate next/prev values based on a "key" passed by url. The problem is: if i pass…
David R
  • 289
  • 1
  • 5
  • 15
0
votes
1 answer

404 not found on tastypie resource's POST method

I am facing a really strange problem with django-tastypie. Well, this is a bit over complicated so let me start off with the tech stack of my application. Tech Stack django - Version 1.4.1 django-tastypie - Version 0.9.11 angularjs - Version…
Amyth
  • 30,315
  • 25
  • 83
  • 129
0
votes
1 answer

how to query a set of random entries tastypie

I have events module .my user favroite some of random events from listing . i will store them in favroite table of my database id module 1 events 5 events 9 events 2 business now , my question how can i make a query to fetch…
sundar nataraj
  • 7,699
  • 1
  • 29
  • 42
0
votes
2 answers

PUT request in Tasty PIE to update using non PK value

I am using Tasty Pie to create Services. I have applied filtering so that it searches based on non PK value: My api.py file : class TestResource(ModelResource): class Meta: queryset = ack_dadc.objects.all() authorization = Authorization() …
swe
  • 143
  • 3
  • 11
0
votes
1 answer

Django-tastypie: how to ModelResource programmatically?

I have created a number of Django-tastypie resource definitions in resources.py. Most of them will be created by posting from javascript side (backbone-tastypie), but some of them I would like to be able to create right from python code/django…
AlexA
  • 3,838
  • 8
  • 47
  • 83
0
votes
1 answer

Backbone.js results of fetch doubling

I am trying to use Django and tastypie with backbone.js and mustache. I have set up an example to study those. When using the below code I get results of users doubling as: -Id User name -1 yol -2 dada -1 yol -2 dada --- MY CODE --- // I…
ratata
  • 1,081
  • 12
  • 34
0
votes
2 answers

how to get current logged in user resource with django-tastypie

I am using backbone.js with django and i would like to right after the initial request to my application / get the current logged in user. I do have a UserResource set up so i can make an api call api/v1/user/id but that means i have to know the id…
Warz
  • 6,588
  • 14
  • 64
  • 114
0
votes
0 answers

TastyPie Nested POST failing to add objects - NoneType has no attribute error

I have a very simple nested model. class Game(models.Model): name = models.CharField(max_length=200) description = models.TextField() user = models.ForeignKey(User) class Activity(models.Model): game = models.ForeignKey(Game, related_name…
Joshua
  • 709
  • 2
  • 10
  • 23
0
votes
1 answer

How to define external database url in api.py of django-tastypie?

I don't know how to define a url to my external database (a couch database) in the Resource. I have this: class…
David R
  • 289
  • 1
  • 5
  • 15
0
votes
1 answer

Creating a dynamic ORM resource in tastypie

I'm looking to create a dynamic resource in tastypie. Basically the idea is that there are a lot of models to hook up, so this may help save time with the standard no-frills resources. I have most of this working, however I'm having trouble with…
svkai
  • 1
  • 2
1 2 3
99
100