<commit_before><!DOCTYPE html>
<html lang="en">

<head>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="Personal website of Kaushik Raj">

    <title>SB-Admin-2 with Flask-Admin - <NAME></title>

    <link rel="canonical" href="http://kaushikraj.com/2015/09/18/sb-admin-2-admin-flask/">

    <!-- Bootstrap Core CSS -->
    <link rel="stylesheet" href="/css/bootstrap.min.css">

    <!-- Custom CSS -->
    <link rel="stylesheet" href="/css/clean-blog.css">

    <!-- Pygments Github CSS -->
    <link rel="stylesheet" href="/css/syntax.css">

    <!-- Custom Fonts -->
    <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css" rel="stylesheet" type="text/css">
    <link href='//fonts.googleapis.com/css?family=Lora:400,700,400italic,700italic' rel='stylesheet' type='text/css'>
    <link href='//fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800' rel='stylesheet' type='text/css'>

    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
        <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
        <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->

</head>


<body>

    <!-- Navigation -->
<nav class="navbar navbar-default navbar-custom navbar-fixed-top">
    <div class="container-fluid">
        <!-- Brand and toggle get grouped for better mobile display -->
        <div class="navbar-header page-scroll">
            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="/">Kaushik Raj</a>
        </div>

        <!-- Collect the nav links, forms, and other content for toggling -->
        <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
            <ul class="nav navbar-nav navbar-right">
                <li>
                    <a href="/">Home</a>
                </li>
                
                <li>
                    <a href="/about/">About</a>
                </li>
                
            </ul>
        </div>
        <!-- /.navbar-collapse -->
    </div>
    <!-- /.container -->
</nav>


    <!-- Post Header -->
<header class="intro-header" style="background-image: url('/img/bg/post-3.jpg')">
    <div class="container">
        <div class="row">
            <div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
                <div class="post-heading">
                    <h1>SB-Admin-2 with Flask-Admin</h1>
                    
                    <h2 class="subheading">Now using Flask-Admin and is way more cooler.</h2>
                    
                    <span class="meta">Posted by <NAME> on September 18, 2015</span>
                </div>
            </div>
        </div>
    </div>
</header>

<!-- Post Content -->
<article>
    <div class="container">
        <div class="row">
            <div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">

				<p>
The new template is an improvement over the <a href="/2015/08/27/sb-admin-2-python/">SB-Admin-2 in Python</a> template.
This template uses <a href="http://flask-admin.readthedocs.org/en/latest/">Flask-Admin</a> and
<a href="https://flask-login.readthedocs.org/en/latest/">Flask-Login</a>. Flask-Admin allows to represent all the pages as an admin index.
Flask-Login helps with authentication.
</p>

<p>
Most of the UI controls have been made into macros (where it make sense). The macros get the data from a stub.
</p>

<p align="center">
    <img class="img-responsive" src="/img/sb-admin-2.jpg" alt="SB-Admin-2" />
</p>

<h2 class="section-heading">
Installation
</h2>

<p>
Clone the code from <a href="https://github.com/kaushikraj/sb-admin-2-flask-admin">https://github.com/kaushikraj/sb-admin-2-flask-admin</a>
</p>

<pre>
    <code>
    $virtaulenv env
    $source env/bin/activate
    $pip install -r requirements.txt
    </code>
</pre>

<p>
Optional step (to get the latest bower components).
</p>

<pre>
    <code>
    $bower install bower.json
    </code>
</pre>

<h2 class="section-heading">
Executing the sample
</h2>

<pre>
<code>
    $python run.py
</code>
</pre>

