Code Monkey home page Code Monkey logo

panso.se's Introduction

Panso.se

This Django-based web application allows users to compare prices of various products from different vendors in the Swedish market. The goal is to help consumers find the best deals and make informed purchasing decisions.

Features

  • Product Search: Users can search for products using keywords.
  • Price Comparison: Displays prices from multiple vendors for each product.
  • Product Details: Shows detailed information about each product, including specifications and reviews.
  • User Accounts: Allows users to create accounts, log in, and save their favorite products.
  • Admin Interface: An admin interface for managing products, vendors, and user accounts.

Requirements

If you have Docker you can start Garnet with docker-compose up garnet otherwise download the executable.

Installation

  1. Clone the repository:
git clone https://github.com/TheLovinator1/panso.se.git
cd panso.se
  1. Create a virtual environment and install dependencies:
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
  1. Rename the .env.example file to .env and update the environment variables:
mv .env.example .env
  1. Run the Django migrations:
python manage.py migrate
  1. Create a superuser account:
python manage.py createsuperuser
  1. Start the development server:
python manage.py runserver
  1. Open the browser and go to http://localhost:8000/ to access the application.

Usage

Populating the database

The web scrapers are written with Scrapy and can be found in the clutter directory. To populate the database with products and vendors, run the following commands:

# Current spiders
scrapy list

# For example, to run the "webhallen" spider
scrapy crawl webhallen

Admin Interface

To access the admin interface, go to http://localhost:8000/admin/ and log in with the superuser account created earlier.

Running Tests

To run the tests, use the following command:

# Remember to start the Garnet server before running the tests
pytest -v -n 8

Contributing

Any contributions you make are greatly appreciated. If you have any suggestions, bug reports, or pull requests, please open an issue or create a pull request.

Two notes before contributing:

  • If this is a major change, please open an issue or contact me first to double-check if the change is appropriate.
  • Don't be afraid to make a pull request even if you are new to open-source. I am happy to help you through the process.

Steps to Contribute

  • Click the "Fork" button at the top-right corner of the repository.
  • You can find the repository URL by clicking the green "Code" button.
  • Create a new branch with a descriptive name to work on a feature or bug fix.
    • For example, if you want to turn the logo upside down, you would do the following:
    • git checkout -b flip-logo
      • You can name the branch whatever you want, it won't affect anything.
  • Test your changes locally by running the following commands:
    • python manage.py test
      • This command will run the tests to ensure that your changes don't break any existing functionality.
      • I can help you with writing tests if you are not familiar with it.
    • pre-commit run --all-files
      • This command will run the pre-commit checks to ensure that the code is formatted correctly and passes all linting checks.
      • You can install the pre-commit hooks by running pre-commit install if you don't want to run the checks manually.
    • Fix any issues that arise from the tests or pre-commit checks.
  • After making the necessary changes, commit your changes.
    • Add all changes
      • git add .
    • Write a commit message describing the changes
      • git commit -m "Add new feature"
    • Push the changes to your fork
      • git push origin feature/new-feature
  • Go to your fork on GitHub and click the "New Pull Request" button. Fill in the details and submit the pull request.
  • After submitting the pull request, it will be reviewed and once approved, it will be merged into the main branch.

Contact

You can contact me at the following places:

panso.se's People

Watchers

 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.