Skip to content

vroncevic/flask_func_struct_vue

Repository files navigation

flask functional structure with vue

☯️ flask_func_struct_vue is framework for creating/building flask-vue Apps.

Developed in 🐍 python code.

The README is used to introduce the modules and provide instructions on how to install the modules, any machine dependencies it may have and any other information that should be provided before the modules are installed.

flask_func_struct_vue python checker flask_func_struct_vue package checker GitHub issues open GitHub contributors

Table of Contents

Installation

Used next development environment

debian linux os

Navigate to release page download and extract release archive 📦.

To install flask_func_struct_vue 📦 type the following

tar xvzf flask_func_struct_vue-x.y.z.tar.gz
cd flask_func_struct_vue-x.y.z
pip install -r requirements.txt
cp manage.py /FlaskApp/
cp -R /manage_commands/ /FlaskApp/
cp -R /app_server/ /Flask/

Or You can use Dockerfile to create image/container 🚢.

flask_func_struct_vue docker checker

Usage

Create databse

$ python manage.py create_db
Create database/tables
Done

Init databse and prepare alembic table

$ python manage.py db init
  Creating directory /data/dev/python/flask_func_struct_vue/github/flask_func_struct_vue/migrations ...  done
  Creating directory /data/dev/python/flask_func_struct_vue/github/flask_func_struct_vue/migrations/versions ...  done
  Generating /data/dev/python/flask_func_struct_vue/github/flask_func_struct_vue/migrations/env.pyc ...  done
  Generating /data/dev/python/flask_func_struct_vue/github/flask_func_struct_vue/migrations/env.py ...  done
  Generating /data/dev/python/flask_func_struct_vue/github/flask_func_struct_vue/migrations/alembic.ini ...  done
  Generating /data/dev/python/flask_func_struct_vue/github/flask_func_struct_vue/migrations/README ...  done
  Generating /data/dev/python/flask_func_struct_vue/github/flask_func_struct_vue/migrations/script.py.mako ...  done
  Please edit configuration/connection/logging settings in
  '/data/dev/python/flask_func_struct_vue/github/flask_func_struct_vue/migrations/alembic.ini' before proceeding.

Generate a migration script that makes the database match the models

$ python manage.py db migrate
INFO  [alembic.runtime.migration] Context impl SQLiteImpl.
INFO  [alembic.runtime.migration] Will assume non-transactional DDL.
INFO  [alembic.env] No changes in schema detected.

Create super user

$ python manage.py createsuperuser
Creating superuser account
Insert username of superuser: adroot
Insert email of superuser: adroot@test.com
Insert password of superuser: 
Done

Run application

$ python manage.py runserver
 * Serving Flask app "app_server" (lazy loading)
 * Environment: production
   WARNING: This is a development server. Do not use it in a production deployment.
   Use a production WSGI server instead.
 * Debug mode: on
 * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
 * Restarting with stat
 * Debugger is active!
 * Debugger PIN: 226-526-932

Dependencies

flask_func_struct_vue requires other modules and libraries (Python 2.x)

alembic                           1.6.5
Flask                             1.1.4
Flask-Bcrypt                      1.0.1
Flask-Bootstrap                   3.3.7.1
Flask-Cors                        3.0.10
Flask-DebugToolbar                0.13.1
Flask-Login                       0.5.0
Flask-Mail                        0.9.1
Flask-Migrate                     2.6.0
Flask-Script                      2.0.6
Flask-SQLAlchemy                  2.5.1
Flask-Testing                     0.8.1
Flask-WTF                         0.14.3
SQLAlchemy                        1.4.27
Werkzeug                          1.0.1
WTForms                           2.3.3

Package structure

🧰 Expected framework structure

app_server/
├── configuration/
│   ├── database/
│   │   ├── development_config.py
│   │   ├── __init__.py
│   │   ├── production_config.py
│   │   └── test_config.py
│   ├── development_config.py
│   ├── __init__.py
│   ├── mail/
│   │   ├── development_config.py
│   │   ├── __init__.py
│   │   ├── production_config.py
│   │   └── test_config.py
│   ├── production_config.py
│   └── test_config.py
├── forms/
│   ├── base/
│   │   ├── contact.py
│   │   └── __init__.py
│   ├── __init__.py
│   └── user/
│       ├── edit.py
│       ├── __init__.py
│       ├── login.py
│       └── register.py
├── __init__.py
├── models/
│   ├── __init__.py
│   └── model_user.py
├── static/
│   ├── base.css
│   └── favicon.ico
├── templates/
│   ├── base/
│   │   ├── about.html
│   │   ├── contact.html
│   │   └── home.html
│   ├── _base.html
│   ├── errors/
│   │   ├── 401.html
│   │   ├── 403.html
│   │   ├── 404.html
│   │   └── 500.html
│   ├── footer.html
│   ├── header.html
│   └── user/
│       ├── administration.html
│       ├── edit.html
│       ├── login.html
│       ├── members.html
│       └── register.html
└── views/
    ├── base/
    │   ├── about.py
    │   ├── contact.py
    │   ├── home.py
    │   └── __init__.py
    ├── __init__.py
    └── user/
        ├── administration.py
        ├── edit.py
        ├── __init__.py
        ├── login.py
        ├── logout.py
        ├── members.py
        └── register.py

Docs

Documentation Status

📗 More documentation and info at

Copyright and Licence

License: GPL v3 License

Copyright (C) 2017 by vroncevic.github.io/flask_func_struct_vue

flask_func_struct_vue is free software; you can redistribute it and/or modify it under the same terms as Python itself, either Python version 2.x/3.x or, at your option, any later version of Python 3 you may have available.

🌎 🌍 🌏 Lets help and support PSF.

Python Software Foundation

Donate