Skip to content

Commit

Permalink
Flask_Movie_Website:star:
Browse files Browse the repository at this point in the history
  • Loading branch information
Henryhaohao committed Oct 11, 2018
0 parents commit 20af6df
Show file tree
Hide file tree
Showing 3,216 changed files with 487,358 additions and 0 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
Binary file added Pic/admin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Pic/admin_preview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Pic/home.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Pic/home_preview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Pic/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Pic/play.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Pic/project_catolog.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Pic/run.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Pic/video.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Pic/website.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
45 changes: 45 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
基于Python的Flask框架的在线电影网站系统 ![enter image description here](Pic/logo.png)
===========================
![](https://img.shields.io/badge/Python-3.6.3-green.svg) ![](https://img.shields.io/badge/Flask-0.12.2-green.svg) ![](https://img.shields.io/badge/Flask_MySQLdb-0.2.0-green.svg) ![](https://img.shields.io/badge/Flask_SQLAlchemy-2.3.2-green.svg) ![](https://img.shields.io/badge/WTForms-2.1-green.svg) ![](https://img.shields.io/badge/Werkzeug-0.14.1-green.svg) ![](https://img.shields.io/badge/Flask_WTF-0.14.2-green.svg) ![](https://img.shields.io/badge/Flask_Script-2.0.6-green.svg)
### 网站展示 - http://henryhao.cn/
|Author|:sunglasses:Henryhaohao:sunglasses:|
|---|---
|Email|:hearts:[email protected]:hearts:


****
## :dolphin:声明
### 软件均仅用于学习交流,请勿用于任何商业用途!感谢大家!
## :dolphin:介绍
### 该项目为基于Python的Flask框架搭建的[在线电影网站](http://henryhao.cn/)
- **项目介绍**:网站前端采用HTML5编写,使用Bootstrap前端开发框架,后端使用Python3语言编写,以及Flask的Web框架,将MySQL作为数据库,开发工具使用PyCharm
- **网站功能**:网站前台模块具有浏览视频、搜索视频、筛选视频、登录注册、收藏评论等功能。后台模块具有对视频、用户、管理员等各类管理功能
- **项目文件**:整个movie_project目录
- **运行方法**:运行movie_project目录下的manage.py
- **nginx配置文件**:位于movie_project目录下的nginx.conf,用于部署到服务器进行反向代理的相关配置
## :dolphin:运行环境
Version: Python3
## :dolphin:安装依赖库
```
pip3 install -r requirements.txt
```
## :dolphin:项目截图
> - **首页展示图**<br><br>
![enter image description here](Pic/home_preview.png)
> - **视频展示页**<br><br>
![enter image description here](Pic/video.png)
> - **视频播放页**<br><br>
![enter image description here](Pic/play.png)
> - **后台管理页**<br><br>
![enter image description here](Pic/admin_preview.png)
> - **整体架构设计图**<br><br>
![enter image description here](Pic/website.png)
> - **项目目录结构图**<br><br>
![enter image description here](Pic/project_catolog.png)
> - **前台功能模块图**<br><br>
![enter image description here](Pic/home.png)
> - **后台功能模块图**<br><br>
![enter image description here](Pic/admin.png)
> - **本地运行图**<br><br>
![enter image description here](Pic/run.png)

15 changes: 15 additions & 0 deletions movie_project/app.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# !/user/bin/env python
# -*- coding:utf-8 -*-
# time: 2018/3/7--19:49
from flask import Flask

app = Flask(__name__)


@app.route('/')
def hello_world():
return 'Hello World!'


if __name__ == '__main__':
app.run()
34 changes: 34 additions & 0 deletions movie_project/app/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# !/user/bin/env python
# -*- coding:utf-8 -*-
# time: 2018/3/7--19:50
__author__ = 'Henry'

from flask import Flask, render_template
from flask_sqlalchemy import SQLAlchemy
import os

app = Flask(__name__)
# app.config['SQLALCHEMY_DATABASE_URI'] = 'mysql://root:[email protected]:3306/movie'
app.config['SQLALCHEMY_DATABASE_URI'] = 'mysql://[email protected]:3306/movie'
app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = True
app.config['UP_DIR'] = os.path.join(os.path.abspath(os.path.dirname(__file__)),'static/uploads/') #定义后台上传的文件的保存路径
app.config['FC_DIR'] = os.path.join(os.path.abspath(os.path.dirname(__file__)),'static/uploads/users/') #定义前台上传的用户头像文件的保存路径

app.debug = False #开发调试模式

# app.config['SECRET_KEY'] = 'Henry'
app.secret_key = 'Henry' #密钥:用于csrf加密

db = SQLAlchemy(app)

from app.home import home as home_blueprint
from app.admin import admin as admin_blueprint

app.register_blueprint(home_blueprint)
app.register_blueprint(admin_blueprint, url_prefix='/admin')


# 404页面
@app.errorhandler(404)
def page_not_found(error):
return render_template('home/404.html'), 404
11 changes: 11 additions & 0 deletions movie_project/app/admin/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# !/user/bin/env python
# -*- coding:utf-8 -*-
# time: 2018/3/7--19:51
__author__ = 'Henry'

from flask import Blueprint

admin = Blueprint('admin',__name__)

import app.admin.views

Loading

0 comments on commit 20af6df

Please sign in to comment.