feat: Add hello endpoint to root URL
Related Issue(s):
Closes #1
What does this MR do?
Adds a simple "hello" endpoint at the root URL (/) that returns a basic HTTP response with the text "hello". This implements a minimal homepage functionality for the Django project.
Why was this MR needed?
The project previously had no content at the root URL, which would result in a 404 error for users visiting the base site. This change provides a basic landing page response.
How was it implemented?
- Added a simple
helloview function inmyproject/urls.pythat returns anHttpResponsewith "hello" text - Configured URL routing to map the root path (
'') to the new hello view - Used inline function definition for simplicity given the minimal functionality
How to test:
-
Run the server:
python manage.py runserver -
Visit root URL: Navigate to
http://localhost:8000/ - Verify response: Should see "hello" text displayed in browser
-
Admin still works: Confirm
http://localhost:8000/admin/still functions normally