Hello!
As my initial understanding, you are attempting to use some sort of Django
REST Framework.
Check the django-rest-framework documentation for some insights:
http://www.django-rest-framework.org/api-guide/serializers/
You will need to overwrite the .create method of the Patient Model and th
Hi,
I have two models (Patients and PatientAddress). I want to create a new
patient using POST method and data should be inserted in Patient and
PatientAddress tables. But the data is inserted only into Patients table
and not in PatientAddress table.
When I POST a new patient with Address then
https://docs.djangoproject.com/en/1.11/topics/signals/
On Mon, Oct 23, 2017 at 8:22 PM, mohammad k wrote:
> you can use model signals
>
>
> On Mon, Oct 23, 2017 at 4:15 PM, Mukul Mantosh
> wrote:
>
>> I have two models (User and Employee). I want to create a new user and
>> make a reference be
you can use model signals
On Mon, Oct 23, 2017 at 4:15 PM, Mukul Mantosh
wrote:
> I have two models (User and Employee). I want to create a new user and
> make a reference between employee and user.
>
>
> *User Table*
> 1. Name
> 2. E-Mail
> 3. Date of Birth
> 4. Contact Number
>
>
> *Employee
I have two models (User and Employee). I want to create a new user and make
a reference between employee and user.
*User Table*
1. Name
2. E-Mail
3. Date of Birth
4. Contact Number
*Employee Table*
1. EmployeeID
2. Address
3. Country
4. Profile Photo
5. *user_id*
*Problem Statement: *When
5 matches
Mail list logo