Answer Posted / Varun Tiwari
Here's an example of a simple Django view that renders a basic HTML template:
views.py
```python
from django.shortcuts import render
def home(request):
return render(request, 'home.html')
```
urls.py
```python
from django.urls import path
from . import views
urlpatterns = [
path('', views.home, name='home'),
]
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
No New Questions to Answer in this Category !! You can
Post New Questions
Answer Questions in Different Category