Pinsta is a social media platform that allows users to discover and save ideas for various projects or interests by pinning them to virtual pinboards. It's often used for inspiration, planning, and bookmarking, with content ranging from recipes and fashion to home decor and travel. Here is the live link Pinsta 🖼️
Database:
Hosting:
git clone https://github.com/ELIxFOSTER/Pinsta.git
git clone [email protected]/ELIxFOSTER/Pinsta.git
Install dependencies
pip install -r requirements.txt &&
flask db upgrade &&
flask seed all
cd react-app
npm install --prefix react-app
Start the server
pipenv run flask run
In seperate terminal
cd react-app
npm start
PINSTA
Removing a single pin from a board. I passed both the boardId and pinId, looped through all of the boards pins, found the matching id, then popped the pin off the board so that it was just removed not deleted
def remove_pin(id):
res = request.get_json()
pinId = int(res['pinId'])
data = Board.query.get(id)
for idx, x in enumerate(data.board_pins):
if x.id == pinId:
index = idx
data.board_pins.pop(index)
db.session.add(data)
db.session.commit()