Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
pub
/
flynn-django-template
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
f77634ee
authored
Dec 14, 2018
by
sting
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
翻译
parent
6bab126e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
26 deletions
+25
-26
README.md
+25
-26
No files found.
README.md
View file @
f77634ee
# 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/
)
数据库组件
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment