title: How to fix 'attempted relative error' in my urls.py
body: <p>project
   a
    urls.py
   b
    views.py </p>
  
  <p>The case is like this.
  I am not being able to import the function from views.py in urls.py. It shows the error attempted relative import beyond top-level package.</p>
  
  <pre><code>from django.contrib import admin
  
  from django.urls import path
  
  from ..b.views import function
  
  
  urlpatterns = [
      path('admin/', admin.site.urls),
      path('function/', function),]
  </code></pre>
  
  <p>from ..b.views import function
  ValueError: attempted relative import beyond top-level package</p>