How do I use a template from one app in another app

Currently trying to make a social application. I created two apps Main and posts. My post app will handle all functionality for creating, deleting a post, list of posts. My Main app is my homepage which would display all posts, for example similar to a facebook's homepage.

Currently trying to make a social application. I created two apps Main and posts. My post app will handle all functionality for creating, deleting a post, list of posts. My Main app is my homepage which would display all posts, for example similar to a facebook's homepage.

Main app currently authenticates users and what not. I created views and template for my posts app and I now want to include it on the Main's app homepage. Not sure how to go out about doing this. Not asking for anyone to write up the code but at least give a structure on how to achieve this.

Basic Structure of the app:

--Main_app
  --_views.py
  --templates
    --home.html
--posts_app
  --_views.py
  --templates
    --posts.html

One of the files my posts_app views contains currently is:

def posts_list(request):
    #return HttpResponse("<h1> List a posts. </h1>")
    render(requests, "posts.html", {})

templates/posts.html contains this file:

<!DOCTYPE html>
<html lang="en">
  <body>
    <h1>Posts template is working</h1>
  </body>
</html>

And in my main_app templates/html:

{% if user.is_authenticated %}
<h1>Homepage</h1>
<!-- Posts template -->
{% include "posts/templates/posts.html" %} 
{% endif %}

It made sense to me at the time to just import the template from the posts app to the main app and it would work. Did not work obviously, so I did a bit of research and couldn't find a definite solution, is there thing called templates inheritance, should import my views from posts into main. I'm not sure. Any help is appreciated.

Python Django Tutorial | Django Course

Python Django Tutorial | Django Course

🔥Intellipaat Django course: https://intellipaat.com/python-django-training/ 👉This Python Django tutorial will help you learn what is django web development &...

This Python Django tutorial will help you learn what is django web development & application, what is django and introduction to django framework, how to install django and start programming, how to create a django project and how to build django app. There is a short django project as well to master this python django framework.

Why should you watch this Django tutorial?

You can learn Django much faster than any other programming language and this Django tutorial helps you do just that. Our Django tutorial has been created with extensive inputs from the industry so that you can learn Django and apply it for real world scenarios.

Django

Well i used django ... i want to know after completing all the coding stuff, can i make all the codes online ?

Well i used django ... i want to know after completing all the coding stuff, can i make all the codes online ?

as Django give you a local host, i have a .com domain but can i integrate the codes to it so it works ?