Backend Development
Django
Subjective
Oct 03, 2025
Explain Django URL routing and how to configure URLs.
Detailed Explanation
Django URL routing maps URLs to views using URLconf.
Configuration:
1. Create urls.py in app
2. Define urlpatterns list with path() or re_path()
3. Include app URLs in project urls.py
Example: path('blog/', views.blog_view, name='blog')
Supports:
• Named URLs
• URL parameters
• Regular expressions
• Namespaces
• URL reversing with reverse() or {% url %} tag
Discussion (0)
No comments yet. Be the first to share your thoughts!
Share Your Thoughts