Re: Filtering a field list or disabling the HTML form in the browsable API

2019-01-30 Thread Carlton Gibson
> On 31 Jan 2019, at 08:22, Jayen wrote: > > Should I have separate views for the two types of users? Argh! 🙂 It depends… — there’s so many things to consider. It’d be simpler. But it would affect your URL structure. And so on… If the issue if just the Browsable API, I’d think about using r

Re: Filtering a field list or disabling the HTML form in the browsable API

2019-01-30 Thread Jayen
Thanks Carlton, My head was stuck in ViewSets and I hadn't considered that I don't really have a Set. I will investigate CreateAPIView. Some users will have access to the whole CRUD set, and some will have create only. Should I have separate views for the two types of users? Thanks, Jayen On

Re: Filtering a field list or disabling the HTML form in the browsable API

2019-01-30 Thread Carlton Gibson
Hi Jayen. > On 31 Jan 2019, at 07:12, Jayen Jayen wrote: > > I have a model for which I only allow POST requests for some users (no GET or > other method). I am using `viewsets.ModelViewSet` and > `serializers.HyperlinkedModelSerializer`. There’s many things that could be going on but, why

Filtering a field list or disabling the HTML form in the browsable API

2019-01-30 Thread Jayen Jayen
I have a model for which I only allow POST requests for some users (no GET or other method). I am using `viewsets.ModelViewSet` and `serializers.HyperlinkedModelSerializer`. With my own simple custom permission class, I have been able to achieve this by implementing `has_permission`. On the

Special case for when OneToOneField is also primary key

2019-01-30 Thread Carl Marshall
Hello all, Looking for a spot of help with what seems like a bug in the way DRF handles OneToOneFields that are primary keys. The content here if from my postings in https://github.com/encode/django-rest-framework/pull/5192 I think I may have found another related edge case here. I'm being fa

Re: Documentation for earlier version of DRF 3.X

2019-01-30 Thread ankGT
Thank you soo much! It worked. Regards, Ankur On Wednesday, January 30, 2019 at 5:09:27 PM UTC+5:30, Xavier Ordoquy wrote: > > Hi, > > You will need to: > - checkout the tag > - installing the dependencies found in > requirements/requirements-documentation.txt and > requirements/requirements-te

Re: Documentation for earlier version of DRF 3.X

2019-01-30 Thread Xavier Ordoquy
Hi, You will need to: - checkout the tag - installing the dependencies found in requirements/requirements-documentation.txt and requirements/requirements-testing.txt - generate the documentation with mkdocs build Regards, Xavier O. > Le 30 janv. 2019 à 12:29, ankGT a écrit : > > I understand

Documentation for earlier version of DRF 3.X

2019-01-30 Thread ankGT
I understand that the current version of DRF is at 3.9. However, I am still using version 3.7.7, and would like to view the documentation from this version. How can I do this? Normally for other projects theres a way to switch between versions, but for the life of me I cannot find this here. A