Re: Pagination and Filtering

2017-02-02 Thread Thiago Mambretti
Xavier, My views are pretty simple! from __future__ import unicode_literals import django_filters from rest_framework import viewsets from .models import Country, State, City from .serializers import CountrySerializer, StateSerializer, CitySerializer class CountryViewSet(viewsets.ModelViewSet

Re: Pagination and Filtering

2017-02-02 Thread Xavier Ordoquy
This looks more like you’ve set a list for pagination class for that view. What does your view looks like ? Regards, Xavier Ordoquy, Linovia. > Le 2 févr. 2017 à 16:09, Thiago Mambretti a écrit : > > Sorry, > > The error I'm getting is the following: > > > Environment: > > Request Method: G

Pagination and Filtering

2017-02-02 Thread Thiago Mambretti
Hi all, Is it possible to use the default pagination backend along with the following filters? 'django_filters.rest_framework.DjangoFilterBackend', 'rest_framework.filters.SearchFilter', 'rest_framework.filters.OrderingFilter', I'm using a ModelViewSet and the API only when I have only the pag

Re: Pagination and Filtering

2017-02-02 Thread Xavier Ordoquy
Hi, I can’t think of a reason why they wouldn’t work in particular if the documentation doesn’t says otherwise. Any specific issue that makes you think they don’t ? Regards, Xavier Ordoquy, Linovia. > Le 2 févr. 2017 à 16:07, Thiago Mambretti > a écrit : > > Hi all

Re: Pagination and Filtering

2017-02-02 Thread Thiago Mambretti
Sorry, The error I'm getting is the following: Environment: Request Method: GET Request URL: http://192.168.1.208:8000/api/states/ Django Version: 1.10.5 Python Version: 2.7.6 Installed Applications: ['django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.cont

Re: @detail_route not displaying in browsable API

2017-02-02 Thread Nadav Kehati
If not support automatically by DRF, is there a *manual* way to add the action-url to the view? > > -- You received this message because you are subscribed to the Google Groups "Django REST framework" group. To unsubscribe from this group and stop receiving emails from it, send an email to dj

Re: @detail_route not displaying in browsable API

2017-02-02 Thread Marcos Dione
I was expecting the same thing this morning. I think it's really useful. On 2/1/17, Nadav Kehati wrote: > I am trying to add an action-link to the object's browsable API: > > class MyModelSerializer(serializers.HyperlinkedModelSerializer): > class Meta: > model = MyModel > fie