From 03700d65ed8a27f8e63e39532d84b543e73d7813 Mon Sep 17 00:00:00 2001 From: Matt Westcott Date: Thu, 31 Jul 2014 16:11:02 +0100 Subject: [PATCH] Use sqlite by default --- wagtail/project_template/.gitignore | 1 + .../project_name/settings/base.py | 23 +++++++++++++------ wagtail/project_template/requirements.txt | 5 +++- 3 files changed, 21 insertions(+), 8 deletions(-) diff --git a/wagtail/project_template/.gitignore b/wagtail/project_template/.gitignore index aed6a6daf..6e41f3871 100644 --- a/wagtail/project_template/.gitignore +++ b/wagtail/project_template/.gitignore @@ -7,3 +7,4 @@ /.vagrant/ Vagrantfile.local /docs/_build/ +/db.sqlite3 diff --git a/wagtail/project_template/project_name/project_name/settings/base.py b/wagtail/project_template/project_name/project_name/settings/base.py index 7d3a3bc73..7054ff91a 100644 --- a/wagtail/project_template/project_name/project_name/settings/base.py +++ b/wagtail/project_template/project_name/project_name/settings/base.py @@ -87,18 +87,27 @@ WSGI_APPLICATION = SITE_NAME + '.wsgi.application' # Database # https://docs.djangoproject.com/en/{{ docs_version }}/ref/settings/#databases +# SQLite (simplest install) DATABASES = { 'default': { - 'ENGINE': 'django.db.backends.postgresql_psycopg2', - 'NAME': '{{ project_name }}', - 'USER': 'postgres', - 'PASSWORD': '', - 'HOST': '', # Set to empty string for localhost. - 'PORT': '', # Set to empty string for default. - 'CONN_MAX_AGE': 600, # number of seconds database connections should persist for + 'ENGINE': 'django.db.backends.sqlite3', + 'NAME': join(PROJECT_ROOT, 'db.sqlite3'), } } +# PostgreSQL (Recommended, but requires the psycopg2 library and Postgresql development headers) +# DATABASES = { +# 'default': { +# 'ENGINE': 'django.db.backends.postgresql_psycopg2', +# 'NAME': '{{ project_name }}', +# 'USER': 'postgres', +# 'PASSWORD': '', +# 'HOST': '', # Set to empty string for localhost. +# 'PORT': '', # Set to empty string for default. +# 'CONN_MAX_AGE': 600, # number of seconds database connections should persist for +# } +# } + # Internationalization # https://docs.djangoproject.com/en/{{ docs_version }}/topics/i18n/ diff --git a/wagtail/project_template/requirements.txt b/wagtail/project_template/requirements.txt index 70fc4ef20..fb6837e2d 100644 --- a/wagtail/project_template/requirements.txt +++ b/wagtail/project_template/requirements.txt @@ -1,7 +1,10 @@ +# Minimal requirements Django>=1.6.2,<1.7 South==1.0.0 wagtail==0.5 -psycopg2==2.5.2 + +# Recommended components (require additional setup) +# psycopg2==2.5.2 elasticsearch==1.1.1 django-redis-cache==0.13.0 django-celery==3.1.10