Q:

Getting inherited class fields django

I am creating a custom user and profile model for my django application. I have created a user model and another profile model with OneToOneField to user model.
I want to get profile model field values in template but only i can get object of user model in views from currently logged in user. How can I get profile model field values in the template ?
models.py
class UserSignup(models.Model):
    email = models.CharField(unique=True, max_length=254)
    name = models.CharField(max_length=100)
    password = models.CharField(max_length=1000)
    created_date = datetime.now()

    def __str__(self):
        return self.email

class UserProfile(models.Model):
    user = models.OneToOneField(UserSignup, on_delete=models.CASCADE)
    full_name = models.CharField(max_length=200, null=True)
    #photo = models.ImageField(upload_to="/user/image/", blank=True)
    birth_date = models.DateField(null=True)
    books_wrote = models.TextField(null=True)
    journal_wrote = models.TextField(null=True)
    address = models.TextField(max_length=2000, null=True)

    @receiver(post_save, sender=UserSignup)
    def update_user_profile(sender, instance, created, **kwargs):
        if created:
            UserProfile.objects.create(user=instance)

views.py
def user_profile(request):    
    op = UserSignup.objects.get(id=request.session['uid'])
    #here i want object of profile so i can access fields of profile in template
    return render(request, 'editor_profile.html', {'op': op})

template
<div class="panel-heading">
            <h3 class="panel-title">{{ op.name }}</h3>
        </div>

                <div class=" col-md-9 col-lg-9 ">
                    <table class="table table-user-information">
                        <tbody>
                        <tr>
                            <td>Full Name:</td>
                            <td>{{ op.full_name }}</td>
                        </tr>

                        </tbody>
                    </table>
                </div>
            </div>
        </div>

    </div>

A:

You could access the OneToOne related UserProfile model fields like,
{{ op.userprofile.full_name }}
{{ op.userprofile.birth_date }}

