In this part... This will be the last part of the Create a URL Shortener app with Python and Django Series and if you have not read the last two parts yet please read them before you read this part. PART 1 - https://blogofchamodh.blogspot.com/2022/07/create-url-shortener-app-with-python.html PART 2 - https://blogofchamodh.blogspot.com/2022/07/create-url-shortener-app-with-python-part2.html we have discussed how to set up our virtual environment and start the project and apps in part 1 and learned the logic and some important views in part 2. So it is vital to read them first. In this part, I will show you how to, Create the URL patterns Writing the template. Write the redirect view Create the URL patterns. To handle the URL requests we can create the URL patterns as shown below. from django . contrib import admin from django . urls import path from url_shortener import views urlpatterns = [ path ( 'admin/' , admin . site . urls ), ...
My experiments, discoveries & thoughts on Python, Js, HTML&CSS, Physics, Maths and Chemistry.