Skip to content

Commit 5721482

Browse files
committed
fix listing numbers
1 parent 7ed8887 commit 5721482

File tree

2 files changed

+20
-20
lines changed

2 files changed

+20
-20
lines changed

chapter_19_spiking_custom_auth.asciidoc

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1123,7 +1123,7 @@ to hold all the files related to login:
11231123
----
11241124
$ *cd src && python manage.py startapp accounts*
11251125
----
1126-
//ch18l021
1126+
//ch19l021
11271127

11281128
// TODO: some output?
11291129
// DAVID: probably a good idea to `cd ..` after this command.
@@ -1188,7 +1188,7 @@ And now let's add add a _test_models.py_ to say:
11881188

11891189

11901190
[role="sourcecode"]
1191-
.src/accounts/tests/test_models.py (ch18l023)
1191+
.src/accounts/tests/test_models.py (ch19l023)
11921192
====
11931193
[source,python]
11941194
----
@@ -1225,7 +1225,7 @@ Password? Username? Bah! How about this?
12251225

12261226

12271227
[role="sourcecode"]
1228-
.src/accounts/models.py (ch18l025)
1228+
.src/accounts/models.py (ch19l025)
12291229
====
12301230
[source,python]
12311231
----
@@ -1242,7 +1242,7 @@ And we wire it up inside _settings.py_, adding `accounts` to `INSTALLED_APPS`
12421242
and a variable called `AUTH_USER_MODEL`:
12431243

12441244
[role="sourcecode"]
1245-
.src/superlists/settings.py (ch18l026)
1245+
.src/superlists/settings.py (ch19l026)
12461246
====
12471247
[source,python]
12481248
----
@@ -1284,7 +1284,7 @@ so you should be able to figure out the answers to these questions for yourself.
12841284
Here you go:
12851285

12861286
[role="sourcecode"]
1287-
.src/accounts/models.py (ch18l027)
1287+
.src/accounts/models.py (ch19l027)
12881288
====
12891289
[source,python]
12901290
----
@@ -1310,7 +1310,7 @@ AttributeError: type object 'User' has no attribute 'USERNAME_FIELD'
13101310
And we go through a few more of these, until we get to:
13111311

13121312
[role="sourcecode"]
1313-
.src/accounts/models.py (ch18l029)
1313+
.src/accounts/models.py (ch19l029)
13141314
====
13151315
[source,python]
13161316
----
@@ -1344,7 +1344,7 @@ Well, the simple way to fix that would be like this:
13441344

13451345

13461346
[role="sourcecode"]
1347-
.src/accounts/models.py (ch18l030)
1347+
.src/accounts/models.py (ch19l030)
13481348
====
13491349
[source,python]
13501350
----
@@ -1371,7 +1371,7 @@ Migrations for 'accounts':
13711371
src/accounts/migrations/0001_initial.py
13721372
+ Create model User
13731373
----
1374-
//ch18l031
1374+
//ch19l031
13751375

13761376

13771377
And the test passes:
@@ -1411,7 +1411,7 @@ and conceivably claim it was "just a refactor",
14111411
it would be better to have a specific test:
14121412

14131413
[role="sourcecode"]
1414-
.src/accounts/tests/test_models.py (ch18l032)
1414+
.src/accounts/tests/test_models.py (ch19l032)
14151415
====
14161416
[source,python]
14171417
----
@@ -1439,7 +1439,7 @@ TIP: Your tests can be a form of documentation for your code--they
14391439
And here's the implementation (`primary_key` makes the `unique=True` obsolete):
14401440

14411441
[role="sourcecode"]
1442-
.src/accounts/models.py (ch18l033)
1442+
.src/accounts/models.py (ch19l033)
14431443
====
14441444
[source,python]
14451445
----
@@ -1459,7 +1459,7 @@ Migrations for 'accounts':
14591459
src/accounts/migrations/0001_initial.py
14601460
+ Create model User
14611461
----
1462-
//ch18l034
1462+
//ch19l034
14631463

14641464
// DAVID: Deleting migrations can get readers in a pickle if they have already run migrations locally.
14651465
// Might be worth saying we're only doing this because we've just created it, and advise them to delete
@@ -1509,7 +1509,7 @@ should be able to link an email to a unique ID,
15091509
and that ID shouldn't be the same two times in a row:
15101510

15111511
[role="sourcecode"]
1512-
.src/accounts/tests/test_models.py (ch18l035)
1512+
.src/accounts/tests/test_models.py (ch19l035)
15131513
====
15141514
[source,python]
15151515
----
@@ -1534,7 +1534,7 @@ make migrations, get new error, delete migrations,
15341534
re-create new migrations, another code change, and so on...
15351535

15361536

1537-
[role="dofirst-ch18l036"]
1537+
[role="dofirst-ch19l036"]
15381538
[subs="specialcharacters,macros"]
15391539
----
15401540
$ pass:quotes[*python src/manage.py test accounts*]
@@ -1546,7 +1546,7 @@ I'll trust you to go through these conscientiously--remember,
15461546
I may not be able to see you, but the Testing Goat can!
15471547

15481548

1549-
[role="dofirst-ch18l037"]
1549+
[role="dofirst-ch19l037"]
15501550
[subs="specialcharacters,macros"]
15511551
----
15521552
$ pass:quotes[*python src/manage.py makemigrations*]
@@ -1561,8 +1561,8 @@ $ pass:quotes[*rm src/accounts/migrations/0002_token.py*]
15611561

15621562
Eventually you should get to this code...
15631563

1564-
[role="sourcecode dofirst-ch18l038-0"]
1565-
.src/accounts/models.py (ch18l038)
1564+
[role="sourcecode dofirst-ch19l038-0"]
1565+
.src/accounts/models.py (ch19l038)
15661566
====
15671567
[source,python]
15681568
----
@@ -1575,7 +1575,7 @@ class Token(models.Model):
15751575

15761576
And this error:
15771577

1578-
[role="dofirst-ch18l039"]
1578+
[role="dofirst-ch19l039"]
15791579
[subs="specialcharacters,macros"]
15801580
----
15811581
$ pass:quotes[*python src/manage.py test accounts*]
@@ -1594,7 +1594,7 @@ We can use it like this:
15941594
// DAVID: It feels like a strange time to introduce it, seeing as we've already used it in the spike earlier.
15951595

15961596
[role="sourcecode"]
1597-
.src/accounts/models.py (ch18l040)
1597+
.src/accounts/models.py (ch19l040)
15981598
====
15991599
[source,python]
16001600
----
@@ -1615,7 +1615,7 @@ that should get us to passing tests:
16151615
// but next time they make migrations it will include this change too. That doesn't matter that
16161616
// much but isn't as clean a git history. Might be simpler just to tell them to makemigrations.
16171617

1618-
[role="dofirst-ch18l041"]
1618+
[role="dofirst-ch19l041"]
16191619
[subs="specialcharacters,quotes"]
16201620
----
16211621
$ *python src/manage.py test accounts*

0 commit comments

Comments
 (0)