Skip to content

Commit 4214205

Browse files
committed
Rename chapter 15
1 parent 68f724d commit 4214205

14 files changed

+24
-25
lines changed

.gitmodules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
path = source/chapter_14_simple_form/superlists
3636
url = [email protected]:hjwp/book-example.git
3737
[submodule "source/chapter_13/superlists"]
38-
path = source/chapter_advanced_forms/superlists
38+
path = source/chapter_15_advanced_forms/superlists
3939
url = [email protected]:hjwp/book-example.git
4040
[submodule "source/chapter_14/superlists"]
4141
path = source/chapter_javascript/superlists

appendix_Django_Class-Based_Views.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Django Class-Based Views
44
------------------------
55

66
((("Django framework", "class-based generic views", id="DJFclass28")))This
7-
appendix follows on from <<chapter_advanced_forms>>, in which we
7+
appendix follows on from <<chapter_15_advanced_forms>>, in which we
88
implemented Django forms for validation and refactored our views. By the end
99
of that chapter, our views were still using functions.
1010

appendix_github_links.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Full List of Links for Each Chapter
3333
<<chapter_12_organising_test_files>>:: https://github.com/hjwp/book-example/tree/chapter_12_organising_test_files
3434
<<chapter_13_database_layer_validation>>:: https://github.com/hjwp/book-example/tree/chapter_13_database_layer_validation
3535
<<chapter_14_simple_form>>:: https://github.com/hjwp/book-example/tree/chapter_14_simple_form
36-
<<chapter_advanced_forms>>:: https://github.com/hjwp/book-example/tree/chapter_advanced_forms
36+
<<chapter_15_advanced_forms>>:: https://github.com/hjwp/book-example/tree/chapter_15_advanced_forms
3737
<<chapter_javascript>>:: https://github.com/hjwp/book-example/tree/chapter_javascript
3838
<<chapter_deploying_validation>>:: https://github.com/hjwp/book-example/tree/chapter_deploying_validation
3939
<<chapter_spiking_custom_auth>>:: https://github.com/hjwp/book-example/tree/chapter_spiking_custom_auth

atlas.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"chapter_12_organising_test_files.asciidoc",
2727
"chapter_13_database_layer_validation.asciidoc",
2828
"chapter_14_simple_form.asciidoc",
29-
"chapter_advanced_forms.asciidoc",
29+
"chapter_15_advanced_forms.asciidoc",
3030
"chapter_javascript.asciidoc",
3131
"chapter_deploying_validation.asciidoc",
3232
"part3.asciidoc",

book.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ include::chapter_11_ansible.asciidoc[]
3636
include::chapter_12_organising_test_files.asciidoc[]
3737
include::chapter_13_database_layer_validation.asciidoc[]
3838
include::chapter_14_simple_form.asciidoc[]
39-
include::chapter_advanced_forms.asciidoc[]
39+
include::chapter_15_advanced_forms.asciidoc[]
4040
include::chapter_javascript.asciidoc[]
4141
include::chapter_deploying_validation.asciidoc[]
4242

chapter_05_post_and_database.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -864,7 +864,7 @@ NOTE: I've written this unit test in a very verbose style,
864864
I wouldn't recommend writing your model tests like this "in real life",
865865
because it's testing the framework, rather than testing our own code.
866866
We'll actually rewrite this test to be much more concise
867-
in <<chapter_advanced_forms>>
867+
in <<chapter_15_advanced_forms>>
868868
(specifically, at <<rewrite-model-test>>).
869869

870870
// SEBASTIAN: This reminds me of (https://github.com/gregmalcolm/python_koans)[Python Koans].

chapter_advanced_forms.asciidoc renamed to chapter_15_advanced_forms.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[[chapter_advanced_forms]]
1+
[[chapter_15_advanced_forms]]
22
More Advanced Forms
33
-------------------
44

rename-chapter.sh

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,20 @@ set -o pipefail
55
OLD_CHAPTER=$1
66
NEW_NAME=$2
77

8-
git mv "$OLD_CHAPTER.asciidoc" "$NEW_NAME.asciidoc"
9-
git mv "tests/test_$OLD_CHAPTER.py" "tests/test_$NEW_NAME.py"
8+
# git mv "$OLD_CHAPTER.asciidoc" "$NEW_NAME.asciidoc"
9+
# git mv "tests/test_$OLD_CHAPTER.py" "tests/test_$NEW_NAME.py"
10+
#
11+
# git mv "source/$OLD_CHAPTER" "source/$NEW_NAME"
12+
#
13+
# cd "source/$NEW_NAME/superlists"
14+
# git checkout "$OLD_CHAPTER"
15+
# git checkout -b "$NEW_NAME"
16+
# git push -u local
17+
# git push -u origin
18+
# cd ../../..
1019

11-
git mv "source/$OLD_CHAPTER" "source/$NEW_NAME"
12-
13-
cd "source/$NEW_NAME/superlists"
14-
git checkout "$OLD_CHAPTER"
15-
git checkout -b "$NEW_NAME"
16-
git push -u local
17-
git push -u origin
18-
cd ../../..
19-
20-
git grep -l "$OLD_CHAPTER" | xargs sed -i "s/$OLD_CHAPTER/$NEW_NAME/g"
20+
git grep -l "$OLD_CHAPTER" | xargs sed -i '' "s/$OLD_CHAPTER/$NEW_NAME/g"
2121

2222
make "test_$NEW_NAME" || echo -e "\a"
2323

24-
echo TODO
2524
echo git commit -am \'rename "$OLD_CHAPTER" to "$NEW_NAME".\'

tests/chapters.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"chapter_12_organising_test_files",
1616
"chapter_13_database_layer_validation",
1717
"chapter_14_simple_form",
18-
"chapter_advanced_forms",
18+
"chapter_15_advanced_forms",
1919
"chapter_javascript",
2020
"chapter_deploying_validation",
2121
# part 3

0 commit comments

Comments
 (0)