You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -226,7 +223,7 @@ Here's the minimal code change:
226
223
* TODO: update this link for latest bootstrap / style nicely
227
224
228
225
[role="sourcecode small-code"]
229
-
.lists/templates/base.html (ch22l005)
226
+
.src/lists/templates/base.html (ch22l005)
230
227
====
231
228
[source,html]
232
229
----
@@ -262,7 +259,7 @@ Again, we can go outside-in, starting at the presentation layer with just the
262
259
URL and nothing else:
263
260
264
261
[role="sourcecode"]
265
-
.lists/templates/base.html (ch22l006)
262
+
.src/lists/templates/base.html (ch22l006)
266
263
====
267
264
[source,html]
268
265
----
@@ -282,7 +279,7 @@ functions.
282
279
As always, we start with a test:
283
280
284
281
[role="sourcecode"]
285
-
.lists/tests/test_views.py (ch19l003)
282
+
.src/lists/tests/test_views.py (ch19l003)
286
283
====
287
284
[source,python]
288
285
----
@@ -303,7 +300,7 @@ And we fix it, still at the presentation level, in 'urls.py':
303
300
304
301
305
302
[role="sourcecode"]
306
-
.lists/urls.py (ch19l004)
303
+
.src/lists/urls.py (ch19l004)
307
304
====
308
305
[source,python]
309
306
----
@@ -333,7 +330,7 @@ We move in from the presentation layer to the views layer, and create a
333
330
minimal placeholder:
334
331
335
332
[role="sourcecode"]
336
-
.lists/views.py (ch22l005)
333
+
.src/lists/views.py (ch22l005)
337
334
====
338
335
[source,python]
339
336
----
@@ -345,7 +342,7 @@ def my_lists(request, email):
345
342
And a minimal template:
346
343
347
344
[role="sourcecode"]
348
-
.lists/templates/my_lists.html (ch22l006)
345
+
.src/lists/templates/my_lists.html (ch22l006)
349
346
====
350
347
[source,html]
351
348
----
@@ -389,7 +386,7 @@ Also, the "My Lists" page doesn't need the new item form,
389
386
so we'll put that into a block too, making it optional:
390
387
391
388
[role="sourcecode"]
392
-
.lists/templates/base.html (ch19l007-1)
389
+
.src/lists/templates/base.html (ch19l007-1)
393
390
====
394
391
[source,diff]
395
392
----
@@ -413,7 +410,7 @@ so we'll put that into a block too, making it optional:
413
410
====
414
411
415
412
[role="sourcecode"]
416
-
.lists/templates/base.html (ch19l007-2)
413
+
.src/lists/templates/base.html (ch19l007-2)
417
414
====
418
415
[source,html]
419
416
----
@@ -445,7 +442,7 @@ Designing Our API Using the Template
445
442
be empty...
446
443
447
444
[role="sourcecode"]
448
-
.lists/templates/my_lists.html
445
+
.src/lists/templates/my_lists.html
449
446
====
450
447
[source,html]
451
448
----
@@ -460,7 +457,7 @@ be empty...
460
457
And then we can just work inside the `extra_content` block:
461
458
462
459
[role="sourcecode"]
463
-
.lists/templates/my_lists.html
460
+
.src/lists/templates/my_lists.html
464
461
====
465
462
[source,html]
466
463
----
@@ -530,7 +527,7 @@ Moving Down to the Next Layer: What the View Passes to the Template
530
527
our views layer needs to respond to the requirements we've laid out in the template layer, by giving it the objects it needs. In this case, the list owner:
531
528
532
529
[role="sourcecode"]
533
-
.lists/tests/test_views.py (ch19l011)
530
+
.src/lists/tests/test_views.py (ch19l011)
534
531
====
535
532
[source,python]
536
533
----
@@ -559,7 +556,7 @@ KeyError: 'owner'
559
556
So:
560
557
561
558
[role="sourcecode"]
562
-
.lists/views.py (ch19l012)
559
+
.src/lists/views.py (ch19l012)
563
560
====
564
561
[source,python]
565
562
----
@@ -578,7 +575,7 @@ the previous test. We just need to add a user for it as well:
578
575
579
576
580
577
[role="sourcecode"]
581
-
.lists/tests/test_views.py (ch19l013)
578
+
.src/lists/tests/test_views.py (ch19l013)
582
579
====
583
580
[source,python]
584
581
----
@@ -609,7 +606,7 @@ Here's a first crack at writing the test:
609
606
610
607
611
608
[role="sourcecode"]
612
-
.lists/tests/test_views.py (ch22l014)
609
+
.src/lists/tests/test_views.py (ch22l014)
613
610
====
614
611
[source,python]
615
612
----
@@ -637,7 +634,7 @@ AttributeError: 'List' object has no attribute 'owner'
0 commit comments