Skip to content

Latest commit

 

History

History
76 lines (71 loc) · 4.86 KB

CONTRIBUTING.md

File metadata and controls

76 lines (71 loc) · 4.86 KB

My Image

Python Hunt Hacktoberfest 2023 Contribution Guidelines 💙

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!

Prerequisites

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)

Installation Steps

Create a Virtual Environment (Optional)

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 (Optional)

Activate the virtual environment based on your operating system:

Windows:

myenv\Scripts\activate

Unix or Linux:

source myenv/bin/activate

Install Django

With your virtual environment activated, install Django using pip:

pip install django

This command will download and install the latest stable version of Django.

Verify the Installation

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.

Running the System on Your Local System

  1. Fork this repository and move inside it:
  2. git clone https://github.com/X-Evolve/Python_Hunt.git && cd Python_Hunt/producthunt_pro
  3. Migrate the necessary data for the models:
  4. python manage.py migrate
  5. Run the website on your local host:
  6. python manage.py runserver
  7. Click on the URL produced, and it will open in your default browser.

Congratulations! You have successfully set up your Django Web Server on your local host. You are now ready to contribute!

Getting Started with Contribution

  1. Create a new branch to work on an issue:
  2. git checkout -b new_work
  3. Once you have completed your code, open a Pull Request (PR).
  4. 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
  5. Open your forked repository in your browser and then raise a Pull Request (PR) to the main branch of this repository!

How to Add Your Files in the Project

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' %}"

Additional Resources

Happy coding with Django! 🐍💙


My Image