On Mon, Oct 23, 2017 at 8:22 PM, mohammad k <k2527806@gmail.com> wrote:
you can use model signalsOn Mon, Oct 23, 2017 at 4:15 PM, Mukul Mantosh <mukulmantosh91@gmail.com> wrote:I have two models (User and Employee). I want to create a new user and make a reference between employee and user.--User Table1. Name2. E-Mail3. Date of Birth4. Contact NumberEmployee Table1. EmployeeID2. Address3. Country4. Profile Photo5. user_idProblem Statement: When i create a new user then automatically it should create a new record in employee table with user_id referencing to the user table and without writing two SQL Statements and should also follow the database transaction property(ACID).
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com .
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users .
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/124695ae-e1f1 .-4252-8bbb-272cb438243b%40goog legroups.com
For more options, visit https://groups.google.com/d/optout .
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CACOk0TzFTG128GL-3dxpKRkyS61F6e4euxgusm4MimXtJw_FEQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment