Creating a movie page
Let's look at the steps:
- First, we will add the movie details path in
/moviereviews/urls.py
:… urlpatterns = [ path('admin/', admin.site.urls), path('', movieViews.home, name='home'), path('about/', movieViews.about, name='about'), path('signup/', movieViews.signup, name='signup'), path('news/', include('news.urls')), path('movie/', include('movie.urls')), ] …
path('movie/', include('movie.urls'))
will forward any requests with 'movie/'
to the movie app's urls.py
. We put all the paths related to the movie app in its own urls.py
– that is, /movie/urls.py
.
- So, let's create the
/movie/urls.py
file with the following code:from django...