当前位置: 首页 > 软件库 > Web应用开发 > Web框架 >

Flask-Easy-Template

授权协议 Readme
开发语言 Python
所属分类 Web应用开发、 Web框架
软件类型 开源软件
地区 不详
投 递 者 韩博简
操作系统 跨平台
开源组织
适用人群 未知
 软件概览

Flask Easy-Template

Sadly, I don't have time to maintain this. If you'd like to be a maintainer, drop me a message in an issue !!

Save time on your initial setup. This is a template app that includes the most important things you'll be probably using for your flask projects.

You can change the theme just by replacing one word in base.html

Features:

  • Latest bootstrap template, modernizer, jquery etc. latest, served from content delivery networks.
  • User Registry, Login & Forgot Password
  • Email integration with SendGrid & a contact form with recaptcha
  • A sample tasks database with SQLALchemy with Pagination

How to use it:

  • git clone https://github.com/AndreiD/Flask-Easy-Template.git <project_name> or download the zip
  • pip install -r requirements.txt
  • python run.py -> http://server_ip:5000
Things to do after:
  • check the config.py
  • in run.py edit the port of the app (Default: 5000)

For templates edit /app/templates/base.html

{% set bootstrap_version = '3.3.4' %}{% set jquery_version = '2.1.3' %}{% set modernizer_version = '2.8.3' %}{% set bootswatch_version = '3.3.2' %}{% set bootswatch_theme = 'slate' %}

In case you don't like the "slate" theme, you can chose a nice theme from http://bootswatch.com/ and just replace the theme name

Step 2. ???Step 3. PROFIT

About Stars

Starring a repository allows you to keep track of projects that you find interesting, even if you aren't associated with the project.

When you star a repository, you're actually performing two distinct actions:

Creating a bookmark for easier accessShowing appreciation to the repository maintainer for their work

Extras for you:
  • a supervisord.conf [supervisor is used to monitor the web application and restart it, also starts the app in case you restart your server]
  • a simple nginx.conf
  • after you go into production, uncomment the settings from run.py for the best performance

Your Feedback is appreciated :)

