Code Monkey home page Code Monkey logo

bloomblas's Introduction

Bloomblas

Bloomblas blogging site offers users a place to express themselves and tell their stories their own way. This could be in fashion, food, writing, art and many more. Its a fullstack project developed using reactjs and flask.

Backend(Flask)

Table of content

  • Files
  • Usage
  • Dependencies
  • installation
  • Author

Files

  1. app.py: This is the main Python file that defines the Flask application and API routes. It also contains error handling for not found resources.

  2. models.py: This file defines the SQLAlchemy models for User, Blogpost, and Userblogpost. These models represent the database tables and their relationships.

  3. seed.py: This script is used to populate the database with sample data. It generates random restaurant usernames, emails, blogpost names, and descriptions using the Faker library and adds them to the respective database tables.

Usage

  • Clone this repository to your local machine.
  • Create a virtual environment and install the required dependencies listed in requirements.txt.
  • Run the Flask application by executing python app.py.
  • Access the API using the specified endpoints and methods.

Installation

  1. Run: pipenv install flask-migrate
  2. In app.py. from flask_migrate import Migrate migrate = Migrate(app, db) db.init_app(app)
  3. Run to create database: export FLASK_APP=app.py export FLASK_RUN_PORT=5555 flask db init flask db migrate -m "Initial migration" flask db upgrade
  4. Update db with tables: flask db revision --autogenerate -m'Created tables '

Author

Valerie Kandagor

Github

https://github.com/Reiney4/Bloomblas

bloomblas's People

Contributors

reiney4 avatar

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.