浏览代码

Making docs

https
jakobsn 6 年前
父节点
当前提交
6512808580
共有 4 个文件被更改,包括 19 次插入8 次删除
  1. +12
    -7
      README.md
  2. 二进制
      app_structure.png
  3. +1
    -0
      src/app/views/app.py
  4. +6
    -1
      src/app/views/index.py

+ 12
- 7
README.md 查看文件

@@ -6,7 +6,7 @@ Web Server image: https://github.com/tiangolo/uwsgi-nginx-docker
webpy framework: http://webpy.org/


### prerequisites:
### Prerequisites:
docker https://www.docker.com/

### Build & Run
@@ -19,15 +19,20 @@ $ docker-compose up --build

### Deploy locally

Install:
Prerequisites:
mysql
python3
src/app/requirements.txt

Run:
Launch mysql at port 3306
Execute mysql queries
# Run Datatbase:
Launch mysql at default port (3306)
$ systemctl start mysqld
Log in to database
$ mysql -u <user> -p
Insert mysql queries
"CREATE database db;"
"USE db;"
Populate mysql by posting mysql/sql/init.sql into mysql
Then populate databse by posting mysql/sql/init.sql into mysql
Edit src/app/models/database.py to point at local server
python3 src/app/main.py
Run app
$ python3 src/app/main.py

二进制
app_structure.png 查看文件

之前 之后
宽度: 521  |  高度: 371  |  大小: 24KB

+ 1
- 0
src/app/views/app.py 查看文件

@@ -10,6 +10,7 @@ from views.open_projects import Open_projects
from views.project import Project
from views.index import Index


# Define application routes
urls = (
'/', 'Index',


+ 6
- 1
src/app/views/index.py 查看文件

@@ -7,8 +7,13 @@ render = web.template.render('templates/')

class Index:
# Get main page
def GET(self):
"""
Get main page using the projects input variable to
determine which projects to show.

:return: index page
"""
session = web.ctx.session
nav = get_nav_bar(session)
data = web.input(projects=None)


正在加载...
取消
保存