Hello.,
I have some difficulties to understand and make working my first Django app, and thew problems started when I tried to configure the urlpartterns.
I wonder if I created my project, my application at the right level.
First I created a folder.
Into that folder, I create an virtual environementvirtualenv env-console
I went to my environemnt
sourve env-console/bin/activate and I installed django.
Ithen created a project django-admin startproject pjtconsole
and I created an application name appconsole
I wonder why appconsole is at the same level than pjtconsole
An application “belong” to a project. Appconsole should not be a child of pjtconsole?
The tree below, seems to be coherent?
If yes, how can I configure url
path('/', appconsole.views.index.page)
and if the urlpattern does not exist, which URL can show the view page?
Thanks
(env-console) pierrot@ubuntu1:~/ecosensors$ tree -L 2
.
├── appconsole
│ ├── admin.py
│ ├── apps.py
│ ├── __init__.py
│ ├── migrations
│ ├── models.py
│ ├── tests.py
│ ├── views
│ └── views.py
├── db.sqlite3
├── env-console
│ ├── bin
│ ├── lib
│ └── pyvenv.cfg
├── manage.py
├── pjtconsole
│ ├── asgi.py
│ ├── __init__.py
│ ├── __pycache__
│ ├── settings.py
│ ├── urls.py
│ └── wsgi.py
└── README.md