Coder Social home page Coder Social logo

stopspazzing / sanic-mdl-blog Goto Github PK

View Code? Open in Web Editor NEW
50.0 2.0 8.0 1.36 MB

An async Python server running Material Design Lite Blog template

HTML 50.95% Python 29.94% CSS 19.12%
mdl sanic server python blog material-design-lite async asynchronous async-python

sanic-mdl-blog's Introduction

Codacy Badge

Material Design Lite Blog Using Sanic

A Sanic (asynchronous) server running with the blog template from Material Design Lite . Eventually will become a 'live' blog template with an admin dashboard.

Prerequisites

You need several packages first for all pip packages to completely install.

NOTICE:

Working on Windows with Visual C++ v14 installed. Please use instructions here: https://www.scivision.dev/python-windows-visual-c-14-required/

So here is a list of packages required:

python & python-dev >=3.6

Installation

pip install -r requirements.txt

Configuration

100% following Sanic's import from config: http://sanic.readthedocs.io/en/latest/sanic/config.html#from-a-file For Database connection urls, use https://docs.sqlalchemy.org/en/13/core/engines.html#database-urls

Database type names:

sqlite
mysql
postgresql

Example config:

DB_URI = 'sqlite:///app.db'
DB_TYPE = 'sqlite'
DEMO_CONTENT = False

Either you can create a config file config.py file in same directory as main.py or you may load the program with the location of the file to variable config_file like so:

MY_SETTINGS=/path/to/config_file python3 main.py

Starting Server

To start the server: python3 run.py

To access server: http://127.0.0.1:8000

TODO

  1. Finish Database support
  2. Admin Page completion
  3. Possibly most common plugins for Wordpress sites (Contact Forms, Yoast) as built in features you could enable.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.