Category Archives: C#.Net

Create Checked List Box in WPF C#


Checked List box is the combination of Text and Check box. In the C# tool box you have Listbox and Combo box , not the checked listbox.

The Data template become the savior for you. We can create a Data Template for our List box.

In fact Data template can be used to customize the look and feel of the listbox items, what ever you wish.

Let’s add a Simple ListBox with Check box using XAML code which bind the Product List

<ListBox Style="{DynamicResource prent_and_groups_List}"   Background="LightGreen" SelectedItem="SlectedAccount" ItemsSource="{Binding Products}"   Grid.Row="1" Grid.Column="1"  Grid.RowSpan="2" >
            <ListBox.ItemTemplate>
                <DataTemplate>
                    <CheckBox IsChecked="{Binding Ischecked}" Content="{Binding Name}" />
                </DataTemplate>
            </ListBox.ItemTemplate>
            
        </ListBox>

Flutter


Flutter is Google’s cross platform development framework pored By Dart language. You can write program for Windows, Linux, Android and iOS apps with dart using single code base.

Flutter didn’t have any official IDE , you have to use Android Studio or Visual Studio Code/Atom / any editor of your choice for writing you program. You should install Android studio for full support for Flutter, even though you don’t have to plan to use it.

Flutter has different way of doing things , for more information please head over flutter.dev and get start.

There is huge community of developers is waiting for assist you. Meet official quick start video at Google Developers YouTube channel.

I am planning to write a series post regarding flutter app development. Considering weekly based Flutter widgets review. Checkout the Flutter Widget and Flutter tags

How it differ from Java/ Kotlin based Android Studio Development

Flutter has layout based design, you may miss the Android designer. Basic Building blocks of Flutter is called Widgets. Everything is Widget, button, Text, Table, you can create your own Widget using the existing, that is the beauty of Flutter.

There are plenty of good widget for create great user interface for your app with cool animation. Here a sample code

import 'package:flutter/material.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        
        primarySwatch: Colors.blue,
        // This makes the visual density adapt to the platform that you run
        // the app on. For desktop platforms, the controls will be smaller and
        // closer together (more dense) than on mobile platforms.
        visualDensity: VisualDensity.adaptivePlatformDensity,
      ),
      home: MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  MyHomePage({Key key, this.title}) : super(key: key);

  // This widget is the home page of your application. It is stateful, meaning
  // that it has a State object (defined below) that contains fields that affect
  // how it looks.

  // This class is the configuration for the state. It holds the values (in this
  // case the title) provided by the parent (in this case the App widget) and
  // used by the build method of the State. Fields in a Widget subclass are
  // always marked "final".

  final String title;

  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  int _counter = 0;

  void _incrementCounter() {
    setState(() {
      // This call to setState tells the Flutter framework that something has
      // changed in this State, which causes it to rerun the build method below
      // so that the display can reflect the updated values. If we changed
      // _counter without calling setState(), then the build method would not be
      // called again, and so nothing would appear to happen.
      _counter++;
    });
  }

  @override
  Widget build(BuildContext context) {
    // This method is rerun every time setState is called, for instance as done
    // by the _incrementCounter method above.
    //
    // The Flutter framework has been optimized to make rerunning build methods
    // fast, so that you can just rebuild anything that needs updating rather
    // than having to individually change instances of widgets.
    return Scaffold(
      appBar: AppBar(
        // Here we take the value from the MyHomePage object that was created by
        // the App.build method, and use it to set our appbar title.
        title: Text(widget.title),
      ),
      body: Center(
        // Center is a layout widget. It takes a single child and positions it
        // in the middle of the parent.
        child: Column(
          // Column is also a layout widget. It takes a list of children and
          // arranges them vertically. By default, it sizes itself to fit its
          // children horizontally, and tries to be as tall as its parent.
          //
          // Invoke "debug painting" (press "p" in the console, choose the
          // "Toggle Debug Paint" action from the Flutter Inspector in Android
          // Studio, or the "Toggle Debug Paint" command in Visual Studio Code)
          // to see the wireframe for each widget.
          //
          // Column has various properties to control how it sizes itself and
          // how it positions its children. Here we use mainAxisAlignment to
          // center the children vertically; the main axis here is the vertical
          // axis because Columns are vertical (the cross axis would be
          // horizontal).
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            Text(
              'You have pushed the button this many times:',
            ),
            Text(
              '$_counter',
              style: Theme.of(context).textTheme.headline4,
            ),
          ],
        ),
      ),
      floatingActionButton: FloatingActionButton(
        onPressed: _incrementCounter,
        tooltip: 'Increment',
        child: Icon(Icons.add),
      ), // This trailing comma makes auto-formatting nicer for build methods.
    );
  }
}

