Question: Create an application called greeting using a Django project: The application will print the following: Hello, my name is First _ name Last _ name!

Create an application called "greeting" using a Django project:
The application will print the following: Hello, my name is First_name Last_name!
Make sure to replace the text "First_name" and "Last_name" with your own first and last name
Make sure to include a comment in the code with your own First_name and Last_name
Run your web server using the following URL 127.0.0.1:8000 to produce the required output.
Hints:
Update
settings.py file to add your app to the list of installed apps. Modify the INSTALLED_APPS to look like this:
INSTALLED_APPS
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'greeting',
]
Create or modify the
views.py file to include the following code: (remember to save the
views.py file)
views.py >...
1
2 from django.http import HttpResponse
3
4 def index(request):
5
return HttpResponse("Hello, my name is First_name Last_name!")
6
7 # Author name is First_name Last_name
Create an application called "greeting" using a

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!