Giter VIP home page Giter VIP logo

python_hunt's Introduction

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!

Folder Structure of the project

|-- accounts/
|-- producthunt/
|   |-- __init__.py
|   |-- settings.py
|   |-- urls.py
|   |-- asgi.py
|   `-- wsgi.py
|-- manage.py
|-- products/
|   |-- __init__.py
|   |-- admin.py
|   |-- apps.py
|   |-- migrations/
|   |   `-- __init__.py
|   |-- models.py
|   |-- templates/products
|   |   `-- Add your HTML files here.
|   |-- tests.py
|   `-- views.py
|-- static/
|   |-- css/
|   |   `-- styles.css
|   |-- js/
|   |   `-- script.js
|   `-- img/
|       `-- logo.png
|-- .gitignore
|-- requirements.txt
|-- README.md

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

Happy coding with Django!

python_hunt's People

Contributors

ravin-d-27 avatar sriram-ramakrishnan avatar akshwin avatar vadalisravani avatar dependabot[bot] avatar marufhasan24 avatar mismathh avatar dheekshithbg avatar karthikakshaj avatar pulkitxm avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.