Useful Links
Computer Science
Web Development
Django Framework
1. Introduction to Django
2. Getting Started
3. Models: The Data Layer
4. Views: The Logic Layer
5. Templates: The Presentation Layer
6. URL Routing
7. Forms
8. The Django Admin
9. Static and Media Files
10. Authentication and Authorization
11. Testing
12. Security
13. Advanced Topics
14. Deployment
15. Extending Django
URL Routing
The `urls.py` File
Structure and Purpose
Project-Level vs. App-Level URLs
URL Configuration Module
The `path()` Function
Syntax and Parameters
Route Patterns
View Functions and Classes
Keyword Arguments
The `re_path()` Function
Regular Expression Patterns
Named Groups
Non-Capturing Groups
URL Converters
Built-in Converters
`str`
`int`
`slug`
`uuid`
`path`
Custom Converters
Creating Converter Classes
Registering Converters
Using `include()` to Organize URLs
Modular URL Configuration
Namespacing URLs
Passing Extra Options
Naming URL Patterns
The `name` Argument
Best Practices for Naming
URL Namespaces
Reverse URL Resolution
Using `reverse()`
Using `reverse_lazy()`
Using `{% url %}` in Templates
Resolving Namespaced URLs
Error Handling
404 Error Handling
500 Error Handling
Custom Error Views
Debug Mode vs. Production
Previous
5. Templates: The Presentation Layer
Go to top
Next
7. Forms