Re: Markdown is optional but my project already has Markdown 2.6 installed, get prepocessor error.

2019-09-18 Thread Ryan Kilby
The compat code is executed at import time, so there's no trivial way to override this. If you can't upgrade Markdown, then you'll need to downgrade to DRF 3.9.x Out of curiosity, what's preventing you from upgrading to Markdown 3.x? On Tuesday, September 17, 2019 at 2:42:18 PM UTC-7, Courtney

Re: ChoiceField deserialization behavior

2019-08-07 Thread Ryan Kilby
For anyone finding this after the fact, this has been answered in the PR. https://github.com/encode/django-rest-framework/pull/6854 On Friday, August 2, 2019 at 12:07:46 PM UTC-7, Owen Niles wrote: > > I have written the following code in the Django shell: > > from rest_framework import serialize

Re: Advice on disabling validators for Nested serializers

2018-08-17 Thread Ryan Kilby
heck for IPs when being used as a nested serializer in IPGroups. > > On Friday, 17 August 2018 11:31:26 UTC-7, Ryan Kilby wrote: >> >> Hi Arjun, >> >> It would be helpful to see the actual stack trace associated with the >> error. >> >> On Thu

Re: Advice on disabling validators for Nested serializers

2018-08-17 Thread Ryan Kilby
Hi Arjun, It would be helpful to see the actual stack trace associated with the error. On Thursday, August 16, 2018 at 12:02:02 PM UTC-7, Arjun Nambiar wrote: > > My models.py > > from django.db import models > from netfields import InetAddressField, CidrAddressField, NetManager > > class IP(mo

Re: How to change input field name in serializer

2017-09-29 Thread Ryan Kilby
Hi Glenn, You can make use of the `write_only` and `read_only` field arguments, in addition to `source`. eg, you should be able to do: class StorySerializer(serializers.ModelSerializer): post_content = serializers.CharField(write_only=True, source='content') content = serializers.CharFie