title: import models from another directory
body: <p>I'm new in Django.
  i am following a tutorial and now i have a problem .</p>
  <p><a href="https://i.stack.imgur.com/Ud6jh.png" rel="nofollow noreferrer">my directory tree is like</a></p>
  <p>and in /pages/views i have this</p>
  <pre><code>    from django.http import HttpResponse
      from django.shortcuts import render
      
      def home_view(*args, **kwargs):
          return &quot;&lt;h1&gt;Hello world&lt;/h1&gt;&quot;
  </code></pre>
  <p>and in trydjango/urls i have this</p>
  <pre><code>    from django.contrib import admin
      from django.urls import path
  
      from pages.views import home_view
  
      urlpatterns = [
          path('', home_view, name='home'),
          path('admin/', admin.site.urls),
      ]
  </code></pre>
  <p>***but it can't recognize pages ***
  i also tried these
  <a href="https://stackoverflow.com/questions/58049124/import-from-another-directory">solution</a>
  but didn't work!what do i missing?
  even i added these codes to settings.py</p>
  <pre><code>import os
  import sys
  BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
  sys.path.append(os.path.join(BASE_DIR, 'pages'))
  </code></pre>
  <p>{ django 3.1 }</p>