mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2024-11-10 19:57:09 +03:00
making maildump optional
This commit is contained in:
parent
07354a3d37
commit
f966888ff1
|
@ -11,5 +11,6 @@
|
|||
"year": "{{ cookiecutter.now[:4] }}",
|
||||
"use_whitenoise": "y",
|
||||
"use_celery": "n",
|
||||
"use_maildump": "n",
|
||||
"windows": "n"
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@ module.exports = function (grunt) {
|
|||
images: this.app + '/static/images',
|
||||
js: this.app + '/static/js',
|
||||
manageScript: 'manage.py',
|
||||
mailserverpid: 'mailserver.pid',
|
||||
{% if cookiecutter.use_maildump=="y" -%}mailserverpid: 'mailserver.pid',{%- endif %}
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -84,12 +84,12 @@ module.exports = function (grunt) {
|
|||
runDjango: {
|
||||
cmd: 'python <%= paths.manageScript %> runserver'
|
||||
},
|
||||
runMailDump: {
|
||||
{% if cookiecutter.use_maildump == "y" -%}runMailDump: {
|
||||
cmd: 'maildump -p <%= paths.mailserverpid %>'
|
||||
},
|
||||
stopMailDump: {
|
||||
cmd: 'maildump -p <%= paths.mailserverpid %> --stop'
|
||||
},
|
||||
},{%- endif %}
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -105,12 +105,12 @@ module.exports = function (grunt) {
|
|||
grunt.registerTask('default', [
|
||||
'build'
|
||||
]);
|
||||
|
||||
{% if cookiecutter.use_maildump == "y" -%}
|
||||
grunt.registerTask('start-email-server', [
|
||||
'bgShell:runMailDump'
|
||||
]);
|
||||
|
||||
grunt.registerTask('stop-email-server', [
|
||||
'bgShell:stopMailDump'
|
||||
]);
|
||||
]);{%- endif %}
|
||||
};
|
||||
|
|
|
@ -126,7 +126,7 @@ To run a celery worker:
|
|||
|
||||
Please note: For Celerys import magic to work, it is important *where* the celery commands are run. If you are in the same folder with *manage.py*, you should be right.
|
||||
{% endif %}
|
||||
|
||||
{% if cookiecutter.use_maildump == "y" %}
|
||||
Email Server
|
||||
^^^^^^^^^^^^
|
||||
|
||||
|
@ -147,6 +147,7 @@ To stop the email server::
|
|||
$ grunt stop-email-server
|
||||
|
||||
The email server listens on 127.0.0.1:1025
|
||||
{% endif %}
|
||||
|
||||
It's time to write the code!!!
|
||||
|
||||
|
|
|
@ -25,6 +25,10 @@ SECRET_KEY = env("DJANGO_SECRET_KEY", default='CHANGEME!!!')
|
|||
# ------------------------------------------------------------------------------
|
||||
EMAIL_HOST = 'localhost'
|
||||
EMAIL_PORT = 1025
|
||||
{%if cookiecutter.use_maildump == "n" -%}
|
||||
EMAIL_BACKEND = env('DJANGO_EMAIL_BACKEND',
|
||||
default='django.core.mail.backends.console.EmailBackend')
|
||||
{%- endif %}
|
||||
|
||||
# CACHING
|
||||
# ------------------------------------------------------------------------------
|
||||
|
|
|
@ -11,5 +11,7 @@ django-debug-toolbar==1.3.2
|
|||
# improved REPL
|
||||
ipdb==0.8.1
|
||||
|
||||
{% if cookiecutter.use_maildump == "y" -%}
|
||||
# maildump
|
||||
maildump==0.5.1
|
||||
{%- endif %}
|
||||
|
|
Loading…
Reference in New Issue
Block a user