Skip to content

dev-shuvo/BikeKinbo-Django

Repository files navigation

BikeKinbo Marketplace

An online marketplace for buy/sell old bikes.

Previews
Homepage
Admin panel
User's dashboard

Requirements

  • Python 3.11 or higher

  • PostgreSQL

  • smtp4dev

  • Git Bash (Optional)


Installation

Open cmd or bash in the project directory.

Install Python virtual environment

pip install virtualenv

Create a virtual environment

virtualenv env_name

Activate virtual environment

On Mac and Linux (Also if you are using bash on Windows)

source env_name/bin/activate

On Windows (If you are using cmd)

.\env_name\Scripts\activate

Install dependencies

pip install -r requirements.txt

Run Locally

At first create a new PostgreSQL database.

Configure database in settings.py

DATABASES = {
    "default": {
        "ENGINE": "django.db.backends.postgresql",
        "NAME": "YOUR_DATABASE_NAME",
        "USER": "DATABASE_USER",
        "PASSWORD": "DATABASE_PASSWORD",
        "HOST": "localhost",
        "PORT": "5432",
    }
}

Migrate database

python manage.py makemigrations && python manage.py migrate

Create an admin user

python manage.py createsuperuser

Run the Django server

python manage.py runserver

Run the smtp4dev server to prevent any potential errors while creating restaurant and customer accounts or carrying out food ordering processes.

Or

Configure smtp in the settings.py to use your own email server.

EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST = 'smtp.your-email-provider.com'
EMAIL_PORT = 587
EMAIL_USE_TLS = True
EMAIL_HOST_USER = 'your-email@example.com'
EMAIL_HOST_PASSWORD = 'your-email-App-password'

You can access the website at http://127.0.0.1:8000/ and the admin panel at http://127.0.0.1:8000/admin


License

MIT