1 Star 0 Fork 0

go7th/data_pro

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
Running the Tornado Blog example app
====================================
This demo is a simple blogging engine that uses MySQL to store posts and
Google Accounts for author authentication. Since it depends on MySQL, you
need to set up MySQL and the database schema for the demo to run.

If you have `docker` and `docker-compose` installed, the demo and all
its prerequisites can be installed with `docker-compose up`.

1. Install prerequisites and build tornado

   See http://www.tornadoweb.org/ for installation instructions. If you can
   run the "helloworld" example application, your environment is set up
   correctly.

2. Install MySQL if needed

   Consult the documentation for your platform. Under Ubuntu Linux you
   can run "apt-get install mysql". Under OS X you can download the
   MySQL PKG file from http://dev.mysql.com/downloads/mysql/

3. Install Python prerequisites

   Install the packages MySQL-python, torndb, and markdown (e.g. using pip or
   easy_install). Note that these packages currently only work on
   Python 2. Tornado supports Python 3, but this blog demo does not.

3. Connect to MySQL and create a database and user for the blog.

   Connect to MySQL as a user that can create databases and users:
   mysql -u root

   Create a database named "blog":
   mysql> CREATE DATABASE blog;

   Allow the "blog" user to connect with the password "blog":
   mysql> GRANT ALL PRIVILEGES ON blog.* TO 'blog'@'localhost' IDENTIFIED BY 'blog';

4. Create the tables in your new database.

   You can use the provided schema.sql file by running this command:
   mysql --user=blog --password=blog --database=blog < schema.sql

   You can run the above command again later if you want to delete the
   contents of the blog and start over after testing.

5. Run the blog example

   With the default user, password, and database you can just run:
   ./blog.py

   If you've changed anything, you can alter the default MySQL settings
   with arguments on the command line, e.g.:
   ./blog.py --mysql_user=casey --mysql_password=happiness --mysql_database=foodblog

6. Visit your new blog

   Open http://localhost:8888/ in your web browser. You will be redirected to
   a Google account sign-in page because the blog uses Google accounts for
   authentication.

   Currently the first user to connect will automatically be given the
   ability to create and edit posts.

   Once you've created one blog post, subsequent users will not be
   prompted to sign in.

空文件

简介

基于tornado的企业网站 展开 收起
Python
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/null_037_9505/data_pro.git
git@gitee.com:null_037_9505/data_pro.git
null_037_9505
data_pro
data_pro
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385