Тёмный

Python Django Multiple HTML Pages Configure Routing (urls.py) 

Haritha Computers & Technology
Подписаться 42 тыс.
Просмотров 30 тыс.
50% 1

#PythonDjango #HTMLPages #RoutingConfiguration
Topic : Python Django Multiple HTML Pages Configure Routing (urls.py)
Python Django: Configuring Routing for Multiple HTML Pages. Python Django is a powerful web framework that allows developers to build robust and scalable web applications. One of its key features is the ability to configure routing for multiple HTML pages, which enables efficient navigation and organization within the application. In this article, we will explore how to set up routing for multiple HTML pages in a Python Django project.
Routing in Django refers to the process of mapping URLs to views. By configuring routing, we can determine which view function or HTML template should be rendered for a specific URL. To get started, ensure that you have Django installed and a basic project structure set up.
First, create a new Django app within your project using the following command:
python manage.py startapp myapp
Next, define the URL patterns in the urls.py file of your Django app. This file acts as the central hub for routing. Within the urls.py file, you can specify the URL patterns and associate them with corresponding views or HTML templates.
To create additional routes, simply add more path() functions to the urlpatterns list. You can map URLs to either view functions or HTML templates, depending on your application's requirements.
Once you have defined the routing configuration, you can access the different HTML pages by navigating to their respective URLs. Django will handle the routing and render the appropriate view or template.
In conclusion, Python Django provides a straightforward and flexible way to configure routing for multiple HTML pages. By defining URL patterns in the urls.py file, you can map URLs to specific views or templates within your Django app. This allows for seamless navigation and organization of your web application, ensuring a smooth user experience.
Remember to regularly test and refine your routing configuration to ensure the proper functioning of your Python Django project.

Опубликовано:

 

8 мар 2020

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 38   
@vishaldudhabarve5903
@vishaldudhabarve5903 Месяц назад
Finally I got the solutions of my all the doubts ❤thank you so much brother, your video was really helpful for me.
@HarithaComputersTechnology
@HarithaComputersTechnology Месяц назад
Most welcome 😊
@guddi1491
@guddi1491 3 года назад
Exactly what I was searching for. Thanks
@ojalafsenior4757
@ojalafsenior4757 2 года назад
This work was very helpful , took me one step forward with django.
@omprakash007
@omprakash007 2 года назад
exact thing what i was looking for . thank you
@sinjineepaul7248
@sinjineepaul7248 7 месяцев назад
after wasting 5 hours on internet, your video finally came through , thank you so much
@HarithaComputersTechnology
@HarithaComputersTechnology 7 месяцев назад
Glad it helped
@Rabixter
@Rabixter Год назад
Brilliant! Just what I needed. You explained it very clearly.
@HarithaComputersTechnology
@HarithaComputersTechnology Год назад
Glad you liked it!
@alamin00038
@alamin00038 2 года назад
Very helpful video. Thank you very much.
@sue3245
@sue3245 2 года назад
thanks struggled with this for a while
@danielvirgo975
@danielvirgo975 3 года назад
Thanks mahn! This did allot!!
@Mr.Aswin_Das
@Mr.Aswin_Das 2 года назад
thank you so much.. you saved my day
@pradeepkanna2456
@pradeepkanna2456 Год назад
Thank U so much sir. It's really worth
@HarithaComputersTechnology
@HarithaComputersTechnology Год назад
Most welcome
@hinkuhadwin3618
@hinkuhadwin3618 3 года назад
very useful bro........
@shubhashishdey
@shubhashishdey 3 года назад
thanks i did it ,,,,thanku thanku thanku
@BilalKhan-do9il
@BilalKhan-do9il Год назад
perfect man, brilliant..
@HarithaComputersTechnology
@HarithaComputersTechnology Год назад
Good it helped ...
@gideonejiogu9504
@gideonejiogu9504 Год назад
just the missing link. Incase you see squiggly lines while adding os.path.join(BASE_DIR, 'templates' ), you might need to import os from pathlib. That's my own experience.
@isabeldias4336
@isabeldias4336 3 года назад
Thank you so much! So useful!
@rahulg3108
@rahulg3108 3 года назад
Thank you
@georgeGeorge-ts7gc
@georgeGeorge-ts7gc Год назад
I wonder why I'm getting this error: module 'website.index' has no attribute 'webpage2'. Did you mean: 'webpage1'?
@harshit.hayaran
@harshit.hayaran 2 года назад
Thanks
@reksmeyok1957
@reksmeyok1957 3 года назад
Thank you. This video is helpful. Please create more videos about Django project.
@beenoshake
@beenoshake 3 года назад
i swear this more simple than others videos on youtube smh
@rafhaellowixhomwad
@rafhaellowixhomwad 2 месяца назад
@HarithaComputersTechnology
@HarithaComputersTechnology 2 месяца назад
No worries mate ! thanks
@aleenacarolin2667
@aleenacarolin2667 3 года назад
Thanku so much..it helped me a lot for by project🤗🤗
@gangadevi9688
@gangadevi9688 3 года назад
Thank u for the awesome video
@AnishKumar-gh7yh
@AnishKumar-gh7yh 4 года назад
Thanks sir
@drakolubez6592
@drakolubez6592 3 года назад
The most important point here is to ad the name in the URLs .py and then use the same name in the href in the following way👇 href="{% URL 'name' %}"
@bookfaceimpact6863
@bookfaceimpact6863 3 года назад
tq
@akashp4863
@akashp4863 3 года назад
you can talk in normal indian accent, trying to fake accent actually makes it not so pleasing to hear
@nirajkumarwebdesignerdevel3036
@nirajkumarwebdesignerdevel3036 2 года назад
Yar aap English mat bolo ma bahan kar diye English ka
@adarshvs_
@adarshvs_ 3 года назад
pronunciation sucks >w
@nshntgiri
@nshntgiri 3 года назад
Thank you so much! So useful!
Далее
How much python do you need before django?
13:29
Просмотров 222 тыс.
Разбудили Любимой Песней 😂
00:14
This or That 🛍️
00:52
Просмотров 5 млн
If __name__ == "__main__" for Python Developers
8:47
Просмотров 388 тыс.
Learn Django in 20 Minutes!!
21:25
Просмотров 332 тыс.
Always Check for the Hidden API when Web Scraping
11:50
Python Django Tutorial for Beginners
1:02:36
Просмотров 2,5 млн
Django QuickStart Web Application for Beginners
23:11
Complete Django CRUD Operations
1:11:54
Просмотров 315 тыс.
Разбудили Любимой Песней 😂
00:14