Commit f77634ee by sting

翻译

parent 6bab126e
# Heroku Django Starter Template # Flynn Django Starter Template
从heroku模版更改而来,https://github.com/heroku/heroku-django-template.git
An utterly fantastic project starter template for Django 2.0. ## 特性
## Features - 静态文件,数据库配置,Gunicorn uwsgi 网关。
- WhiteNoise增强静态文件处理。
- Python 3.6。
- Production-ready configuration for Static Files, Database Settings, Gunicorn, etc. ## 基本步骤
- Enhancements to Django's static file serving functionality via WhiteNoise.
- Latest Python 3.6 runtime environment.
## How to Use 按以下步骤操作:
To use this project, follow these steps: 1. 开发环境准备,python3, pipenv(`$pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple pipenv`
2. 安装 Django (`$ pipenv --pypi-mirror https://pypi.tuna.tsinghua.edu.cn/simple install django`)
3. 使用本模版创建项目
1. Create your working environment. ## 创建项目
2. Install Django (`$ pipenv install django`)
3. Create a new project using this template
## Creating Your Project 用模版轻松创建项目::
Using this template to create a new Django app is easy:: $ django-admin.py startproject --template=https://git.xxynet.com/pub/flynn-django-template/repository/archive.zip?ref=master --name=Procfile ``helloworld``
$ django-admin.py startproject --template=https://github.com/heroku/heroku-django-template/archive/master.zip --name=Procfile helloworld (windows如果失败, 将 `django-admin.py` 换为 `django-admin`)
(If this doesn't work on windows, replace `django-admin.py` with `django-admin`) 这里要把 ``helloworld`` 换为你的项目名称.
You can replace ``helloworld`` with your desired project name. ## 部署到flynn
## Deployment to Heroku
$ git init $ git init
$ git add -A $ git add -A
$ git commit -m "Initial commit" $ git commit -m "初始化项目"
$ heroku create $ flynn create
$ git push heroku master $ git push flynn master
$ heroku run python manage.py migrate $ heroku run python manage.py migrate
See also, a [ready-made application](https://github.com/heroku/python-getting-started), ready to deploy. 参考python项目部署中文文档 [如何部署 Python 应用](https://flynn.mydoc.io/?t=54100)
## License: MIT ## License: MIT
## Further Reading ## 进一步阅读
- [Gunicorn](https://warehouse.python.org/project/gunicorn/) - [Gunicorn](https://warehouse.python.org/project/gunicorn/) wsgi网关
- [WhiteNoise](https://warehouse.python.org/project/whitenoise/) - [WhiteNoise](https://warehouse.python.org/project/whitenoise/) django静态服务组件
- [dj-database-url](https://warehouse.python.org/project/dj-database-url/) - [dj-database-url](https://warehouse.python.org/project/dj-database-url/) 数据库组件
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment