Hi All,
I am Employee model directly link with User model and Employee holds User 
ID and division from Division model.
Every employee holds single Division.

class Employee(models.Model):
    user = models.OneToOneField(User, on_delete=models.CASCADE)
    division = models.ForeignKey(
        Division,
   
      
    )

Now, I want to do following things:
1) Get current username /ID
2) Get Employee division ID/name
3) Display the other data based on Employee's division. [That particular 
Employee should be accessible to their own Division data only]

Someone help me to handle this one please.

Thank you in advance.

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/a536c1fb-6852-48f9-8476-463c696926a2%40googlegroups.com.

Reply via email to