Error configuring URLs for a beginner

40 views
Skip to first unread message

Manal Helal

unread,
Aug 31, 2020, 6:59:41 PM8/31/20
to Django users
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

Arpana Mehta

unread,
Aug 31, 2020, 7:54:10 PM8/31/20
to django...@googlegroups.com
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 )

--
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...@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.
Reply all
Reply to author
Forward
0 new messages