grunt and documentation cleanning

This commit is contained in:
Krzysztof Szumny 2016-04-10 23:51:34 +02:00
parent a023ed7a35
commit 7c4135fb45
4 changed files with 7 additions and 24 deletions

View File

@ -42,14 +42,12 @@ django-allauth sends an email to verify users (and superusers) after signup and
.. _configure your email backend: http://docs.djangoproject.com/en/1.9/topics/email/#smtp-backend
In development you can (optionally) use MailHog_ for email testing. MailHog is built with Go so there are no dependencies. To use MailHog::
In development you can (optionally) use MailHog_ for email testing. MailHog is added as docker-container. To use MailHog::
1. `Download the latest release`_ for your operating system
2. Rename the executable to ``mailhog`` and copy it to the root of your project directory
3. Make sure it is executable (e.g. ``chmod +x mailhog``)
1. Make sure, that ``mailhog`` docker container is up and running
2. Open your browser and go to ``http://127.0.0.1:8025``
.. _Mailhog: https://github.com/mailhog/MailHog/
.. _Download the latest release: https://github.com/mailhog/MailHog/releases
Alternatively simply output emails to the console via: ``EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'``

View File

@ -70,6 +70,3 @@ node_modules/
# Hitch directory
tests/.hitch
# MailHog binary
mailhog

View File

@ -112,16 +112,10 @@ module.exports = function (grunt) {
runDjango: {
cmd: 'python <%= paths.manageScript %> runserver'
},
{% if cookiecutter.use_mailhog == "y" -%}runMailHog: {
cmd: './mailhog'
},{%- endif %}
}
});
grunt.registerTask('serve', [
{% if cookiecutter.use_mailhog == "y" -%}
'bgShell:runMailHog',
{%- endif %}
'bgShell:runDjango',
'watch'
]);

View File

@ -78,20 +78,14 @@ Please note: For Celery's import magic to work, it is important *where* the cele
Email Server
^^^^^^^^^^^^
In development, it is often nice to be able to see emails that are being sent from your application. If you choose to use `MailHog`_ when generating the project a local SMTP server with a web interface will be available.
In development, it is often nice to be able to see emails that are being sent from your application. For that reason local SMTP server `MailHog`_ with a web interface is available as docker container.
.. _mailhog: https://github.com/mailhog/MailHog
To start the service, make sure you have nodejs installed, and then type the following::
Container mailhog will start automatically when you will run all docker containers.
Please check `cookiecutter-django Docker documentation`_ for more details how to start all containers.
$ npm install
$ grunt serve
(After the first run you only need to type ``grunt serve``) This will start an email server that listens on ``127.0.0.1:1025`` in addition to starting your Django project and a watch task for live reload.
To view messages that are sent by your application, open your browser and go to ``http://127.0.0.1:8025``
The email server will exit when you exit the Grunt task on the CLI with Ctrl+C.
With MailHog running, to view messages that are sent by your application, open your browser and go to ``http://127.0.0.1:8025``
{% endif %}