From 2120e85a126de28a60cc8cf328c3689d027d505f Mon Sep 17 00:00:00 2001 From: Vince Salvino Date: Sat, 1 Aug 2020 16:00:08 -0400 Subject: [PATCH 1/2] Pin version of coderedcms in project_template's requirements.txt --- coderedcms/bin/coderedcms.py | 8 +++++++- coderedcms/project_template/basic/requirements.txt | 8 +++++--- coderedcms/project_template/sass/requirements.txt | 8 +++++--- docs/releases/v0.19.0.rst | 3 +++ 4 files changed, 20 insertions(+), 7 deletions(-) diff --git a/coderedcms/bin/coderedcms.py b/coderedcms/bin/coderedcms.py index a90cab12..aefa00ba 100644 --- a/coderedcms/bin/coderedcms.py +++ b/coderedcms/bin/coderedcms.py @@ -61,11 +61,14 @@ def handle(self, **options): os.path.join(codered_path, 'project_template'), options['template'] ) + # Check if provided template is built-in to coderedcms, # otherwise, do not change it. if os.path.isdir(template_path): options['template'] = template_path - options['extensions'] = ['py', 'md'] + + # Treat these files as Django templates to render the boilerplate. + options['extensions'] = ['py', 'md', 'txt'] options['files'] = ['Dockerfile'] # Set options @@ -89,6 +92,9 @@ def handle(self, **options): options['domain'] = 'localhost' options['domain_nowww'] = options['domain'] + # Add additional custom options to the context. + options['coderedcms_release'] = coderedcms.release + # Print a friendly message print(message % { 'project_name': project_name, diff --git a/coderedcms/project_template/basic/requirements.txt b/coderedcms/project_template/basic/requirements.txt index 8b88a0bd..703b67ae 100644 --- a/coderedcms/project_template/basic/requirements.txt +++ b/coderedcms/project_template/basic/requirements.txt @@ -1,8 +1,10 @@ -coderedcms +coderedcms=={{coderedcms_release.0}}.{{coderedcms_release.1}}.* # django_sendmail_backend enables sending email from your web host server. # Remove this if using a different email backend. django_sendmail_backend -# To use with a MySQL database (offered by most web hosts), uncomment the following. -#mysqlclient \ No newline at end of file +# To use with MariaDB or MySQL, ucomment the line below: +#mysqlclient +# To use with PostgreSQL, uncomment the line below: +#psycopg2 diff --git a/coderedcms/project_template/sass/requirements.txt b/coderedcms/project_template/sass/requirements.txt index 8b88a0bd..703b67ae 100644 --- a/coderedcms/project_template/sass/requirements.txt +++ b/coderedcms/project_template/sass/requirements.txt @@ -1,8 +1,10 @@ -coderedcms +coderedcms=={{coderedcms_release.0}}.{{coderedcms_release.1}}.* # django_sendmail_backend enables sending email from your web host server. # Remove this if using a different email backend. django_sendmail_backend -# To use with a MySQL database (offered by most web hosts), uncomment the following. -#mysqlclient \ No newline at end of file +# To use with MariaDB or MySQL, ucomment the line below: +#mysqlclient +# To use with PostgreSQL, uncomment the line below: +#psycopg2 diff --git a/docs/releases/v0.19.0.rst b/docs/releases/v0.19.0.rst index df74c63c..77bdc6be 100644 --- a/docs/releases/v0.19.0.rst +++ b/docs/releases/v0.19.0.rst @@ -8,6 +8,9 @@ Bug fixes * Support custom image models by correctly using ``WAGTAILIMAGES_IMAGE_MODEL`` versus hard-coding ``wagtailimages.Image``. +* ``coderedcms start`` now pins the version of CodeRed CMS in the generated + ``requirements.txt`` file. + New features ------------ From 1cb86538ddd2d52994a553ee403967589b2adb42 Mon Sep 17 00:00:00 2001 From: Vince Salvino Date: Sat, 1 Aug 2020 19:37:37 -0400 Subject: [PATCH 2/2] Fix typo --- coderedcms/project_template/basic/requirements.txt | 2 +- coderedcms/project_template/sass/requirements.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/coderedcms/project_template/basic/requirements.txt b/coderedcms/project_template/basic/requirements.txt index 703b67ae..abf90701 100644 --- a/coderedcms/project_template/basic/requirements.txt +++ b/coderedcms/project_template/basic/requirements.txt @@ -4,7 +4,7 @@ coderedcms=={{coderedcms_release.0}}.{{coderedcms_release.1}}.* # Remove this if using a different email backend. django_sendmail_backend -# To use with MariaDB or MySQL, ucomment the line below: +# To use with MariaDB or MySQL, uncomment the line below: #mysqlclient # To use with PostgreSQL, uncomment the line below: #psycopg2 diff --git a/coderedcms/project_template/sass/requirements.txt b/coderedcms/project_template/sass/requirements.txt index 703b67ae..abf90701 100644 --- a/coderedcms/project_template/sass/requirements.txt +++ b/coderedcms/project_template/sass/requirements.txt @@ -4,7 +4,7 @@ coderedcms=={{coderedcms_release.0}}.{{coderedcms_release.1}}.* # Remove this if using a different email backend. django_sendmail_backend -# To use with MariaDB or MySQL, ucomment the line below: +# To use with MariaDB or MySQL, uncomment the line below: #mysqlclient # To use with PostgreSQL, uncomment the line below: #psycopg2