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