Hi there,
I try to use built-in interactive API documentation of rest framework. When
I check the documentation, it creates some extra services even that
endpoint does not exist. You can see an example in the screen shots. It
puts extra {format} parameter for each endpoint and makes it look like
What is the best way to use a HyperlinkedModelSerializer with a
OneToOneField?
I have two models (A, B)
A and B have a one-to-one association.
Model B use's the A_id as it's own primary key value, which is the default
setting.
I'm able to create records for resource A, but when I attempt to c
Hi.
You're using table inheritance which by default is like one way road.
In Question model there exists two reverse relations to your child models.
You just need to test which one is set.
If you truly want abstract base class (which changes model layouts as well)
you need to make Question model
You have to make additional queries since you are using concrete
inheritance from your "base" model class.
It might be a little heavy weight for just that one need, but Django
polymorphic handles this transparently for you. It is usually my go-to when
polymorphic models simplify my work.
If you'r
Hi there,
I have some classes in my model.py file shown below. I would like my API to
return a list of questions showing the slug, title and question_type of
each question. Fetching the slug and title is trivial, but I cannot for the
life of me access the question_type of a question because it
Thanks for the reply! I ended up forking the DRF repo and commenting out
the lines causing me trouble...
As for the prevention of upgrading, I don't entirely understand it myself
but my boss has said that it would be a few months working changing over to
Markdown 3.
We have built an extension
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