django-project-template

所属分类:后台框架
开发工具:Shell
文件大小:18KB
下载次数:0
上传日期:2017-10-27 10:59:31
上 传 者sh-1993
说明:  用于启动编解码器中心实验室分配的Django项目模板。
(A Django project template for kickstarting codecentric labs assignments.)

文件列表:
.env (63, 2017-04-10)
.flooignore (82, 2017-04-10)
Procfile (78, 2017-04-10)
bootstrap.sh (9836, 2017-04-10)
circle.yml (1499, 2017-04-10)
manage.py (591, 2017-04-10)
merge-base-ff.sh (366, 2017-04-10)
project_name (0, 2017-04-10)
project_name\__init__.py (0, 2017-04-10)
project_name\settings.py (4420, 2017-04-10)
project_name\urls.py (895, 2017-04-10)
project_name\wsgi.py (854, 2017-04-10)
project_name_api (0, 2017-04-10)
project_name_api\__init__.py (0, 2017-04-10)
project_name_api\admin.py (59, 2017-04-10)
project_name_api\migrations (0, 2017-04-10)
project_name_api\migrations\__init__.py (0, 2017-04-10)
project_name_api\models.py (29, 2017-04-10)
project_name_api\tests (0, 2017-04-10)
project_name_api\tests\__init__.py (0, 2017-04-10)
project_name_api\tests\unit (0, 2017-04-10)
project_name_api\tests\unit\__init__.py (0, 2017-04-10)
project_name_api\tests\unit\test_api.py (206, 2017-04-10)
project_name_api\urls.py (142, 2017-04-10)
project_name_api\views.py (165, 2017-04-10)
project_name_web (0, 2017-04-10)
project_name_web\__init__.py (0, 2017-04-10)
project_name_web\admin.py (63, 2017-04-10)
project_name_web\migrations (0, 2017-04-10)
project_name_web\migrations\__init__.py (0, 2017-04-10)
project_name_web\models.py (57, 2017-04-10)
project_name_web\templates (0, 2017-04-10)
project_name_web\templates\base.html (127, 2017-04-10)
project_name_web\tests (0, 2017-04-10)
project_name_web\tests\__init__.py (0, 2017-04-10)
project_name_web\tests\functional (0, 2017-04-10)
project_name_web\tests\functional\__init__.py (0, 2017-04-10)
... ...

# Django project template You can create a new project from this template by running this inside a Python 3 virtual environment. Make sure to install Django 1.9+ inside the environment and use its django-admin.py: ``` $ virtualenv --python=python3 venv $ . venv/bin/activate $ pip install Django==1.11 $ venv/bin/django-admin startproject [project_name] \ --template https://github.com/codecentric-labs-zero/django-project-template/archive/master.zip \ --name .flooignore,.gitignore,Procfile,.env \ --extension py,md,txt,sh,ini,yml ``` If necessary, make script executable: ``` $ chmod u+x bootstrap.sh ``` Create continuous delivery pipeline and Heroku apps: ``` $ export GITHUB_TOKEN=[your github token] $ export CIRCLE_TOKEN=[your circle token] $ heroku login $ ./bootstrap.sh ``` Please note that this can only be done once and that you'll need to be part of the codecentric-labs-zero organizations on Heroku and GitHub for this to work. Also, you need to use a GitHub token with the following permissions: * **repo** * **admin:org** * **admin:repo_hook** * **admin:public_key** Make sure that you can access GitHub repositories [via ssh](https://help.github.com/articles/generating-an-ssh-key/). If you prefer not to set up the delivery pipeline, you can simply prepare the project for development: ``` $ chmod u+x manage.py $ chmod u+x merge-base-ff.sh $ rm bootstrap.sh $ echo "# [project name]" > README.md $ pip install -r requirements.txt $ ./manage.py migrate $ py.test $ git init $ git commit -am "Initial project setup" ```

近期下载者

相关文件


收藏者