Multilevel Inner Nested Rest Api

2020-09-24 Thread Telescope Tamizha - டெலஸ்கோப் தமிழா
Hi guys am new to django field .I have a task to complete. The requirement, 1) I have 5 models each model should be inner nested with another model 2) I need to perform all CRUD operations by using the Rest API tool I will provide my code here , please help me to short out this issu

Re: Returning subset of fields after POST

2020-09-24 Thread Stats Student
Thanks very much. On Fri, Sep 18, 2020 at 4:32 AM mohammad moghadas wrote: > > You can restrain that fields by including in `write_only` fields in Info > inner class > > On Friday, September 18, 2020 at 3:44:48 AM UTC+4:30 yezile...@gmail.com > wrote: >> >> Check out >> https://github.com/yezy

Re: Digest for django-rest-framework@googlegroups.com - 3 updates in 2 topics

2020-09-24 Thread Pradyum Gupta
Thank you for your kind reply @naveenkumar...@gmail.com. Here is the way that we found to solve this issue. Company App > models.py ```python3 country = models.ForeignKey('login.Country', on_delete=models.SET_NULL,

Re: Attribute Error in Django model Foreign Key

2020-09-24 Thread naveen Kumar
i thinks it will be helpful if you place screenshots of you project file structure as you mentioned along with models, so that people can easily trace out the issue. On Thu, Sep 24, 2020 at 2:30 PM Pradyum Gupta wrote: > In My Django Project, there are two apps: Login and Company > > > > Th

Attribute Error in Django model Foreign Key

2020-09-24 Thread Pradyum Gupta
In My Django Project, there are two apps: Login and Company The **error that am receiving** in this is ```python AttributeError: module 'login.models' has no attribute 'Country' ``` *Company App* > models.py ```python from django.db import models from login import models as LM class CompanyProfi

Re: Create an invitation link using django rest framework?

2020-09-24 Thread Pradyum Gupta
Thank you @Naveen Kumar and @Matemática A3K Will try both the options. Regards Pradyum On Wed, Sep 23, 2020 at 12:12 PM naveen Kumar wrote: > class TokenGenerator(PasswordResetTokenGenerator): > > def _make_hash_value(self, user, timestamp): > return ( > six.text_type(user.