Hello open-source enthusiasts! Welcome to Python Hunt, a platform dedicated to making learning Python even more accessible. This Django project provides a space for contributors to create web pages explaining various Python concepts, as outlined in the existing issues. To maintain a consistent design, please ensure that your templates follow the established style guide. Refer to the documentation below for instructions on running the website on your local system.
Don't forget to show your support by leaving a ⭐ if you find this repository helpful!
Before you proceed with the installation, make sure you have the following prerequisites installed on your system:
- Python (version 3.6 or higher)
- pip (Python package installer)
It's recommended to create a virtual environment to isolate your Django project's dependencies. Open your terminal or command prompt and execute the following command:
python3 -m venv myenv
Replace myenv
with your desired name for the virtual environment.
Activate the virtual environment based on your operating system:
Windows:
myenv\Scripts\activate
Unix or Linux:
source myenv/bin/activate
With your virtual environment activated, install Django using pip:
pip install django
This command will download and install the latest stable version of Django.
To verify that Django is successfully installed, run the following command:
django-admin --version
You should see the installed Django version printed in the console.
Congratulations! You have successfully installed Django on your system. You are now ready to start building your Django web applications.
- Fork this repository and move inside it:
- Migrate the necessary data for the models:
- Run the website on your local host:
- Click on the URL produced, and it will open in your default browser.
git clone https://github.com/X-Evolve/Python_Hunt.git && cd Python_Hunt/producthunt_pro
python manage.py migrate
python manage.py runserver
Congratulations! You have successfully set up your Django Web Server on your local host. You are now ready to contribute!
- Create a new branch to work on an issue:
- Once you have completed your code, open a Pull Request (PR).
- Open your forked repository in your browser and then raise a Pull Request (PR) to the main branch of this repository!
git checkout -b new_work
From the root of the project, run the following commands:
git add .
git commit -m "Description of your work (short one is preferred)"
git push origin new_work
If you want to add CSS, JavaScript, or image files to this project, place them in the static folder:
producthunt_pro/producthunt/static/
Import them into the code using the following:
(At the top of the HTML File)
{% load static %}
(To use your CSS / JavaScript file)
href="{% static 'name of the file' %}"
(To use your image file)
src="{% static 'name of the file' %}"
- Django Official Documentation: The official Django documentation provides comprehensive information and tutorials for learning Django.
- Django Project Website: The official website of the Django project offers news, updates, and additional resources.
- Django Tutorial by Mozilla: This tutorial by Mozilla provides a beginner-friendly introduction to Django.
Happy coding with Django! 🐍💙