TROUBLESHOOTS FOR BEGINNERS :
- READ FIRST : About Python 2 and 3 compatibility
Some scripts and modules versions required here are written in python 2 and not ready yet for python 3 , 
so it is recommended to download and install both interpreters python 2 and also python 3 (for windows users don't forget to add their folder paths also in your environment variables)
Then when calling python scripts in version 2 or 3 anyway (example with the package manager script PIP), you can run default python command like :
    "python -m pip install ..." or "pip install ..."
To call only python 3 scripts choose  this  instead :
    "py -m pip install ..." or "pip3 install ..."


- Error parsing in requirements.txt ?
    Run instead this compatible formatted file :
        python -m pip install -r requirements-pip2.txt    
    or convert first your requirements.txt to a python 2 pip2 compatible format with this command :
        python -m pip list --format=freeze > requirements.txt


- Error install on Proxytype : SyntaxError like Missing parentheses in call to 'print' ?
    the print function requires parentheses in Python 3 but not in Python 2 which means that the extension that you are trying to install is not yet compatible with python 3
    This is why it is recommended to install python 3 and python 2 by default.
    So run instead this compatible command for python 2 extensions (after installing python 2 if not got it yet) :
        python -m pip install -r requirements-pip2.txt
        or python -m pip install ...


- Error install module Pycrypto : microsoft visual c++ compiler for python 2.7  is required ?
    download and install microsoft visual c++ compiler for python 2.7 here : https://www.microsoft.com/en-us/download/details.aspx?id=44266


- Error Tornado module not found ? 
    it is a problem when installing modules like tornado in a multiple python interpreters environment 
    So run instead this common command python which precize by default  the python 2 version 
        python -m pip install -r requirements-pip2.txt
        or python -m pip install ...
        or python run.py
License: Apache 2.0
Copyright 2015 AndroidAdvance.com

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and

limitations under the License.

  • 使用虚拟环境 虚拟环境使用第三方实用工具virtualenv创建。输入一下命令可以检查系统是否安装了virtualenv virtualenv --version 如果显示错误,你就需要安装这个工具。发行版 大多数Linux发行版都提供了virtualenv包。例如,Ubantu用户可以使用下述命令安装它: sudo apt-gett install python-virtualenv 如果你的

  • from flask import Flask app = Flask(__name__) @app.route('/') def hello_world(): return 'Hello, World!' 启动Server: $ export FLASK_APP=hello.py $ flask run * Running on http://127.0.0.1:5000/ 或者:

  • 一、初始化flask实例 在项目路径下,建立一个用于初始化app的实例对象的app.py文件和一个用于项目启动的文件(一般与项目同名)的py文件,这里使用manage.py作为示例。 # vi app.py from flask import Flask from configs import Config def create_app(config): app = Flask(__na

  • 原文:Easy WebSockets with Flask and Gevent 但是还没有翻译完,后面会进行更新的 我很高兴地介绍Flask-SocketIO,这是一个非常易于使用的扩展,可以在Flask应用程序中启用WebSocket通信。 WebSocket是啥? WebSocket是HTML5引入的新的通信协议,主要由Web客户端和服务器实现,当然它也可以在Web之外实现。 与HTTP连接

  • 最近接触了机器学习项目线上服务部署相关的东西,想着做一个小的完整的机器学习项目类似于电影推荐那种,考虑到用flask来实现,所以记录下flask的相关知识。 1.flask介绍 Flask是一个基于Python开发并且依赖jinja2模板和Werkzeug WSGI服务的一个微型框架,对于Werkzeug本质是Socket服务端,其用于接收http请求并对请求进行预处理,然后触发Flask框架,开

 相关资料
  • Easy News是一个可以让您轻松显示网站新闻或图文内容展示的jQuery插件,可设定Fade In-Out ,Slide Up-Down, Left To Right 的效果,调整显示速度,可自行修改CSS改变您为喜欢的风格。 Easy News 1.0.6  有以下的特点 跨浏览器( 已于 IE7 及 Firefox 2.0 测试正常) 可 "往前" 或 "往后" 自动播放 鼠标移过的暂停功

  • Easy Slider enables images or any content to slide horizontally or vertically on click. It is configurable with css alone. So, basically you link to plugin file, set the content up and style it with css.

  • easy-ajax 是为了治理前端乱写 Ajax 方法而生。基于 jquery 封装一些常用方法,后期计划加入前端数据缓存功能。 普通 Aajax 请求,及 GET、POST 封装,以及文件上传 源代码注释清晰,一目了然。 使用方法如下: <script src="easy.ajax.js"></script> API: config配置项:config{    jqueryAjax默认配置外增加

  • 省去复杂的excel代码,使用xml配置的形式完成导入导出 一、jar包依赖 二、如何使用?参考 org.easy.excel.test.ExportTest org.easy.excel.test.ImportTest 支持,复杂对象导航,支持自定义(单元格宽度) 标题样式(背景色,对齐方式,字体颜色) 导出测试使用时,运行org.easy.excel.test.ExportTest类的测试方法

  • EasyXls 使用EasyXls可以使你很方便的操作Excel。本项目目的是解决简单的(不带任何样式)xls文件的导入导出。   处理XML时由于使用了JAXB,所以需要使用jdk1.6u14以上版本。  JAXB处理中文xml时容易出现乱码,因此这里限制XML为GBK编码,在Windwos中的保存格式为ANSI即可。   EasyXls特点 支持xls转换为List<Pojo>对象 支持xls

  • 为简化开发工作、提高生产效率而生 Easy-Es是一款简化 ElasticSearch 搜索引擎操作的开源框架,全自动智能索引托管。 目前功能丰富度和易用度及性能已全面领先SpringData-Elasticsearch. 简化CRUD及其它高阶操作,可以更好的帮助开发者减轻开发负担 底层采用Es官方提供的RestHighLevelClient,保证其原生性能及拓展性. 项目推广初期,还望大家能够