I have a model.py that link 3 Classes to a USER
class Organization_Information(models.Model):
Organization_name = models.CharField(max_length=25)
Organization_address = models.CharField(max_length=40)
Organization_admin = models.OneToOneField(MyUser, on_delete=models.CASCADE, null=True, blank=True)
class Project(models.Model):
project_name = models.CharField(max_length= 25, default='')
organisation_name = models.ForeignKey('Organization_Information', on_delete=models.CASCADE)
class Asset(models.Model):
asset_note = models.TextField(default='',)
project_name = models.ForeignKey('Project', on_delete=models.CASCADE)
Each Instance of a Class refer to the above, And the First Refer to the USER"MyUser" custom model.
I got Stuck on the View I tried re-reading it and figuring it out But I got Stuck.
Almost All the "walk-through" tutorial and explanation are old and invalid.
Using "Django==2.0.7 - Python3.6"
All I want is to display the model Fields into the Views.py and their child
for e.g: MyUser ID = 3, and The Organization_Information refer to it By the ID, I want to display all the Information from The User Information to the Assets Information to be viewed depending on the user ID when He/She Login.
I tried to user Query-set But it didn't work as desired is their any simple solution.
Thank you.