Monday, August 31, 2020

Re: Error configuring URLs for a beginner

Do you have a urls.py in your 'app' folder? (And app is a reserved keyword, it would be better if you use some other name to avoid confusion even later )

On Tue, 1 Sep 2020 at 04:29, Manal Helal <manalorama@gmail.com> wrote:
Hi

I am using Django to the first time and followed the tutorial in:

I changes the mysite and polls app to different project and app names, and followed the instructions 

I ended up with the following error when I run python manage.py runserver:

File "/home/me/website.com/project/project/urls.py", line 21, in <module>

    path('app/', include('app.urls')),

  ...

    urlconf_module = import_module(urlconf_module)

 ...

ModuleNotFoundError: No module named 'app.urls'


app is what is created by python3 manage.py startapp app

and project is what is created by python3 venv/bin/django-admin.py startproject project


can you please explain to me how to resolve? I am trying to read through different documentation of URL resolution and tried 

from app import views

or

from app import urls


and did not work. It seems I have a long way to get used to the directory structure and naming convention and appreciate a jump start please


thank you, 


Manal

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/f8b13b31-3eac-4bda-88f4-559256b67eafn%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAGyqUuXsBfv01e18Vey-__EhfBJ7T961p_xKUyhonDQiw2YVkw%40mail.gmail.com.

No comments:

Post a Comment