Skip to content

Commit 8e3576e

Browse files
authored
Merge pull request #271 from hjwp/upgrade-18
Update Ch. 18 (spiking auth) listings for django4
2 parents c126ef9 + 2402fe7 commit 8e3576e

14 files changed

+577
-522
lines changed

.github/workflows/tests.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ jobs:
3030
test_chapter_14_simple_form,
3131
test_chapter_15_advanced_forms,
3232
test_chapter_16_javascript,
33+
test_chapter_18_spiking_custom_auth,
3334
unit-test
3435
]
3536

@@ -89,6 +90,20 @@ jobs:
8990
run: |
9091
make ${{ matrix.test_chapter }}
9192
93+
- name: Save tempdir path to an env var
94+
if: always()
95+
shell: bash
96+
run: |
97+
TMPDIR_PATH=$(cat .tmpdir.${{ matrix.test_chapter }})
98+
echo "TMPDIR_PATH=$TMPDIR_PATH" >> $GITHUB_ENV
99+
100+
- name: Archive the temp dir
101+
uses: actions/upload-artifact@v4
102+
if: always()
103+
with:
104+
name: test-source-${{ matrix.test_chapter }}
105+
path: ${{ env.TMPDIR_PATH }}
106+
92107
- name: Archive the built html files
93108
uses: actions/upload-artifact@v4
94109
if: always()
@@ -97,3 +112,5 @@ jobs:
97112
path: |
98113
*.html
99114
*.css
115+
116+

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,4 @@
4242
/tech review/
4343
.vagrant.d
4444
*.egg-info
45+
.tmpdir.*

Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,8 @@ silent_test_%: %.html $(TMPDIR) $(VENV)/bin
165165
unit-test: chapter_01.html $(VENV)/bin
166166
SKIP_CHAPTER_SUBMODULES=1 ./tests/update_source_repo.py
167167
source $(VENV)/bin/activate && ./run_test_tests.sh
168+
# this is a hack to make 'Archive the temp dir' step work in CI
169+
echo "tests" > .tmpdir.unit-test
168170

169171
.PHONY: clean
170172
clean:

chapter_16_javascript.asciidoc

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -177,8 +177,13 @@ TIP: I like to keep helper methods in the FT class that's using them,
177177
It stops the base class from getting too cluttered. YAGNI.
178178

179179

180+
[[js-spike]]
180181
=== A Quick "Spike"
181182

183+
((("spike")))
184+
((("exploratory coding", see="also spiking and de-spiking")))
185+
((("spiking and de-spiking", "defined")))
186+
((("prototyping", see="spiking and de-spiking")))
182187
This will be our first bit of JavaScript.
183188
We're also interacting with the Bootstrap CSS framework,
184189
which we maybe don't know very well.
@@ -198,9 +203,14 @@ The goat doesn't mind looking the other way for a bit.
198203
This kind of prototyping activity is often called a "spike",
199204
for http://stackoverflow.com/questions/249969/why-are-tdd-spikes-called-spikes[
200205
reasons that aren't entirely clear],
201-
but it's a nice memorable name.
202-
203-
TIP: Always do a commit before embarking on a spike.
206+
but it's a nice memorable name.footnote:[
207+
This chapter shows a very small spike.
208+
We'll come back and look at the spiking process again,
209+
with a weightier Python/Django example,
210+
in <<chapter_18_spiking_custom_auth>>.
211+
]
212+
213+
TIP: Always do a commit before embarking on a Spike.
204214

205215

206216
==== A Simple Inline Script

chapter_17_second_deploy.asciidoc

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,17 @@ NOTE: At this point I want to say a huge thanks to Andrew Godwin and the whole
1414
drop it altogether. Thanks for all the great work, gang!
1515

1616

17+
.🚧 Warning, Content not updated
18+
*******************************************************************************
19+
20+
This chapter has not been rewritten as part of the third edition.
21+
22+
By all means refer back to <<chapter_11_ansible>>
23+
and try and do a deployment,
24+
but otherwise, go ahead and check out <<chapter_18_spiking_custom_au,the next chapter>>, which has been (mostly) updated.
25+
26+
*******************************************************************************
27+
1728

1829
Staging Deploy
1930
~~~~~~~~~~~~~~

0 commit comments

Comments
 (0)