Skip to content

Kur0iTsuki/helloworld_django

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

Hello World Django App

This is a simple Django application that returns a "Hello World" message in both JSON and HTML formats.

Features

  • A single route (/hello/) that returns either:
    • A JSON response: {"Message": "Hello World!"}
    • An HTML page with "Hello World!" in bold.

Prerequisites

  • Python 3.0
  • Django (Version 3.0 or above)

How to Run the App

1. Clone the Repository

 git clone https://github.com/Kur0iTsuki/helloworld_django
 cd helloworld_django
 cd helloworld_project
  1. Set Up a Virtual Environment (Optional but recommended)
  python -m venv env
  source env/bin/activate  # On Windows use: env\Scripts\activate

3.Install Django

pip install django

4.Run the Django Development Server

python manage.py runserver

5.Access the App To access the JSON response, visit:

http://127.0.0.1:8000/hello/?format=json

output

{"Message": "Hello World!"}

To view the HTML response, visit:

http://127.0.0.1:8000/hello/

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published