@@ -270,7 +270,7 @@ if you are not convinced yet.
270
270
Client-side validation will provide faster feedback on the UI, but
271
271
https://cheatsheetseries.owasp.org/cheatsheets/Input_Validation_Cheat_Sheet.html#client-side-vs-server-side-validation[it is not a security measure.]
272
272
Server-side validation is indispensable for handling any input
273
- that gets processed by the server -- and it will also provide albeit slower,
273
+ that gets processed by the server-- and it will also provide albeit slower,
274
274
feedback for the client side.]
275
275
276
276
@@ -580,7 +580,7 @@ Not quite, but they did get a little further. Checking the line in which the
580
580
error occurred -- 'line 31' in my case -- , we can
581
581
// CSANAD: I think emphasizing what to look for in the error log is helpful.
582
582
see that we've got past the first part of the test, and are now onto the second
583
- check -- that submitting a second empty item also shows an error.
583
+ check-- that submitting a second empty item also shows an error.
584
584
585
585
((("", startref="MLVsurfac13")))We've
586
586
got some working code though, so let's have a commit:
@@ -592,12 +592,6 @@ $ *git commit -am "Adjust new list view to do model validation"*
592
592
----
593
593
594
594
595
- TIP: When working on a new feature, it's common to realize partway through that
596
- a refactor of the application is needed. Adding an early return to the FT
597
- you're currently working on allows you to perform this refactor against
598
- passing FTs, even while the feature is still in progress.
599
-
600
-
601
595
Let's put an early return in the FT to separate
602
596
what we got working from those that still need to be dealt with:
603
597
@@ -633,6 +627,12 @@ We should also remind ourselves not to forget to remove this early return:
633
627
634
628
And now, we can focus on making our code a little neater.
635
629
630
+ TIP: When working on a new feature, it's common to realize partway through that
631
+ a refactor of the application is needed. Adding an early return to the FT
632
+ you're currently working on allows you to perform this refactor against
633
+ passing FTs, even while the feature is still in progress.
634
+
635
+
636
636
637
637
=== Django Pattern: Processing POST Requests in the Same View as Renders the Form
638
638
@@ -831,14 +831,21 @@ urlpatterns = [
831
831
----
832
832
====
833
833
834
- And that gets us to the `OK` .
834
+ And that gets us to the green on the unit tests .
835
835
836
836
----
837
837
OK
838
838
----
839
839
840
840
841
841
Let's try a full FT run: they're all passing!
842
+
843
+ ----
844
+ Ran 4 tests in 20 s
845
+
846
+ OK
847
+ ----
848
+
842
849
Our refactor of the `add_item` functionality is complete.
843
850
We should commit there:
844
851
0 commit comments