Skip to content

Latest commit

 

History

History
62 lines (38 loc) · 987 Bytes

README.md

File metadata and controls

62 lines (38 loc) · 987 Bytes

PayToView

A medium-like web application in which a user pays for a membership after viewing three free posts.

Screencast from 2023-01-17 20-47-35

Configuration

Settings.py

Stripe: Add necessary stripe keys (Secret Key, Webhook Key)

MAX_FREE_POSTS: the number of free posts a user can read before having to pay (default = 3)

Run Locally

Clone the project

  git clone https://github.com/sulavmhrzn/pay-to-view

Go to the project directory

  cd pay-to-view

Install dependencies

  pip install -r requirements.txt

Migrate database

  py manage.py migrate

Start the server

  py manage.py runserver

Start stripe webhook

stripe listen --forward-to localhost:8000/payment/webhook/

Tech Stack

Server: Python, Django

Payment: Stripe

PDF: Weasyprint