Ask coding questions

← Back to all posts
Why does django dosen't get this path
Flyingcrabs (29)

Why does Django don't get this path

Answered by ch1ck3n (2054) [earned 5 cycles]
View Answer
ch1ck3n (2054)

change line 20 to
path('mainclass', include('main.urls')),

Flyingcrabs (29)

Thx can you explain why? @ch1ck3n

Flyingcrabs (29)

It is still getting the error looks like main is not a module @ch1ck3n

Flyingcrabs (29)

Is it because there is not file named index in template @ch1ck3n

Flyingcrabs (29)

Never mind i found out why

ch1ck3n (2054)

@Flyingcrabs if it's just .urls django doesn't know what URLs to import

so I made it so it imports from /mainclass