Hope the documentation will help you under stand the structure of flutter app

How to use tabular data with Xceed.Docx


Xceed.Words is a .Net library which can be use to process various file format such as xps,docx,pdf,html etc. In the last post we learned how to use templates with Docx.

We can create and use Tabular data with Table and Row object provided by this library. Based on document

var t = document.Tables;

The columns are automatically generated , so no need to worry about it. We can use Row object and Insert method to create rows.

var sorted = rep_grid.Items.Cast(Model).ToList();
{
Row newrow;
int i = 1;
foreach (var v in sorted)
{
newrow = t[1].InsertRow();
newrow.Cells[0].Paragraphs[0].Append(v.Date.ToShortDateString());

Complete Code

                using (var document = Xceed.Words.NET.DocX.Create(fname))
                {
                    document.ApplyTemplate(@"doctemplates /CashLedger.dotx");
                    document.ReplaceText("[MyCompany]", ViewModels_Variables.ModelViews.CompanyProfile[0].company);
                    document.ReplaceText("[Clandmark]", " | " + ViewModels_Variables.ModelViews.CompanyProfile[0].lmark);
 
                    var t = document.Tables;
                    var sorted = rep_grid.Items.Cast<CashBookModel>().ToList();
                    {
                        Row newrow;
                        int i = 1;
                        foreach (var v in sorted)
                        {
                            ++i;
                            newrow = t[1].InsertRow();
                            newrow.Cells[0].Paragraphs[0].Append(v.Date.ToShortDateString());
}
document.Save();
document.Dispose();


Do you know that Xceed allows you to convert documents to other format by simply using

doc.SaveToFile(xpsfn, Spire.Doc.FileFormat.XPS);

C# WPF – Custom Observable String Dictionary for Binding


Observable collection objects come handy when you dealing with Binding controls with values in WPF and C#.Net.

Dictionary object help you to build a collection values using a single dictionary with key, value pair.

With both we can build a custom class for binding and dynamically updated collection, which can be used for multiple purposes, around your projects.

The root : Observable Dictionary

// The orginal class was obtained from official site, then I made some desirable changes such as `UpdateOrAdd`,
// which I think usefull for others
//
using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
namespace mynamespace
{
class ObservableDictionary : IDictionary<string, string>, INotifyPropertyChanged
{
//------------------------------------------------------
//
// Constructors
//
//------------------------------------------------------
#region Constructors
/// <summary>
/// Creates a ContentLocatorPart with the specified type name and namespace.
/// </summary>
public ObservableDictionary()
{
_nameValues = new Dictionary<string, string>();
}
#endregion Constructors
//------------------------------------------------------
//
// Public Methods
//
//------------------------------------------------------
#region Public Methods
/// <summary>
/// Adds a key/value pair to the ContentLocatorPart. If a value for the key already
/// exists, the old value is overwritten by the new value.
/// </summary>
/// <param name="key">key</param>
/// <param name="val">value</param>
/// <exception cref="ArgumentNullException">key or val is null</exception>
/// <exception cref="ArgumentException">a value for key is already present in the locator part</exception>
public void Add(string key, string val)
{
if (key == null || val == null)
{
throw new ArgumentNullException(key == null ? "key" : "val");
}
_nameValues.Add(key, val);
FireDictionaryChanged();
}
/// <summary>
/// Removes all name/value pairs from the ContentLocatorPart.
/// </summary>
public void Clear()
{
int count = _nameValues.Count;
if (count > 0)
{
_nameValues.Clear();
// Only fire changed event if the dictionary actually changed
FireDictionaryChanged();
}
}
public void UpdateOrAdd(string key,string value)
{
if (ContainsKey(key) == false)
{
Add(key, value);
}
else
{
Remove(key);
Add(key, value);
}
}
/// <summary>
/// Returns whether or not a value of the key exists in this ContentLocatorPart.
/// </summary>
/// <param name="key">the key to check for</param>
/// <returns>true - yes, false - no</returns>
public bool ContainsKey(string key)
{
return _nameValues.ContainsKey(key);
}
/// <summary>
/// Removes the key and its value from the ContentLocatorPart.
/// </summary>
/// <param name="key">key to be removed</param>
/// <returns>true - the key was found in the ContentLocatorPart, false o- it wasn't</returns>
public bool Remove(string key)
{
bool exists = _nameValues.Remove(key);
// Only fire changed event if the key was actually removed
if (exists)
{
FireDictionaryChanged();
}
return exists;
}
/// <summary>
/// Returns an enumerator for the key/value pairs in this ContentLocatorPart.
/// </summary>
/// <returns>an enumerator for the key/value pairs; never returns null</returns>
IEnumerator IEnumerable.GetEnumerator()
{
return _nameValues.GetEnumerator();
}
/// <summary>
/// Returns an enumerator forthe key/value pairs in this ContentLocatorPart.
/// </summary>
/// <returns>an enumerator for the key/value pairs; never returns null</returns>
public IEnumerator<KeyValuePair<string, string>> GetEnumerator()
{
return ((IEnumerable<KeyValuePair<string, string>>)_nameValues).GetEnumerator();
}
/// <summary>
///
/// </summary>
/// <param name="key"></param>
/// <param name="value"></param>
/// <returns></returns>
/// <exception cref="ArgumentNullException">key is null</exception>
public bool TryGetValue(string key, out string value)
{
if (key == null)
throw new ArgumentNullException("key");
return _nameValues.TryGetValue(key, out value);
}
/// <summary>
///
/// </summary>
/// <param name="pair"></param>
/// <exception cref="ArgumentNullException">pair is null</exception>
void ICollection<KeyValuePair<string, string>>.Add(KeyValuePair<string, string> pair)
{
((ICollection<KeyValuePair<string, string>>)_nameValues).Add(pair);
}
/// <summary>
///
/// </summary>
/// <param name="pair"></param>
/// <returns></returns>
/// <exception cref="ArgumentNullException">pair is null</exception>
bool ICollection<KeyValuePair<string, string>>.Contains(KeyValuePair<string, string> pair)
{
return ((ICollection<KeyValuePair<string, string>>)_nameValues).Contains(pair);
}
/// <summary>
///
/// </summary>
/// <param name="pair"></param>
/// <returns></returns>
/// <exception cref="ArgumentNullException">pair is null</exception>
bool ICollection<KeyValuePair<string, string>>.Remove(KeyValuePair<string, string> pair)
{
return ((ICollection<KeyValuePair<string, string>>)_nameValues).Remove(pair);
}
/// <summary>
///
/// </summary>
/// <param name="target"></param>
/// <param name="startIndex"></param>
/// <exception cref="ArgumentNullException">target is null</exception>
/// <exception cref="ArgumentOutOfRangeException">startIndex is less than zero or greater than the lenght of target</exception>
void ICollection<KeyValuePair<string, string>>.CopyTo(KeyValuePair<string, string>[] target, int startIndex)
{
if (target == null)
throw new ArgumentNullException("target");
if (startIndex < 0 || startIndex > target.Length)
throw new ArgumentOutOfRangeException("startIndex");
((ICollection<KeyValuePair<string, string>>)_nameValues).CopyTo(target, startIndex);
}
#endregion Public Methods
//------------------------------------------------------
//
// Public Operators
//
//------------------------------------------------------
//------------------------------------------------------
//
// Public Events
//
//------------------------------------------------------
//------------------------------------------------------
//
// Public Properties
//
//------------------------------------------------------
#region Public Properties
/// <summary>
/// The number of name/value pairs in this ContentLocatorPart.
/// </summary>
/// <value>count of name/value pairs</value>
public int Count
{
get
{
return _nameValues.Count;
}
}
/// <summary>
/// Indexer provides lookup of values by key. Gets or sets the value
/// in the ContentLocatorPart for the specified key. If the key does not exist
/// in the ContentLocatorPart,
/// </summary>
/// <param name="key">key</param>
/// <returns>the value stored in this locator part for key</returns>
public string this[string key]
{
get
{
if (key == null)
{
throw new ArgumentNullException("key");
}
string value = null;
_nameValues.TryGetValue(key, out value);
return value;
}
set
{
if (key == null)
{
throw new ArgumentNullException("key");
}
if (value == null)
{
throw new ArgumentNullException("value");
}
string oldValue = null;
_nameValues.TryGetValue(key, out oldValue);
// If the new value is actually different, then we add it and fire
// a change notification
if ((oldValue == null) || (oldValue != value))
{
_nameValues[key] = value;
FireDictionaryChanged();
}
}
}
/// <summary>
///
/// </summary>
public bool IsReadOnly
{
get
{
return false;
}
}
/// <summary>
/// Returns a collection of all the keys in this ContentLocatorPart.
/// </summary>
/// <value>keys</value>
public ICollection<string> Keys
{
get
{
return _nameValues.Keys;
}
}
/// <summary>
/// Returns a collection of all the values in this ContentLocatorPart.
/// </summary>
/// <value>values</value>
public ICollection<string> Values
{
get
{
return _nameValues.Values;
}
}
#endregion Public Properties
//------------------------------------------------------
//
// Public Events
//
//------------------------------------------------------
//------------------------------------------------------
//
// Internal Methods
//
//------------------------------------------------------
//------------------------------------------------------
//
// Internal Operators
//
//------------------------------------------------------
//------------------------------------------------------
//
// Internal Events
//
//------------------------------------------------------
#region Public Events
/// <summary>
///
/// </summary>
public event PropertyChangedEventHandler PropertyChanged;
#endregion Public Events
//------------------------------------------------------
//
// Internal Properties
//
//------------------------------------------------------
//------------------------------------------------------
//
// Private Methods
//
//------------------------------------------------------
#region Private Methods
/// <summary>
/// Notify the owner this ContentLocatorPart has changed.
/// </summary>
private void FireDictionaryChanged()
{
if (PropertyChanged != null)
{
PropertyChanged(this, new PropertyChangedEventArgs(null));
}
}
#endregion Private Methods
//------------------------------------------------------
//
// Private Fields
//
//------------------------------------------------------
#region Private Fields
/// <summary>
/// The internal data structure.
/// </summary>
private Dictionary<string, string> _nameValues;
#endregion Private Fields
}
}

Our class utilizes two interphases namely Dictionary and INotifyPropertyChanged. The INotifyPropertyChanged and the implemented methods help use to update the data source where the object is binded. As a result when ever the object updated with new values, the control automatically updates.

How to use

Drop the class file to your solution and create an object of our class and also add some values to the dictionary as follows

ObservableDictionary _items = new ObservableDictionary();
_items.UpdateOrAdd("Dev", "Manoj");
_items.UpdateOrAdd("Lan", "C#");
tbl_lan.DataCOntext=_items;
tbl_lan.DataCOntext=_items;

xaml

 <TextBlock x:Name="tbl_dev" TextAlignment="Left" HorizontalAlignment="Left" Text="{Binding [Dev]}" Foreground="LightGoldenrodYellow" />
 <TextBlock x:Name="tbl_lan" TextAlignment="Left" HorizontalAlignment="Left" Text="{Binding [Lan]}" Foreground="LightGoldenrodYellow" />        

Go head and customize the class to meet your requirements

Nullable date with Linq and Model class in C#


In C# Model class you may have experienced a nullable Error while fetching the rows with nullable column from database to your Model objects.

To treat the nullable in proper way , you have to tell your Model class and Linq this is nullable field.

Model class

*The nullable is applied to Value Type .This is not required for string

In the Model class I have a field edate which is in database is a nullable field. I want to make this field nullable in my model

 class StocKBatchModel
    {
        public int B_Id { get; set; }        
        public string Name { get; set; }
        public DateTime? Edate { get; set; }
}

By placing ? after the type of my class property , it becomes nullable. Say the DateTime becomes nullable , I can use the same in Linq in my LInq query as follows

 
var blist = (from m in batch_table.AsEnumerable()                                 
                                 select new
                                 {
                                     obj = new Models.StocKBatchModel()
                                     {
                                         B_Id = m.Field<int>("b_id"),
                                         Name = m.Field<string>("name"),
                                         Edate = m.Field<DateTime?>("exp_date"),                                       
                                 }.obj).ToList();

Hope this will helpful for someone.

How to find sum from obervablecollection list in C#


This example shows how you can simply find aggregate functions like sum, average etc from a Obervablecollection list.

ObservableCollection and Model-View-ViewModel is a ideal for a typical WPF application, these are programmers two of the best tools.

In this example I am using a model class , and want to find sum of inventory qty from batch list.

double qty=_batches.Sum((b) => b.qty));

Here _batches is representing the ObservableCollection of Model batch.

Storyboard animation in WPF C#


WPF allows you to customize the look and feel using XAML and Styles, it allow capable of create some cool animation which is a way of interacting with user and UI. You can use Storyboard with EvenTrigger.

Let’s create a style for a textbox control, which add some color, align text etc ,then add a Style trigger and Event trigger which also add some font animation , want to play while the textbox has focus and lost it’s focus.

The Style

It is a simple style, add font, alignment etc Name the style as NuberTex.

 <Style x:Key="NumberText" TargetType="TextBox">
        <Setter Property="FontSize" Value="18"/>
        <Setter Property="TextAlignment" Value="Right"/>   
        

  </Style>    

To use this style add the following lines to the TextBox control (xaml).

 <TextBox  Style="{DynamicResource NumberText}" />

Storyboard

Now we can add a Event trigger and a story board to the above style. First we create a style trigger and then we want to add some style based on Events, namely Gotfocus and Lostfocus.

<Style.Triggers >
            <Trigger Property="IsFocused" Value="True">
                <Setter Property="Foreground" Value="IndianRed"/>
            </Trigger>
            <EventTrigger RoutedEvent="GotFocus">
                <EventTrigger.Actions>
                    <BeginStoryboard>
                        <Storyboard>
                            <DoubleAnimation Duration="0:0:0:1" To="20" Storyboard.TargetProperty="FontSize" From="18"  />
                        </Storyboard>
                    </BeginStoryboard>
                </EventTrigger.Actions>
            </EventTrigger>
            
            <EventTrigger RoutedEvent="LostFocus">
                <EventTrigger.Actions>
                    <BeginStoryboard>
                        <Storyboard>
                            <DoubleAnimation Duration="0:0:0:1" From="20" Storyboard.TargetProperty="FontSize" To="18"  />
                        </Storyboard>
                    </BeginStoryboard>
                </EventTrigger.Actions>
            </EventTrigger>
            
        </Style.Triggers>

The storyboard is added within the trigger action. We used a double animation which increase the font from range of values specified using To and From, you can specify what event property you want to play using Target property.

Complete Style

Here is the full style

<Style x:Key="NumberText" TargetType="TextBox">
        <Setter Property="FontSize" Value="18"/>
        <Setter Property="TextAlignment" Value="Right"/>         
        
        <Style.Triggers >
            <Trigger Property="IsFocused" Value="True">
                <Setter Property="Foreground" Value="IndianRed"/>
            </Trigger>
            <EventTrigger RoutedEvent="GotFocus">
                <EventTrigger.Actions>
                    <BeginStoryboard>
                        <Storyboard>
                            <DoubleAnimation Duration="0:0:0:1" To="20" Storyboard.TargetProperty="FontSize" From="18"  />
                        </Storyboard>
                    </BeginStoryboard>
                </EventTrigger.Actions>
            </EventTrigger>
            
            <EventTrigger RoutedEvent="LostFocus">
                <EventTrigger.Actions>
                    <BeginStoryboard>
                        <Storyboard>
                            <DoubleAnimation Duration="0:0:0:1" From="20" Storyboard.TargetProperty="FontSize" To="18"  />
                        </Storyboard>
                    </BeginStoryboard>
                </EventTrigger.Actions>
            </EventTrigger>
            
        </Style.Triggers>

    </Style>    

Add a alternate color to ListView rows in WPF using XAML


Using Alteration count you can add Datagrid like alternate background for ListViewItems. There is no alternate background property for ListView control in WPF, instead we can made this possible with style triggers.

Style triggers work with property and we can track the change with trigger value value.

Styles

The alternate color we want to apply is for ListViewItems , so we have to create a Itemcontainer style for ListView as follows.

    <Style TargetType="ListViewItem" x:Key="gridview_itemcontainer1" >
        <Setter Property="Foreground" Value="DarkBlue"/>
        <Setter Property="FontSize" Value="13.5"/>       
    </Style>

You can define the style as resource file or can define as ListView.Resources in your xaml portion of UI.

As ListViewResource

<ListView AlternationCount=2 >
  <ListView.Resources>
   <Style TargetType="ListViewItem" >
        <Setter Property="Foreground" Value="DarkBlue"/>
        <Setter Property="FontSize" Value="13.5"/>       
    </Style>
  </ListView.Resources>

<ListView/>

In our style we are define background and font using Setter. Likewise we can add some Style Triggers. We want to change the color of ListViewItems according to the AlternationIndex value.

Style.Triggers

Add the following style trigger section in our style.

<Style.Triggers>
    <Trigger Property="ItemsControl.AlternationIndex" Value="0">
       <Setter Property="Background" Value="LightBlue"></Setter>
    </Trigger>
    <Trigger Property="ItemsControl.AlternationIndex" Value="1">
       <Setter Property="Background" Value="LightYellow"></Setter>
    </Trigger>
 </Style.Triggers>

We had added two trigger for checking the alternationIndex value and a associated setter for setting background property of ListViewItem.

Our style is finished and purpose is served.

If you are use resource file you can assign the style to Item container as ItemContainerStyle=”{DynamicResource <RESOURCEKEY>}”. Replace the RESOURCE KEY with your own style key.

Change ComboBoxitem color using xaml in WPF


You can reuse styles to customize appearance of components s in WPF . To change the color of Combo items ,you have to create a style for itemcontainer

This can be done as follows

ItemContainer Style

<Style x:Key="Combo+" TargetType="ComboBoxItem">
        <Setter Property="FocusVisualStyle" Value="{x:Null}" />
        <Setter Property="Background" Value="AliceBlue" />
        <Style.Triggers>
            <Trigger Property="IsSelected" Value="True">
                <Setter Property="Foreground" Value="Red"/>
                <Setter Property="Background" Value="GreenYellow"/>
            </Trigger>
        </Style.Triggers>
    </Style>

I have also another style for combo which set font, color etc . You can call the container style directly to Listbox or call from another style which is I am doing right here

Within another style

 <Style x:Key="Combo" TargetType="ComboBox">
        <Setter Property="FontSize" Value="18"/>
        <Setter Property="ItemContainerStyle" Value="{DynamicResource Combo+}"/>         
    </Style>

Within List [Direct way]

 <ComboBox ItemContainerStyle=""="{DynamicResource Combo+}" KeyUp="_TabPress"  TabIndex="10"   x:Name="lstb_base" Grid.Column="1" Grid.Row="10" Margin="0.2,31.6,0,2" Grid.RowSpan="2" Width="99" HorizontalAlignment="Left" >
 <ComboBox Style="{DynamicResource Combo}" KeyUp="_TabPress"  TabIndex="10"   x:Name="lstb_base" Grid.Column="1" Grid.Row="10" Margin="0.2,31.6,0,2" Grid.RowSpan="2" Width="99" HorizontalAlignment="Left" >

In the XAML

In my xaml I just calling the style using

   <ComboBox Style="{DynamicResource Combo}" KeyUp="_TabPress"  TabIndex="10"   x:Name="lstb_base" Grid.Column="1" Grid.Row="10" Margin="0.2,31.6,0,2" Grid.RowSpan="2" Width="99" HorizontalAlignment="Left" >

flask-gentelella : A beautiful admin bootstrap for pythoners


Gentelella is a free to use bootstrap admin template for developing Python Flask web app, with custom Ajax libraries which includes variety of chart scripts like eChart, Morris Chart etc.

It packed with all must have AJAX and CSS libraries for a Python Web Geek

The bootstrap is also a ready to use flask app, all you need to do is customize the custom script. The app uses blueprint to organize flask routes, which is automatically created based on based on modules.

You can develop database powered app with less pain in few hours with this awesome bootstrap from Colorlib.

Clone and start using the project today

git clone https://github.com/afourmy/flask-gentelella.git
cd flask-gentelella

For instruction and the bootstrap project please visit GitHub page

Have a look at my demo app hosted on heroku.com which is not using any database, it depends on simple json API