diff --git a/runtests.sh b/runtests.sh new file mode 100755 index 00000000..72fe4293 --- /dev/null +++ b/runtests.sh @@ -0,0 +1,12 @@ +#! /usr/bin/env bash +set -euo pipefail +IFS=$'\n\t' + +COOKIECUTTER_DIR=$1 +COOKIECUTTER_ARGS=( "${@:2}" ) +TEST_DIR=$(mktemp -d) +cookiecutter --no-input -o "$TEST_DIR" "$COOKIECUTTER_DIR" "${COOKIECUTTER_ARGS[@]}" +pushd "$TEST_DIR/projectname" +tox +popd +rm -rf "$TEST_DIR" diff --git a/tox.ini b/tox.ini index de0a1a28..ecaca3ba 100644 --- a/tox.ini +++ b/tox.ini @@ -7,23 +7,16 @@ basepython = python3.12 deps = -rrequirements/testing.txt changedir = {envtmpdir} -allowlist_externals = - bash +allowlist_externals = {toxinidir}/runtests.sh passenv = GDAL_LIBRARY_PATH GEOS_LIBRARY_PATH [testenv:django] -commands = - cookiecutter --no-input {toxinidir} - bash -c "cd projectname && tox" +commands = {toxinidir}/runtests.sh {toxinidir} [testenv:django-multilingual] -commands = - cookiecutter --no-input {toxinidir} multilingual=y - bash -c "cd projectname && tox" +commands = {toxinidir}/runtests.sh {toxinidir} multilingual=y [testenv:geodjango] -commands = - cookiecutter --no-input {toxinidir} geodjango=y - bash -c "cd projectname && tox" +commands = {toxinidir}/runtests.sh {toxinidir} geodjango=y diff --git a/{{cookiecutter.project_slug}}/project/urls.py b/{{cookiecutter.project_slug}}/project/urls.py index 26808fc8..52c8985e 100644 --- a/{{cookiecutter.project_slug}}/project/urls.py +++ b/{{cookiecutter.project_slug}}/project/urls.py @@ -41,10 +41,6 @@ {%- endif %} -# Allow testing of all styles locally -if settings.DEBUG: - urlpatterns += [path("demo-styles/", TemplateView.as_view(template_name="demo_styles.html"))] - # Make it easier to see a 404 page under debug if settings.DEBUG: from django.views.defaults import page_not_found diff --git a/{{cookiecutter.project_slug}}/pyproject.toml b/{{cookiecutter.project_slug}}/pyproject.toml index bae96746..a9336cc2 100644 --- a/{{cookiecutter.project_slug}}/pyproject.toml +++ b/{{cookiecutter.project_slug}}/pyproject.toml @@ -29,14 +29,13 @@ extend_exclude="field.html" [tool.djlint.per-file-ignores] # Disable: -# H006 - Img tag should have height and width attributes -# H025 - Tag seems to be an orphan. +# D018 - Internal links should use the url ... pattern. # H030 - Consider adding a meta description # H031 - Consider adding meta keywords "500.html" = "H030,H031" "base.html" = "H030,H031" -"demo_styles.html" = "H006" -"tree.html" = "H025" +"includes/footer.html" = "D018" +"includes/header.html" = "D018" [tool.ruff] extend-exclude = ["apps/*/migrations"] diff --git a/{{cookiecutter.project_slug}}/templates/404.html b/{{cookiecutter.project_slug}}/templates/404.html index 81265105..3fffb356 100644 --- a/{{cookiecutter.project_slug}}/templates/404.html +++ b/{{cookiecutter.project_slug}}/templates/404.html @@ -4,12 +4,19 @@ {% block main %}
{% translate "We couldn't find the page you are looking for." %}
- -{% translate 'If you entered the URL manually please check your spelling and try again.' %}
- - ++ {% translate "We couldn't find the page you are looking for." %} +
++ {% translate 'If you entered the URL manually please check your spelling and try again.' %} +
++ {# djlint:off D018 #} + Back to homepage + {# djlint:on D018 #} +
A paragraph (from the Greek paragraphos, “to write beside” or “written beside”) is a self-contained unit of a discourse in writing dealing with a particular point or idea. A paragraph consists of one or more sentences. Though not required by the syntax of any language, paragraphs are usually an expected part of formal writing, used to organize longer prose.
---A block quotation (also known as a long quotation or extract) is a quotation in a written document, that is set off from the main text as a paragraph, or block of text.
-It is typically distinguished visually using indentation and a different typeface or smaller size quotation. It may or may not include a citation, usually placed at the bottom.
- Said no one, ever. -
Strong is used to indicate strong importance.
-This text has added emphasis.
-The b element is stylistically different text from normal text, without any special importance.
-The i element is text that is offset from the normal text.
-The u element is text with an unarticulated, though explicitly rendered, non-textual annotation.
-This text is deleted and This text is inserted.
This text has a strikethrough.
Superscript®.
-Subscript for things like H2O.
-This small text is small for for fine print, etc.
-Abbreviation: HTML
-This text is a short inline quotation.
This is a citation.
-The dfn element indicates a definition.
-The mark element indicates a highlight.
-The variable element, such as x = y.
-The time element:
-| Table Heading 1 | -Table Heading 2 | -Table Heading 3 | -Table Heading 4 | -Table Heading 5 | -
|---|---|---|---|---|
| Table Footer 1 | -Table Footer 2 | -Table Footer 3 | -Table Footer 4 | -Table Footer 5 | -
| Table Cell 1 | -Table Cell 2 | -Table Cell 3 | -Table Cell 4 | -Table Cell 5 | -
| Table Cell 1 | -Table Cell 2 | -Table Cell 3 | -Table Cell 4 | -Table Cell 5 | -
| Table Cell 1 | -Table Cell 2 | -Table Cell 3 | -Table Cell 4 | -Table Cell 5 | -
| Table Cell 1 | -Table Cell 2 | -Table Cell 3 | -Table Cell 4 | -Table Cell 5 | -
<img> element<figure> element, no <figcaption><figure> element, with a <figcaption>Use <.background-image> class for easier positioning of images
-
<.video__container>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Doloribus, ullam quae minima?
- ++ Lorem ipsum dolor sit amet, consectetur adipisicing elit. Doloribus, ullam quae minima? +
+ - diff --git a/{{cookiecutter.project_slug}}/templates/includes/header.html b/{{cookiecutter.project_slug}}/templates/includes/header.html index 02d6daad..d96dee06 100644 --- a/{{cookiecutter.project_slug}}/templates/includes/header.html +++ b/{{cookiecutter.project_slug}}/templates/includes/header.html @@ -1,33 +1,50 @@ - + - diff --git a/{{cookiecutter.project_slug}}/templates/includes/meta.html b/{{cookiecutter.project_slug}}/templates/includes/meta.html index 9cad154a..500b7152 100644 --- a/{{cookiecutter.project_slug}}/templates/includes/meta.html +++ b/{{cookiecutter.project_slug}}/templates/includes/meta.html @@ -1,23 +1,19 @@ {% load static %} - - + - - - - - + + + - - - - - - - + + + + + +