Hello opensource developers! We have initiated a website called Python Hunt to make learning python even more easier. This is a Django project where you can contribute web pages explaining various concepts in python as mentioned in issues. Make sure that the templates must have same kind of design everywhere to maintain uniformity. Please refer the below documentation for running the website on your system.
Add your HTML Pages here:
producthunt_pro/products/templates/products/
To know more about how to add the pages, click here!
Kindly consider leaving a ⭐ if you like the repository
Happy Coding!
Before installing Django, ensure that 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 the desired name for your virtual environment. -
Activate the virtual environment by running the appropriate command for your operating system:
myenv\Scripts\activate
source myenv/bin/activate
-
With your virtual environment activated, execute the following command to 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.
-
git clone https://github.com/X-Evolve/Python_Hunt.git && producthunt_pro
-
python manage.py migrate
-
To run the website on your local host, use the following command:
python manage.py runserver
-
Click on the url produced and it opens in your default browser
Congratulations! You have successfully setup your Django Web Server on your local host. You are now ready to contribute!
-
git checkout -b new_work
-
From the root of the project, Run the following commands:
-
Add your contributions to the branch
git add .
-
Commit the contributions you made to the branch
git commit -m "prefix: Description of your work (short one is preferred)"
Add the following prefixes depending on your contributions:
- fix: A bug fix
- feat: A new feature
- docs: Documentation changes
- chore: Miscellaneous changes that do not match any of the above.
-
Push your contributions to your branch:
git push origin new_work
Open your forked repository in your browser and then raise a Pull Request (PR) to the main branch of this repository!
-
If you want to add CSS or Javascript or Image files in this project, add it in static folder:
producthunt_pro/producthunt/static/
Import them into the code by using this:
(On the top of the HTML File)
#Imports the base template
{% extends 'base.html' %}
{% block content %}
#Load the static files added in the folder above
{% load static %}
(When you want to use your CSS / Javascript file)
href = "{% static 'name of the file' %}"
(When you want to use your image file)
src = "{% static 'name of the file' %}"
(After you have finished your HTML page, add the below code at the end of the file)
{% endblock %}
Notes:
- Do design your HTML pages with respect to the base template.
For more reference, check the other pages designed so far. - The importance of including the base template is that it has the default navbar and footer which makes it easier to navigate through the pages.
- 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.
- Conventional Commits: This website provides a detailed description of how to write proper commits.
For any questions or support, reach out to the lead maintainers:
- Owner and Founder: Ravin D
- Lead Maintainers:
- Ravin D
- Akshwin T
- Sriram R
- Vinay Deep Jaiswal
Happy coding with Django!