My model consists of 3 classes: Offer, Application, and Contract.
Relationships are as follows:
(1) Application to Offer: One to One
(2) Application to Contract: One to One
Is there a way for me to access Contract from Offer via Application in a
single REST call? I know how to access Appl
Has anyone successfully used DRF to make API calls using gte, lte, and
range? If so, what extension did you use? I've tried django-filters and
django-rest-framework-filters but neither work as stated. If someone can
share their code that would be much appreciated. Thanks.
--
You received this
I have the following code which doesn't work:
In models.py:
class Unit(models.Model):
unit_name = models.CharField(max_length=255)
In views.py:
class MultipleFieldLookupMixin(object):
"""
Apply this mixin to any view or viewset to get multiple field filtering
based on a `lookup_fields` attri
Any suggestions on what I should use to integrate RBAC with DRF? I have
taken a look at django-rest-framework-roles and django-guardian but neither
look too promising. Your feedback would be much appreciated. Thanks in
advance.
--
You received this message because you are subscribed to the Goo
Using Django OAuth Toolkit, I have authorization_grant_type set to password
and skip_authorization set to true. I am able to generate tokens and
refresh tokens using curl without an issue using the following command:
curl -X POST -d
"grant_type=password&username=username&password=password"
How do I obtain a token from Django OAuth Toolkit using my Django code
instead of via a call to curl? I've registered an application and have a
client ID/secret. Also, my authorization grant type is authorization-code
not password. All the example I have seen use password and changing
password
I have a Django app that is an API which uses DRF and another Django app
which uses DOT. I would like these to function as independent
micro-services and not be coupled in the same Django app. All the examples
I have seen point to DRF and DOT being coupled in the same Django app. Can
anyone she
I'm trying to create an OAuth server using the following instructions:
https://django-oauth-toolkit.readthedocs.io/en/latest/tutorial/tutorial_01.html
Where can I find the login template with path registration/login.html? Is
this a template I have to create inside directory /registration? The
i
Has anyone implemented multiple levels of nested relationships with DRF? If
so, did you use an extension for this purpose? I've investigated several
different options including DRF extensions but don't know which one will
work the best for multi-level nested relationships. Also, if you can share
key or other attribute. Is this possible
>>>> using filtering if URLs are being defined using routers?
>>>>
>>>> On Tue, Oct 30, 2018 at 8:23 AM Alan Crosswell >>> > wrote:
>>>>
>>>>> This seems like you are reinve
Thanks Jason. Now, the get_object function in class
MultipleFieldLookupMixin is actually being called but it's throwing an
error as follows:
if self.kwargs[field]: # Ignore empty fields.
KeyError: 'unit_name'
The ViewSet is defined as follows:
class UnitViewSet(CountModelMixin, MultipleFieldLo
I have the following code which doesn't work:
In models.py:
class Unit(models.Model):
unit_name = models.CharField(max_length=255)
In views.py
class MultipleFieldLookupMixin(object):"""
Apply this mixin to any view or viewset to get multiple field filtering
based on a `lookup_fields` attri
12 matches
Mail list logo