<p>
Load the URL (http://localhost:5000/) on browser. Use the credentials "<PASSWORD>:<PASSWORD>" or "<PASSWORD>:<PASSWORD>" to login.
</p>


                <hr>

                <ul class="pager">
                    <commit_msg>fixed typo<commit_after><!DOCTYPE html>
<html lang="en">

<head>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="Personal website of Kaushik Raj">

    <title>SB-Admin-2 with Flask-Admin - Kaushik Raj</title>

    <link rel="canonical" href="http://kaushikraj.com/2015/09/18/sb-admin-2-admin-flask/">

    <!-- Bootstrap Core CSS -->
    <link rel="stylesheet" href="/css/bootstrap.min.css">

    <!-- Custom CSS -->
    <link rel="stylesheet" href="/css/clean-blog.css">

    <!-- Pygments Github CSS -->
    <link rel="stylesheet" href="/css/syntax.css">

    <!-- Custom Fonts -->
    <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css" rel="stylesheet" type="text/css">
    <link href='//fonts.googleapis.com/css?family=Lora:400,700,400italic,700italic' rel='stylesheet' type='text/css'>
    <link href='//fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800' rel='stylesheet' type='text/css'>

    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
        <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
        <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->

</head>


<body>

    <!-- Navigation -->
<nav class="navbar navbar-default navbar-custom navbar-fixed-top">
    <div class="container-fluid">
        <!-- Brand and toggle get grouped for better mobile display -->
        <div class="navbar-header page-scroll">
            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="/"><NAME></a>
        </div>

        <!-- Collect the nav links, forms, and other content for toggling -->
        <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
            <ul class="nav navbar-nav navbar-right">
                <li>
                    <a href="/">Home</a>
                </li>
                
                <li>
                    <a href="/about/">About</a>
                </li>
                
            </ul>
        </div>
        <!-- /.navbar-collapse -->
    </div>
    <!-- /.container -->
</nav>


    <!-- Post Header -->
<header class="intro-header" style="background-image: url('/img/bg/post-3.jpg')">
    <div class="container">
        <div class="row">
            <div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
                <div class="post-heading">
                    <h1>SB-Admin-2 with Flask-Admin</h1>
                    
                    <h2 class="subheading">Now using Flask-Admin and is way more cooler.</h2>
                    
                    <span class="meta">Posted by <NAME> on September 18, 2015</span>
                </div>
            </div>
        </div>
    </div>
</header>

<!-- Post Content -->
<article>
    <div class="container">
        <div class="row">
            <div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">

				<p>
The new template is an improvement over the <a href="/2015/08/27/sb-admin-2-python/">SB-Admin-2 in Python</a> template.
This template uses <a href="http://flask-admin.readthedocs.org/en/latest/">Flask-Admin</a> and
<a href="https://flask-login.readthedocs.org/en/latest/">Flask-Login</a>. Flask-Admin allows to represent all the pages as an admin index.
Flask-Login helps with authentication.
</p>

<p>
Most of the UI controls have been made into macros (where it make sense). The macros get the data from a stub.
</p>

<p align="center">
    <img class="img-responsive" src="/img/sb-admin-2.jpg" alt="SB-Admin-2" />
</p>

<h2 class="section-heading">
Installation
</h2>

<p>
Clone the code from <a href="https://github.com/kaushikraj/sb-admin-2-flask-admin">https://github.com/kaushikraj/sb-admin-2-flask-admin</a>
</p>

<pre>
    <code>
    $virtaulenv env
    $source env/bin/activate
    $pip install -r requirements.txt
    </code>
</pre>

<p>
Optional step (to get the latest bower components).
</p>

<pre>
    <code>
    $bower install bower.json
    </code>
</pre>

<h2 class="section-heading">
Executing the sample
</h2>

<pre>
<code>
    $python app.py
</code>
</pre>

<p>
Load the URL (http://localhost:5000/) on browser. Use the credentials "<PASSWORD>:<PASSWORD>" or "mary:<PASSWORD>" to login.
</p>


                <hr>

                <ul class="pager">
                    
{'fraction_non_alphanumeric': 0.17816382183617815, 'fraction_numerical': 0.02322997677002323, 'mean_word_length': 2.322818791946309, 'pattern_counts': {'":': 0, '<': 266, '<?xml version=': 0, '>': 266, 'https://': 10, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1449565', 'n_tokens_mistral': 3444, 'n_tokens_neox': 3180, 'n_words': 721}