Skip to content

X-Evolve/Python_Hunt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

My Image

Python Hunt is an OpenSource Website 💙

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!

Prerequisites

Before installing Django, ensure that you have the following prerequisites installed on your system:

  • Python (version 3.6 or higher)
  • pip (Python package installer)

Installation Steps

  1. 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 the desired name for your virtual environment.

  2. Activate the virtual environment (optional)

    Activate the virtual environment by running the appropriate command for your operating system:

    Windows:

    myenv\Scripts\activate

    Unix or Linux:

    source myenv/bin/activate
  3. Install Django

    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.

  4. 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 this system in your local system

  1. Fork this repository and move inside it

    git clone https://github.com/X-Evolve/Python_Hunt.git && producthunt_pro
  2. Next, use this command for migrating changes to the models

    python manage.py migrate
  3. Running the Website on your Local Host

    To run the website on your local host, use the following command:

    python manage.py runserver
  4. Last Step

    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!

Getting Started with Contributions

  1. Checkout to a new branch to work on an issue

    git checkout -b new_work
  2. Once you have completed coding, then open a Pull Request(PR)

    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!

How to Add your files in the project

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.

Additional Resources

Contact

For any questions or support, reach out to the lead maintainers: