Skip to content
This repository has been archived by the owner on Oct 20, 2022. It is now read-only.

This is sample for creating simple CRUD using Python Flask Framework and Javascript VueJS Framework

Notifications You must be signed in to change notification settings

ardinusawan/Flask-VueJS-CRUD-Sample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Frontend (vuejs-frontend)

How to run:

Install dependency

$ npm install

Run app

$ npm run dev

Server run in http://localhost:8080

Backend (flask-backend)

How to run:

Installing virtual environment

$ virtualenv -p python3 venv

Load environment

$ source venv/bin/activate

Installing dependency

$ pip install -r requirements.txt

For first time instalation, create database if not exist

$ python
>>> from article import db
>>> db.create_all()
>>> exit()

Run app

$ python article.py

Server run in http://localhost:5000

Unit Test

This unit test only for flask-backend. Run it from 'flask-backend' folder.

$ python test/article_test.py

Demo:

  1. Go to localhost:8080 Empty data

  2. For the first time, create article. All data must be filled. Empty data

  3. Click the 'Create' button, if success, flash message 'Article created successfully' will appear. Click return to articles to going back to home Empty data

  4. New data appear! Empty data

  5. Lets create one more. And now let we click edit on first data Empty data

  6. Edit title, and update it Empty data

  7. On the first article, title changed. Empty data

  8. Lets delete second article, click delete. You will see new page, click 'Delete Article' for confirmation. Empty data

  9. Second data has been deleted. Lets do one more with the only one data Empty data

  10. Click 'Delete Article' Empty data

  11. Puff! All data gone! Empty data

License

MIT

Free Software, Hell Yeah!

About

This is sample for creating simple CRUD using Python Flask Framework and Javascript VueJS Framework

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published