Fork, Commit, Merge - Easy Issue (Django)
nikohoffren opened this issue · 1 comments
Fork, Commit, Merge - Easy Issue (Django)
Create a simple Django view that returns a "Hello, World!" message
Note: You don't have ask permission to start solving the issue or get assigned, since these issues are supposed to be always open for new contributors. The actions-user bot will reset the file back to previous state for the next contributor after your commit is merged. So you can just simply start working with the issue right away!
How to get started
Start by opening the tasks/django/easy
directory from the root of the project.
Then open hello_world/hello_world/urls.py
and hello_world/hello_world_app/views.py
files and start working on your solution!
Notice that there are hello_world
and hello_world_app
directories inside of hello_world
directory which can make it a bit confusing. Make sure you are working with right folders and files!
Description
Your task is to create a simple Django view that returns a "Hello, World!" message to the browser.
- You have to implement
/hello
path inhello_world/hello_world/urls.py
file similar as the/admin
path is implemented. - Also, you have to add return statement inside
hello_world/hello_world_app/views.py
file, which will return the string "Hello, World!".
How to Run:
- Make sure you are in
tasks/django/easy/hello_world
directory in your Terminal. - Run the development server:
python manage.py runserver
- Navigate to
http://127.0.0.1:8000/hello/
in your web browser. - You should see "Hello, World!" displayed on the screen.
Before making a Pull request:
- Delete the
SECRET_KEY
in thetasks/django/easy/hello_world/hello_world/settings.py
file. Otherwise when making the pull request, security checks will notice the secret and fail, which is not crucial because it can still be merged, but it just makes the Pull request experience a bit more enjoyable. - Normally these kind of projects would use something like
.env
file for storing secret keys and passwords etc in environment variables. In this project there is no need for that, since this is supposed to be just for educational purposes. - Remember, in real life projects, never expose the API keys, secret keys, any passwords or other environment variables to the public repository.
To work with this issue, you need to have Python and Django installed to your local machine.
Check out README.md for more instructions of installing Python and Django. You can also find there instructions of how to make a pull request.
Feel free to ask any questions here if you have some problems!
Also, kindly give this project a star to enhance its visibility for new developers!
I am contributing to it.