[damned-lies] Improve development experience



commit e3ccaeb4914532869503aba4726690774ad61721
Author: Grégoire Détrez <gregoire detrez gu se>
Date:   Tue Aug 11 14:41:05 2015 +0200

    Improve development experience
    
    - Add some info in README
    - when running locally, print the sent email on stdout instead of
      crashing
    
    https://bugzilla.gnome.org/show_bug.cgi?id=753505

 README                 |    7 ++++++-
 damnedlies/settings.py |    5 +++++
 2 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/README b/README
index b890b63..6db5b13 100644
--- a/README
+++ b/README
@@ -14,7 +14,7 @@ Requirements
     PIL (python-imaging) or pillow for hackergotchi checks.
     Markdown (python-markdown) for Team presentation markup rendering.
 
-3 - gettext, intltool, gnome-doc-utils (for stats generation)
+3 - gettext, intltool, gnome-doc-utils (for stats generation), itstool
 
 4 - South >= 0.7 - http://south.aeracode.org/
     South is a Django extension that allows you to track changes in your models
@@ -34,6 +34,11 @@ Requirements
 8 - [Optional] translate-toolkit >= 1.9.0-beta2 (--keeptranslations option for
     pogrep) for reduced po files.
 
+Installing all requirements using pip:
+
+    pip install -r requirements.txt
+
+
 Installation
 ============
 
diff --git a/damnedlies/settings.py b/damnedlies/settings.py
index b5da2bb..7821b13 100644
--- a/damnedlies/settings.py
+++ b/damnedlies/settings.py
@@ -27,6 +27,11 @@ DATABASES = {
 }
 # Please refer to the README file to create an UTF-8 database with MySQL.
 
+# When running in development mode, print emails on stdout instead of trying
+# to send them
+if DEBUG:
+    EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
+
 EMAIL_HOST = 'localhost'
 EMAIL_HOST_USER = ''
 EMAIL_HOST_PASSWORD = ''


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]