Q:

Django, error importing view from another app

I'm trying to import a view from one app to another in my project.
When using this:
from ..from ..KnownLocation.views import KnownLocationView

I get the following error:
ValueError: attempted relative import beyond top-level package

When trying to use:
from triangulationapi.KnownLocation.views import KnownLocationView

It's raising the following error.
ModuleNotFoundError: No module named 'triangulationapi.KnownLocation'

my Project tree:
├── find_second_gdt
│   ├── admin.py
│   ├── apps.py
│   ├── __init__.py
│   ├── migrations
│   ├── models.py
│   ├── __pycache__
│   ├── second_GDT_finding
│   ├── serializers.py
│   ├── tests.py
│   ├── urls.py
│   └── views.py
├── __init__.py
├── KnownLocation
│   ├── admin.py
│   ├── apps.py
│   ├── __init__.py
│   ├── migrations
│   ├── models.py
│   ├── __pycache__
│   ├── serializers.py
│   ├── tests.py
│   ├── urls.py
│   └── views.py
├── manage.py
├── requirements.txt.
└── triangulationapi
    ├── asgi.py
    ├── __init__.py
    ├── __pycache__
    ├── settings.py
    ├── urls.py
    └── wsgi.py

And, what's the diffrence between using .. and project.app.view...
I thought it is the same up until now.

A:

Try this:
from .KnownLocation.views import KnownLocationView

