Skip to content

Commit bed88f0

Browse files
author
Andrey Zelenchuk
committed
Docs: download and patch templates *before* running tests.
1 parent dced3c0 commit bed88f0

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

docs/source/contributing.rst

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,20 +104,23 @@ Follow these steps to run all unit- and end-to-end tests.
104104
105105
git clone https://github.com/jrief/django-admin-sortable2.git
106106
cd django-admin-sortable2
107-
npm install --also=dev
107+
npm install --include=dev
108108
npm run build
109109
python -m pip install Django
110110
python -m pip install -r testapp/requirements.txt
111111
python -m playwright install
112112
python -m playwright install-deps
113-
python -m pytest testapp
113+
114+
# we use the default template files and patch them, rather than using our own modified one
114115
django_version=$(python -c 'from django import VERSION; print("{0}.{1}".format(*VERSION))')
115116
mkdir adminsortable2/templates/adminsortable2/edit_inline
116117
curl --no-progress-meter --output adminsortable2/templates/adminsortable2/edit_inline/stacked-django-$django_version.html https://raw.githubusercontent.com/django/django/stable/$django_version.x/django/contrib/admin/templates/admin/edit_inline/stacked.html
117118
curl --no-progress-meter --output adminsortable2/templates/adminsortable2/edit_inline/tabular-django-$django_version.html https://raw.githubusercontent.com/django/django/stable/$django_version.x/django/contrib/admin/templates/admin/edit_inline/tabular.html
118119
patch -p0 adminsortable2/templates/adminsortable2/edit_inline/stacked-django-$django_version.html patches/stacked-django-4.0.patch
119120
patch -p0 adminsortable2/templates/adminsortable2/edit_inline/tabular-django-$django_version.html patches/tabular-django-4.0.patch
120121
122+
python -m pytest testapp
123+
121124
.. _Playwright-Python: https://playwright.dev/python/
122125
.. _pytest-django: https://pytest-django.readthedocs.io/en/latest/
123126

0 commit comments

Comments
 (0)