Skip to content

Commit

Permalink
option to use sqlite3 in local enviroment
Browse files Browse the repository at this point in the history
  • Loading branch information
mgaitan committed Jul 3, 2016
1 parent 01fd54e commit 7e791bf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions cookiecutter.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,7 @@
"email": "Your email",
"description": "A short description of the project.",
"year": "Current year",
"use_sqlite_as_local_db_engine": "no",
"with_documentation": "yes"

}
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,15 @@
MANAGERS = ADMINS

DATABASES = {
'default': {
'default': { {% if cookiecutter.use_sqlite_as_local_db_engine == 'yes' %}
'ENGINE': 'django.db.backends.sqlite3',
'NAME': '{{cookiecutter.repo_name}}.db',{% else %}
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': '{{cookiecutter.repo_name}}',
'USER': 'postgres',
'PASSWORD': '',
'HOST': 'localhost',
'PORT': '',
'PORT': '',{% endif %}
}
}

Expand Down

0 comments on commit 7e791bf

Please sign in to comment.