Skip to content

Commit 7205d2d

Browse files
committed
Merge branch 'vuLgAr-cookiecutter'
2 parents f6282a2 + 46ed161 commit 7205d2d

38 files changed

+34
-2
lines changed

.travis.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ python:
66
- "3.4"
77
- "2.7"
88

9+
before_install:
10+
- "cd {{cookiecutter.app_slug}}"
11+
912
install:
1013
- "pip install pipenv"
1114
- "pipenv install --dev"

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,25 @@ Flask starter project...
88

99
### Basics
1010

11+
1. cd into the `{{cookiecutter.app_slug}}` directory.
1112
1. Create and activate a virtualenv
1213
1. Install the requirements
1314

15+
1416
### Set Environment Variables
1517

1618
Update *project/server/config.py*, and then run:
1719

1820
```sh
21+
$ export APP_NAME="Flask Skeleton"
1922
$ export APP_SETTINGS="project.server.config.DevelopmentConfig"
2023
$ export FLASK_DEBUG=1
2124
```
2225

2326
Using pipenv or python-dotenv? Use the *.env* file to set environment variables:
2427

2528
```sh
29+
APP_NAME="Flask Skeleton"
2630
APP_SETTINGS="project.server.config.DevelopmentConfig"
2731
FLASK_DEBUG=1
2832
```
@@ -59,3 +63,19 @@ With coverage:
5963
```sh
6064
$ python manage.py cov
6165
```
66+
67+
### Cookiecutter Template
68+
69+
Alternatively you can use the cookiecutter template.
70+
71+
First, get Cookiecutter:
72+
73+
```sh
74+
$ pip install cookiecutter
75+
```
76+
77+
Now run it against this repo:
78+
79+
```sh
80+
$ cookiecutter https://github.com/realpython/flask-skeleton.git
81+
```

cookiecutter.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"app_name": "Flask Skeleton",
3+
"app_slug": "{{ cookiecutter.app_name.lower()|replace(' ', '_')|replace('-', '_') }}",
4+
"_copy_without_render": [
5+
"*.html"
6+
]
7+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1+
APP_NAME="{{cookiecutter.app_name}}"
12
APP_SETTINGS="project.server.config.DevelopmentConfig"
23
FLASK_DEBUG=1
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)