From c0246101f766338773d7eb51b93edc9f2ec6c5aa Mon Sep 17 00:00:00 2001 From: Adi Chirilov Date: Mon, 24 Aug 2020 12:29:09 +0300 Subject: [PATCH] Minor updates --- assets/demo/docs.css | 13 +- assets/demo/docs.min.css | Bin 47786 -> 24031 bytes .../flask-deploy-on-heroku.html | 42 +- .../getting-started-flask.html | 425 +++++++++--------- .../setup-centos-for-development.html | 91 ++-- .../setup-ubuntu-for-development.html | 41 +- .../setup-windows-for-development.html | 29 +- 7 files changed, 301 insertions(+), 340 deletions(-) diff --git a/assets/demo/docs.css b/assets/demo/docs.css index 149bf3a..13e27b4 100644 --- a/assets/demo/docs.css +++ b/assets/demo/docs.css @@ -1059,13 +1059,12 @@ body.mdbootstrap .partner.creativetim { background-color: #212529; color: #fff; } -/* .bd-clipboard { position: relative; display: none; float: right; } .bd-clipboard + .highlight { - margin-top: 0; } */ + margin-top: 0; } .btn-clipboard { position: absolute; @@ -1273,6 +1272,16 @@ body.mdbootstrap .partner.creativetim { .css .nt + .nt { color: #999; } +.language-bash::before { + color: #009; + content: "$ "; + user-select: none; } + +.language-powershell::before { + color: #009; + content: "PM> "; + user-select: none; } + .anchorjs-link { font-weight: normal; color: rgba(156, 39, 176, 0.5); diff --git a/assets/demo/docs.min.css b/assets/demo/docs.min.css index 0e58c0bd65a35a58543cc45bcf1a4a0b6b65b552..535d94d2d28e5b3fe83ed0b24c7dbf44fdf1d68d 100644 GIT binary patch literal 24031 zcmc&cYj5Ppao_zb=u-}R>lL}2_X{i7z9c{Z8_0*`)4>5aBxiE9nOM@2RS; z>Id1BwC5zg#YtkbySlo%-d)YlfB60Hf&tUf98X;^jVF^3eyoE3IOP_QKV7?1-L#{fAB(QboBQD3sx-n*e<{+u zYV$0(R$1Nz9RT~e$&;@527lD&b6vH;pSrFo_Sdect6&zz!GBhly6IpH4~~L=ts4ZE z`UVsH(H!^5Pw_qei{iz{ z`vTV31#u8gE>G~wem(iPyChjwRL77=yCpEXt;`P{H|^^NXcRU{R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-Bt%ZG7^11|ADgKjwVdJ*gmbZY`YykEiOHW~%E)1|zc7
ziW`tIs}^q?L$oM{uGQ5fM>v06{;=Gc}>WhS#+7js(BM|L>T;c!}c*cbV+l?P;Mjw0oWRv&NllpT4jKd_Qk
zpCE|FnVmvXv{MHfu)6zck{&yUFWc1|9o-Yi9|@POvxZYkbj{&hxOhkA-xD6w_jWSF
z)iFpobI+i|X0fj}ex_DaJ8->*SoY57=|F7>(<-^|vW&Q5vo&ijN90_E@x4V{LnGm#I4Lwe#+nQ!S#x>-DKi+=9Zpb|V

diff --git a/docs/1.0/getting-started/flask-deploy-on-heroku.html b/docs/1.0/getting-started/flask-deploy-on-heroku.html
index b0c6405..fbd70f3 100644
--- a/docs/1.0/getting-started/flask-deploy-on-heroku.html
+++ b/docs/1.0/getting-started/flask-deploy-on-heroku.html
@@ -678,10 +678,10 @@
 
 
         
-

How to deploy Flask on Heroku

-

-

Flask Deploy on Heroku

+

How to deploy Flask on Heroku

+

+

This page explains how to deploy a Flask application on Heroku, the popular deployment platform.


@@ -795,8 +795,7 @@ Heroku is a cloud-based, fully-managed platform as a service (Paas) for building

Heroku apps include a Procfile that specifies the commands that are executed by the app on startup. As specified in the official docs, the Procfile is always a simple text file that is named Procfile without a file extension.

-
web: gunicorn run:app --log-file=-
-
+
web: gunicorn run:app --log-file=-

For our sample, gunicorn is called with run:app argument.

@@ -813,27 +812,26 @@ As specified in the off

The full command list, executed on our sample project.

-
$ # Clone the source code:
-$ git clone https://github.com/app-generator/boilerplate-code-flask.git
-$ cd boilerplate-code-flask
+
$ # Clone the source code:
+$ git clone https://github.com/app-generator/boilerplate-code-flask.git
+$ cd boilerplate-code-flask
+$
+$ # Check Heroku CLI is installed
+$ heroku -v
+heroku/7.25.0 win32-x64 node-v12.13.0 # <-- All good
 $
-$ # Check Heroku CLI is installed
-$ heroku -v
-heroku/7.25.0 win32-x64 node-v12.13.0 # <-- All good
+$ # Check Heroku CLI is installed
+$ heroku login
+$ # this command will open a browser window - click the login button (in browser)
 $
-$ # Check Heroku CLI is installed
-$ heroku login
-$ # this command will open a browser window - click the login button (in browser)
+$ # Create the Heroku project
+$ heroku create
 $
-$ # Create the Heroku project
-$ heroku create
+$ # Trigger the LIVE deploy
+$ git push heroku master
 $
-$ # Trigger the LIVE deploy
-$ git push heroku master
-$
-$ # Open the LIVE app in browser
-$ heroku open
-
+$ # Open the LIVE app in browser +$ heroku open

At this point, you should be able to visit the app in the browser.

diff --git a/docs/1.0/getting-started/getting-started-flask.html b/docs/1.0/getting-started/getting-started-flask.html index 64de12a..d8c4679 100644 --- a/docs/1.0/getting-started/getting-started-flask.html +++ b/docs/1.0/getting-started/getting-started-flask.html @@ -683,10 +683,12 @@
-

Black Dashboard Flask

-

-

Black Dashboard Flask

- +

+ Black Dashboard Flask +

+ +

+

Black Dashboard Black is a free Bootstrap 4 Admin Template for Django - Features:

    @@ -702,9 +704,9 @@
      -
    • Black Dashboard Flask - product page
    • -
    • Black Dashboard Flask Demo - LIVE App, default login credentials ** test / pass **
    • -
    • Black Dashboard Flask Sources - MIT License, released on Github
    • +
    • Black Dashboard Flask - product page
    • +
    • Black Dashboard Flask Demo - LIVE App, default login credentials ** test / pass **
    • +
    • Black Dashboard Flask Sources - MIT License, released on Github
    • Tutorials
      • Set up CentOS for development
      • @@ -755,17 +757,9 @@ Classified as a microframework, Flask is written in Python and it does not requi

        Check Python version (using the terminal)

        -
        -
        -
        -
        -$ # Check Python version
        -$ python --version
        -Python 3.7.2 # <--- All good
        -
        -    
        -
        -
        +
          $ # Check Python version
        +  $ python --version
        +  Python 3.7.2 # <--- All good


        @@ -773,10 +767,9 @@ Python 3.7.2 # <--- All good

        Check GIT command tool (using the terminal)

        -
        $ # Check git
        -$ git --version
        -$ git version 2.10.1.windows.1 # <--- All good
        -
        +
        $ # Check git
        +$ git --version
        +$ git version 2.10.1.windows.1 # <--- All good


        @@ -808,36 +801,35 @@ Python 3.7.2 # <--- All good

        Change the current directory to source code directory

        -
        $ # Make sure you are running the commands INSIDE source code directory
        -$
        -$ # Create and activate a Virtualenv (Unix based systems)
        -$ virtualenv env
        -$ source env/bin/activate
        -$
        -$ # Create and activate a Virtualenv (Windows based systems)
        -$ # virtualenv env
        -$ # .\env\Scripts\activate
        -$
        -$ # Install requirements
        -$ pip3 install -r requirements.txt
        -$
        -$ # Set the FLASK_APP environment variable
        -$ (Unix/Mac) export FLASK_APP=run.py
        -$ (Windows) set FLASK_APP=run.py
        -$ (Powershell) $env:FLASK_APP = ".\run.py"
        -$
        -$ # Set up the DEBUG environment
        -$ # (Unix/Mac) export FLASK_ENV=development
        -$ # (Windows) set FLASK_ENV=development
        -$ # (Powershell) $env:FLASK_ENV = "development"
        -$
        -$ # Run the application
        -$ # --host=0.0.0.0 - expose the app on all network interfaces (default 127.0.0.1)
        -$ # --port=5000    - specify the app port (default 5000)  
        -$ flask run --host=0.0.0.0 --port=5000
        -$
        -$ # Access the app in browser: http://127.0.0.1:5000/
        -
        +
        $ # Make sure you are running the commands INSIDE source code directory
        +$
        +$ # Create and activate a Virtualenv (Unix based systems)
        +$ virtualenv env
        +$ source env/bin/activate
        +$
        +$ # Create and activate a Virtualenv (Windows based systems)
        +$ # virtualenv env
        +$ # .\env\Scripts\activate
        +$
        +$ # Install requirements
        +$ pip3 install -r requirements.txt
        +$
        +$ # Set the FLASK_APP environment variable
        +$ (Unix/Mac) export FLASK_APP=run.py
        +$ (Windows) set FLASK_APP=run.py
        +$ (Powershell) $env:FLASK_APP = ".\run.py"
        +$
        +$ # Set up the DEBUG environment
        +$ # (Unix/Mac) export FLASK_ENV=development
        +$ # (Windows) set FLASK_ENV=development
        +$ # (Powershell) $env:FLASK_ENV = "development"
        +$
        +$ # Run the application
        +$ # --host=0.0.0.0 - expose the app on all network interfaces (default 127.0.0.1)
        +$ # --port=5000    - specify the app port (default 5000)  
        +$ flask run --host=0.0.0.0 --port=5000
        +$
        +$ # Access the app in browser: http://127.0.0.1:5000/

        At this point, we can visit the app in the browser http://127.0.0.1:5000/. By default, the app will redirect guest users to the login page. To access the private pages:

        @@ -854,24 +846,25 @@ By default, the app will redirect guest users to the login page. To access the p

        Starter uses a simple codebase (no Blueprints) with a structure presented bellow:

        -
        < PROJECT ROOT >
        +
        < PROJECT ROOT >
            |
        -   |-- app/                      # Implements app logic
        -   |    |-- base/                # Base Blueprint - handles the authentication
        -   |    |-- home/                # Home Blueprint - serve UI Kit pages
        +   |-- app/                      # Implements app logic
        +   |    |-- base/                # Base Blueprint - handles the authentication
        +   |    |-- home/                # Home Blueprint - serve UI Kit pages
            |    |
        -   |   __init__.py               # Initialize the app
        +   |   __init__.py               # Initialize the app
            |
        -   |-- requirements.txt          # Development modules - SQLite storage
        -   |-- requirements-mysql.txt    # Production modules  - Mysql DMBS
        -   |-- requirements-pqsql.txt    # Production modules  - PostgreSql DMBS
        +   |-- requirements.txt          # Development modules - SQLite storage
        +   |-- requirements-mysql.txt    # Production modules  - Mysql DMBS
        +   |-- requirements-pqsql.txt    # Production modules  - PostgreSql DMBS
            |
        -   |-- .env                      # Inject Configuration via Environment
        -   |-- config.py                 # Set up the app
        -   |-- run.py                    # Start the app - WSGI gateway
        +   |-- .env                      # Inject Configuration via Environment
        +   |-- config.py                 # Set up the app
        +   |-- run.py                    # Start the app - WSGI gateway
            |
        -   |-- ************************************************************************
        -
        + |-- ************************************************************************ + +


        @@ -897,22 +890,20 @@ By default, the app will redirect guest users to the login page. To access the p

        .env (saved in the root of the project)

        -
        # File: `.env`
        +
        # File: `.env`
         
        -DEBUG=True              # Enable/Disable the development environment
        +DEBUG=True              # Enable/Disable the development environment
         
        -SECRET_KEY=S3cr3t_Key   # The Key used by Flask to encrypt session information
        +SECRET_KEY=S3cr3t_Key   # The Key used by Flask to encrypt session information
         
        -# Database production settings (If DEBUG=False)
        +# Database production settings (If DEBUG=False)
         
        -DB_ENGINE=postgresql    # DBMS
        -DB_NAME=appseed-flask   # Database Name
        -DB_HOST=localhost       # Database Host
        -DB_PORT=5432            # Database Port
        -DB_USERNAME=appseed     # DB Username
        -DB_PASS=pass            # DB Password
        -
        -
        +DB_ENGINE=postgresql # DBMS +DB_NAME=appseed-flask # Database Name +DB_HOST=localhost # Database Host +DB_PORT=5432 # Database Port +DB_USERNAME=appseed # DB Username +DB_PASS=pass # DB Password


        @@ -920,16 +911,15 @@ By default, the app will redirect guest users to the login page. To access the p

        run.py (simplified version)

        -
        # File: run.py
        -
        -DEBUG = config('DEBUG', default=True)
        +
        # File: run.py
         
        -# Create the WSGI app, using the app factory pattern
        -app = create_app( app_config )
        +DEBUG = config('DEBUG', default=True)
         
        -# Migrate automaticaly the app using Flask Migrate library
        -Migrate(app, db)
        -
        +# Create the WSGI app, using the app factory pattern +app = create_app( app_config ) + +# Migrate automaticaly the app using Flask Migrate library +Migrate(app, db)


        @@ -937,37 +927,36 @@ By default, the app will redirect guest users to the login page. To access the p

        app/__init__.py (simplified version)

        -
        # File: app/__init__.py
        -
        -db            = SQLAlchemy()        # Invoke SQLAlchemy
        -login_manager = LoginManager()      # Invoke Login Manager
        -
        -def register_extensions(app):
        -    db.init_app(app)                # Inject SQLAlchemy magic
        -    login_manager.init_app(app)     # Add Login Manager to the app
        -
        -# Register app blueprints: `base`, `home`
        -def register_blueprints(app):
        -    for module_name in ('base', 'home'):
        -        module = import_module('app.{}.routes'.format(module_name))
        -        app.register_blueprint(module.blueprint)
        +
        # File: app/__init__.py
         
        -# Create the tables (automaticaly)
        -def configure_database(app):
        +db            = SQLAlchemy()        # Invoke SQLAlchemy
        +login_manager = LoginManager()      # Invoke Login Manager
         
        -    @app.before_first_request
        -    def initialize_database():
        -        db.create_all()
        +def register_extensions(app):
        +    db.init_app(app)                # Inject SQLAlchemy magic
        +    login_manager.init_app(app)     # Add Login Manager to the app
         
        -# Create the WSGI app using the factory pattern
        -def create_app(config):
        -    app = Flask(__name__, static_folder='base/static')
        -    app.config.from_object(config)
        -    register_extensions(app)
        -    register_blueprints(app)
        -    configure_database(app)
        -    return app
        -
        +# Register app blueprints: `base`, `home` +def register_blueprints(app): + for module_name in ('base', 'home'): + module = import_module('app.{}.routes'.format(module_name)) + app.register_blueprint(module.blueprint) + +# Create the tables (automaticaly) +def configure_database(app): + + @app.before_first_request + def initialize_database(): + db.create_all() + +# Create the WSGI app using the factory pattern +def create_app(config): + app = Flask(__name__, static_folder='base/static') + app.config.from_object(config) + register_extensions(app) + register_blueprints(app) + configure_database(app) + return app


        @@ -1000,40 +989,39 @@ By default, the app will redirect guest users to the login page. To access the p

        App / Base Blueprint structure

        -
        < PROJECT ROOT >
        +
        < PROJECT ROOT >
            |
            |-- app/
        -   |    |-- home/                                # Home Blueprint - serve app pages (private area)
        -   |    |-- base/                                # Base Blueprint - handles the authentication
        +   |    |-- home/                                # Home Blueprint - serve app pages (private area)
        +   |    |-- base/                                # Base Blueprint - handles the authentication
            |         |-- static/
        -   |         |    |-- <css, JS, images>          # CSS files, Javascripts files
        +   |         |    |-- <css, JS, images>          # CSS files, Javascripts files
            |         |
        -   |         |-- templates/                      # Templates used to render pages
        +   |         |-- templates/                      # Templates used to render pages
            |              |
        -   |              |-- includes/                  #
        -   |              |    |-- navigation.html       # Top menu component
        -   |              |    |-- sidebar.html          # Sidebar component
        -   |              |    |-- footer.html           # App Footer
        -   |              |    |-- scripts.html          # Scripts common to all pages
        +   |              |-- includes/                  #
        +   |              |    |-- navigation.html       # Top menu component
        +   |              |    |-- sidebar.html          # Sidebar component
        +   |              |    |-- footer.html           # App Footer
        +   |              |    |-- scripts.html          # Scripts common to all pages
            |              |
        -   |              |-- layouts/                   # Master pages
        -   |              |    |-- base-fullscreen.html  # Used by Authentication pages
        -   |              |    |-- base.html             # Used by common pages
        +   |              |-- layouts/                   # Master pages
        +   |              |    |-- base-fullscreen.html  # Used by Authentication pages
        +   |              |    |-- base.html             # Used by common pages
            |              |
        -   |              |-- accounts/                  # Authentication pages
        -   |                   |-- login.html            # Login page
        -   |                   |-- register.html         # Registration page
        +   |              |-- accounts/                  # Authentication pages
        +   |                   |-- login.html            # Login page
        +   |                   |-- register.html         # Registration page
            |
        -   |-- requirements.txt                          # Development modules - SQLite storage
        -   |-- requirements-mysql.txt                    # Production modules  - Mysql DMBS
        -   |-- requirements-pqsql.txt                    # Production modules  - PostgreSql DMBS
        +   |-- requirements.txt                          # Development modules - SQLite storage
        +   |-- requirements-mysql.txt                    # Production modules  - Mysql DMBS
        +   |-- requirements-pqsql.txt                    # Production modules  - PostgreSql DMBS
            |
        -   |-- .env                                      # Inject Configuration via Environment
        -   |-- config.py                                 # Set up the app
        -   |-- run.py                                    # Start the app - WSGI gateway
        +   |-- .env                                      # Inject Configuration via Environment
        +   |-- config.py                                 # Set up the app
        +   |-- run.py                                    # Start the app - WSGI gateway
            |
        -   |-- ************************************************************************
        -
        + |-- ************************************************************************


        @@ -1041,30 +1029,29 @@ By default, the app will redirect guest users to the login page. To access the p

        App / Home Blueprint structure

        -
        < PROJECT ROOT >
        +
        < PROJECT ROOT >
            |
            |-- app/
        -   |    |-- base/                     # Base Blueprint - handles the authentication
        -   |    |-- home/                     # Home Blueprint - serve app pages (private area)
        +   |    |-- base/                     # Base Blueprint - handles the authentication
        +   |    |-- home/                     # Home Blueprint - serve app pages (private area)
            |         |
        -   |         |-- templates/           # UI Kit Pages
        +   |         |-- templates/           # UI Kit Pages
            |              |
        -   |              |-- index.html      # Default page
        -   |              |-- page-404.html   # Error 404 - mandatory page
        -   |              |-- page-500.html   # Error 500 - mandatory page
        -   |              |-- page-403.html   # Error 403 - mandatory page
        -   |              |-- *.html          # All other HTML pages
        +   |              |-- index.html      # Default page
        +   |              |-- page-404.html   # Error 404 - mandatory page
        +   |              |-- page-500.html   # Error 500 - mandatory page
        +   |              |-- page-403.html   # Error 403 - mandatory page
        +   |              |-- *.html          # All other HTML pages
            |
        -   |-- requirements.txt               # Development modules - SQLite storage
        -   |-- requirements-mysql.txt         # Production modules  - Mysql DMBS
        -   |-- requirements-pqsql.txt         # Production modules  - PostgreSql DMBS
        +   |-- requirements.txt               # Development modules - SQLite storage
        +   |-- requirements-mysql.txt         # Production modules  - Mysql DMBS
        +   |-- requirements-pqsql.txt         # Production modules  - PostgreSql DMBS
            |
        -   |-- .env                           # Inject Configuration via Environment
        -   |-- config.py                      # Set up the app
        -   |-- run.py                         # Start the app - WSGI gateway
        +   |-- .env                           # Inject Configuration via Environment
        +   |-- config.py                      # Set up the app
        +   |-- run.py                         # Start the app - WSGI gateway
            |
        -   |-- ************************************************************************
        -
        + |-- ************************************************************************


        @@ -1079,16 +1066,14 @@ By default, the app will redirect guest users to the login page. To access the p

        This configuration becomes active if .env file has the DEBUG file set to True

        -
        # Development/Debug configuration
        -
        -# Set up the App SECRET_KEY
        -SECRET_KEY = config('SECRET_KEY', default='S#perS3crEt_007')
        +
        # Development/Debug configuration
         
        -# This will create a file in <app> FOLDER
        -SQLALCHEMY_DATABASE_URI = 'sqlite:///' + os.path.join(basedir, 'db.sqlite3')
        -SQLALCHEMY_TRACK_MODIFICATIONS = False
        +# Set up the App SECRET_KEY
        +SECRET_KEY = config('SECRET_KEY', default='S#perS3crEt_007')
         
        -
        +# This will create a file in <app> FOLDER +SQLALCHEMY_DATABASE_URI = 'sqlite:///' + os.path.join(basedir, 'db.sqlite3') +SQLALCHEMY_TRACK_MODIFICATIONS = False

        During the first request, the SQLite database and tables are automatically created in the root in the project.

        @@ -1104,23 +1089,21 @@ By default, the app will redirect guest users to the login page. To access the p

        This configuration becomes active if .env file has the DEBUG file set to False

        -
        # Production configuration
        -
        -SESSION_COOKIE_HTTPONLY  = True
        -REMEMBER_COOKIE_HTTPONLY = True
        -REMEMBER_COOKIE_DURATION = 3600
        +
        # Production configuration
         
        -# PostgreSQL database
        -SQLALCHEMY_DATABASE_URI = '{}://{}:{}@{}:{}/{}'.format(
        -    config( 'DB_ENGINE'   , default='postgresql'    ),
        -    config( 'DB_USERNAME' , default='appseed'       ),
        -    config( 'DB_PASS'     , default='pass'          ),
        -    config( 'DB_HOST'     , default='localhost'     ),
        -    config( 'DB_PORT'     , default=5432            ),
        -    config( 'DB_NAME'     , default='appseed-flask' )
        -)
        +SESSION_COOKIE_HTTPONLY  = True
        +REMEMBER_COOKIE_HTTPONLY = True
        +REMEMBER_COOKIE_DURATION = 3600
         
        -
        +# PostgreSQL database +SQLALCHEMY_DATABASE_URI = '{}://{}:{}@{}:{}/{}'.format( + config( 'DB_ENGINE' , default='postgresql' ), + config( 'DB_USERNAME' , default='appseed' ), + config( 'DB_PASS' , default='pass' ), + config( 'DB_HOST' , default='localhost' ), + config( 'DB_PORT' , default=5432 ), + config( 'DB_NAME' , default='appseed-flask' ) +)

        In this configuration profile, the database defaults to a PostgreSQL DBMS. Make sure the .env has the right credentials to access the database.

        @@ -1227,43 +1210,42 @@ The authentication status is checked by @login_r
      • Base Blueprint serve the HTML pages (index, page-404, etc) and the rest of the pages defined in the UI kit.
      -
      < PROJECT ROOT >
      +
      < PROJECT ROOT >
          |
          |-- app/
      -   |    |-- base/                               # Base Blueprint
      +   |    |-- base/                               # Base Blueprint
          |    |    |-- static/assets/
      -   |    |    |           |-- css/               # UI Kit css
      -   |    |    |           |-- JS/                # Javascript files
      -   |    |    |           |-- images/            # images used by the app
      -   |    |    |           |-- scss/              # SCSS files (if any)
      +   |    |    |           |-- css/               # UI Kit css
      +   |    |    |           |-- JS/                # Javascript files
      +   |    |    |           |-- images/            # images used by the app
      +   |    |    |           |-- scss/              # SCSS files (if any)
          |    |    |
      -   |    |    |-- templates/                      # Templates used to render pages
      +   |    |    |-- templates/                      # Templates used to render pages
          |    |         |
      -   |    |         |-- includes/                  #
      -   |    |         |    |-- navigation.html       # Top menu component
      -   |    |         |    |-- sidebar.html          # Sidebar component
      -   |    |         |    |-- footer.html           # App Footer
      -   |    |         |    |-- scripts.html          # Scripts common to all pages
      +   |    |         |-- includes/                  #
      +   |    |         |    |-- navigation.html       # Top menu component
      +   |    |         |    |-- sidebar.html          # Sidebar component
      +   |    |         |    |-- footer.html           # App Footer
      +   |    |         |    |-- scripts.html          # Scripts common to all pages
          |    |         |
      -   |    |         |-- layouts/                   # Master pages
      -   |    |         |    |-- base-fullscreen.html  # Used by Authentication pages
      -   |    |         |    |-- base.html             # Used by common pages
      +   |    |         |-- layouts/                   # Master pages
      +   |    |         |    |-- base-fullscreen.html  # Used by Authentication pages
      +   |    |         |    |-- base.html             # Used by common pages
          |    |         |
      -   |    |         |-- accounts/                  # Authentication pages
      -   |    |              |-- login.html            # Login page
      -   |    |              |-- register.html         # Registration page
      +   |    |         |-- accounts/                  # Authentication pages
      +   |    |              |-- login.html            # Login page
      +   |    |              |-- register.html         # Registration page
          |    |
      -   |    |-- home/                                # Home Blueprint - serve app pages (private area)
      -   |         |-- templates/                      # UI Kit Pages
      +   |    |-- home/                                # Home Blueprint - serve app pages (private area)
      +   |         |-- templates/                      # UI Kit Pages
          |              |
      -   |              |-- index.html                 # Default page
      -   |              |-- page-404.html              # Error 404 - mandatory page
      -   |              |-- page-500.html              # Error 500 - mandatory page
      -   |              |-- page-403.html              # Error 403 - mandatory page
      -   |              |-- *.html                     # All other HTML pages
      +   |              |-- index.html                 # Default page
      +   |              |-- page-404.html              # Error 404 - mandatory page
      +   |              |-- page-500.html              # Error 500 - mandatory page
      +   |              |-- page-403.html              # Error 403 - mandatory page
      +   |              |-- *.html                     # All other HTML pages
          |
      -   |-- ************************************************************************
      -
      + |-- ************************************************************************


      @@ -1286,19 +1268,17 @@ The authentication status is checked by @login_r

      app/base/models.py define the callback functions required by Flask-Login library:

      -
      # File: app/base/models.py
      -
      -@login_manager.user_loader
      -def user_loader(id):
      -    return User.query.filter_by(id=id).first()
      +
      # File: app/base/models.py
       
      -@login_manager.request_loader
      -def request_loader(request):
      -    username = request.form.get('username')
      -    user = User.query.filter_by(username=username).first()
      -    return user if user else None
      +@login_manager.user_loader
      +def user_loader(id):
      +    return User.query.filter_by(id=id).first()
       
      -
      +@login_manager.request_loader +def request_loader(request): + username = request.form.get('username') + user = User.query.filter_by(username=username).first() + return user if user else None


      @@ -1306,13 +1286,11 @@ The authentication status is checked by @login_r

      Usage in contoler (Sample file)

      -
      
      -def sample_method(path):
      +
      def sample_method(path):
       
      -    # Redirect guests users to login page
      -    if not current_user.is_authenticated:
      -        return redirect(url_for('login'))
      -
      + # Redirect guests users to login page + if not current_user.is_authenticated: + return redirect(url_for('login'))


      @@ -1320,7 +1298,7 @@ The authentication status is checked by @login_r

      Usage in view

      -
          <div class="collapse navbar-collapse" id="navigation">
      +
          <div class="collapse navbar-collapse" id="navigation">
               <ul class="navbar-nav ml-auto">
       
               <!-- The Usage of <current_user> object -->
      @@ -1342,8 +1320,7 @@ The authentication status is checked by @login_r
               
       
               </ul>
      -    </div>
      -
      + </div>


      diff --git a/docs/1.0/getting-started/setup-centos-for-development.html b/docs/1.0/getting-started/setup-centos-for-development.html index 3820e86..a6cf4ff 100644 --- a/docs/1.0/getting-started/setup-centos-for-development.html +++ b/docs/1.0/getting-started/setup-centos-for-development.html @@ -676,10 +676,9 @@

      Set up CentOS

      -

      -

      Set Up CentOS

      + +


      -

      CentOS is a Linux distribution that provides a free, community-supported computing platform functionally compatible with its upstream source, Red Hat Enterprise Linux (RHEL). In January 2014, CentOS announced the official joining with Red Hat while staying independent from RHEL under a new CentOS governing board.


      @@ -689,10 +688,8 @@

      The Development Tools package group provides the GNU Compiler Collection (GCC), GNU Debugger (GDB), and other related development tools.

      -
      $ # install Development Tools bundle
      -$ sudo yum group install "Development Tools"
      -
      -
      +
      $ # install Development Tools bundle
      +$ sudo yum group install "Development Tools"


      @@ -701,8 +698,7 @@

      Git is the most popular version control system on Linux. It is easy to use, amazingly fast, it’s very efficient with large projects, and it has an incredible branching system for non-linear development.

      -
      $ sudo yum install git
      -
      +
      $ sudo yum install git


      @@ -710,16 +706,13 @@

      By default, CentOS is not installing python3, but we can easily set up the installation.

      -
      $ sudo yum install python3
      -$
      -
      +
      $ sudo yum install python3

      And Python3 libraries for development

      -
      sudo yum install python3-devel
      -
      +
      sudo yum install python3-devel


      @@ -727,8 +720,7 @@

      Apache is available within CentOS’s default software repositories, which means you can install it with the yum package manager.

      -
      $ sudo yum install httpd
      -
      +
      $ sudo yum install httpd


      @@ -736,17 +728,16 @@


      -
      $ # this cmd will start the server
      -$ sudo systemctl start httpd
      -$
      -$ # test server status
      -$ sudo systemctl status httpd
      -$
      -$ # access the default page with `lynx`
      -$ sudo yum install lynx
      -$
      -$ lynx http://localhost
      -
      +
      $ # this cmd will start the server
      +$ sudo systemctl start httpd
      +$
      +$ # test server status
      +$ sudo systemctl status httpd
      +$
      +$ # access the default page with `lynx`
      +$ sudo yum install lynx
      +$
      +$ lynx http://localhost


      @@ -754,11 +745,10 @@

      Node.js is an open-source, cross-platform, JavaScript runtime environment that executes JavaScript code outside of a browser.

      -
      $ sudo yum install nodejs
      -$
      -$ # check the version
      -$ node --version
      -
      +
      $ sudo yum install nodejs
      +$
      +$ # check the version
      +$ node --version


      @@ -766,11 +756,10 @@

      The yarn is an advanced package management software for Node.js applications. It is a fast, secure, and reliable alternative that any other Nodejs package manager.

      -
      $ sudo npm install yarn -g
      -$
      -$ # check the version
      -$ yarn -v
      -
      +
      $ sudo npm install yarn -g
      +$
      +$ # check the version
      +$ yarn -v


      @@ -779,8 +768,7 @@

      RHEL 8 does not officially support Docker; in this section, we will show how to install the new set of container tools as well as the old lady, docker package. The docker package is replaced by the Container Tools module, which consists of tools such as Podman, Buildah, Skope, and several others.

      -
      $ dnf module install -y container-tools
      -
      +
      $ dnf module install -y container-tools


      @@ -789,10 +777,9 @@

      Now install docker from the official repositories by running the following commands. Here, the yum-utils package provides the yum-config-manager utility.

      -
      $ dnf install yum-utils
      -$ yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
      -$ dnf install containerd.io docker-ce docker-ce-cli
      -
      +
      $ dnf install yum-utils
      +$ yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
      +$ dnf install containerd.io docker-ce docker-ce-cli


      @@ -803,15 +790,15 @@

      To install DNF on RHEL/CentOS 7 systems, you need to set up and enable epel Yum repository before installing DNF

      -
      $ # Initial Setup
      -$ yum install epel-release
      -$
      -$ # Install `DNF` tool
      -$ yum install dnf
      -$
      -$ # test the installation
      -$ dnf –help
      -
      +
      $ # Initial Setup
      +$ yum install epel-release
      +$
      +$ # Install `DNF` tool
      +$ yum install dnf
      +$
      +$ # test the installation
      +$ dnf –help
      +
      diff --git a/docs/1.0/getting-started/setup-ubuntu-for-development.html b/docs/1.0/getting-started/setup-ubuntu-for-development.html index c48b196..ad00123 100644 --- a/docs/1.0/getting-started/setup-ubuntu-for-development.html +++ b/docs/1.0/getting-started/setup-ubuntu-for-development.html @@ -672,10 +672,9 @@

      Setup Ubuntu for Developers

      -

      -

      Setup Ubuntu for developers

      -
      +

      +

      Ubuntu is a complete Linux operating system, freely available with both community and professional support. Ubuntu is suitable for both desktop and server use. The current Ubuntu release supports many architectures: Intel x86 (IBM-compatible PC), AMD64 (x86-64), ARMv7, ARMv8.

      Ubuntu includes thousands of pieces of software, starting with the Linux kernel version 4.15 and GNOME 3.28, and covering every standard desktop application from word processing and spreadsheet applications to internet access applications, web server software, email software, programming languages and tools and of course several games. For more information please access the official website: Ubuntu.com

      @@ -687,10 +686,8 @@

      The Build Essential package group provides the GNU Compiler Collection (GCC), GNU Debugger (GDB), and other related development tools.

      -
      $ # install Development Tools bundle
      -$ sudo apt install build-essential
      -
      -
      +
      $ # install Development Tools bundle
      +$ sudo apt install build-essential


      @@ -699,8 +696,7 @@

      Git is the most popular version control system on Linux. It is easy to use, amazingly fast, it’s very efficient with large projects, and it has an incredible branching system for non-linear development.

      -
      $ sudo apt install install git
      -
      +
      $ sudo apt install install git


      @@ -708,16 +704,14 @@

      Ubuntu comes with both Python 2.7 and Python 3.5 by default. You can install Python 3.6 along with them via a third-party PPA by doing the following steps:

      -
      $ sudo add-apt-repository ppa:jonathonf/python-3.6
      -
      +
      $ sudo add-apt-repository ppa:jonathonf/python-3.6

      And Python3 libraries for development

      -
      $ sudo apt-get update
      -$ sudo apt-get install python3.6
      -
      +
      $ sudo apt-get update
      +$ sudo apt-get install python3.6


      @@ -725,11 +719,10 @@

      Node.js is an open-source, cross-platform, JavaScript runtime environment that executes JavaScript code outside of a browser.

      -
      $ sudo apt-get install install nodejs
      -$
      -$ # check the version
      -$ node --version
      -
      +
      $ sudo apt-get install install nodejs
      +$
      +$ # check the version
      +$ node --version


      @@ -737,11 +730,11 @@

      The yarn is an advanced package management software for Node.js applications. It is a fast, secure, and reliable alternative that any other Nodejs package manager.

      -
      $ sudo npm install yarn -g
      -$
      -$ # check the version
      -$ yarn -v
      -
      +
      $ sudo npm install yarn -g
      +$
      +$ # check the version
      +$ yarn -v
      +
      diff --git a/docs/1.0/getting-started/setup-windows-for-development.html b/docs/1.0/getting-started/setup-windows-for-development.html index de1444d..de7e3fd 100644 --- a/docs/1.0/getting-started/setup-windows-for-development.html +++ b/docs/1.0/getting-started/setup-windows-for-development.html @@ -672,10 +672,9 @@

      Setup Windows for Developers

      -

      -

      Setup Windows for developers

      -
      +

      +

      Microsoft Windows, commonly referred to as Windows, is a group of several proprietary graphical operating system families, all of which are developed and marketed by Microsoft. Each family caters to a certain sector of the computing industry. Active Microsoft Windows families include Windows NT and Windows IoT; these may encompass subfamilies, e.g. Windows Server or Windows Embedded Compact (Windows CE). Defunct Microsoft Windows families include Windows 9x, Windows Mobile and Windows Phone.


      @@ -714,9 +713,8 @@

      If the installation goes well, test the Python execution from the terminal:

      -
      $ python --version
      -Python 3.7.2
      -
      +
      $ python --version
      +Python 3.7.2


      @@ -730,13 +728,12 @@ Python 3.7.2
    • Test the installation by typing git
    -
    $ git
    -usage: git [--version] [--help] [-C <path>] [-c name=value]
    -           [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
    -           [-p | --paginate | --no-pager] [--no-replace-objects] [--bare]
    -           [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
    -           <command> [<args>]
    -
    +
    $ git
    +usage: git [--version] [--help] [-C <path>] [-c name=value]
    +           [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
    +           [-p | --paginate | --no-pager] [--no-replace-objects] [--bare]
    +           [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
    +           <command> [<args>]

    For more information about Git please access:

    @@ -759,9 +756,9 @@ usage: git [--versionExecute the installer, and choosing the default options should be enough to have a successfull installation:

    -
    $ node -v
    -$ npm -v
    -
    +
    $ node -v
    +$ npm -v
    +