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
.title{color:var(--tertiarycolor) !important; font-family:"Noto Sans",sans-serif !important;font-style: normal !important; font-weight: normal !important;}
75
85
p{font-family:"Noto Sans",sans-serif !important}
76
86
@@ -128,7 +138,7 @@
128
138
</div>
129
139
<divid="content">
130
140
<divclass="sect1">
131
-
<h2id="appendix_csvs">Appendix C: Swapping Out the Infrastructure: Do Everything with CSVs</h2>
141
+
<h2id="appendix_csvs">Appendix C: Swapping Out the Infrastructure: Do Everything with CSVs<aclass="anchor" href="#appendix_csvs"></a>Appendix A: Swapping Out the Infrastructure: </h2>
132
142
<divclass="sectionbody">
133
143
<divclass="paragraph">
134
144
<p>
@@ -309,7 +319,7 @@ <h2 id="appendix_csvs">Appendix C: Swapping Out the Infrastructure: Do Everythin
309
319
with CSVs underlying them instead of a database. And as you’ll see, it really is relatively straightforward.</p>
310
320
</div>
311
321
<divclass="sect2">
312
-
<h3id="_implementing_a_repository_and_unit_of_work_for_csvs">Implementing a Repository and Unit of Work for CSVs</h3>
322
+
<h3id="_implementing_a_repository_and_unit_of_work_for_csvs"><aclass="anchor" href="#_implementing_a_repository_and_unit_of_work_for_csvs"></a>Implementing a Repository and Unit of Work for CSVs</h3>
313
323
<divclass="paragraph">
314
324
<p>
315
325
Here’s what a CSV-based repository could look like. It abstracts away all the
.title{color:var(--tertiarycolor) !important; font-family:"Noto Sans",sans-serif !important;font-style: normal !important; font-weight: normal !important;}
75
85
p{font-family:"Noto Sans",sans-serif !important}
76
86
@@ -128,7 +138,7 @@
128
138
</div>
129
139
<divid="content">
130
140
<divclass="sect1">
131
-
<h2id="appendix_django">Appendix D: Repository and Unit of Work Patterns with Django</h2>
141
+
<h2id="appendix_django">Appendix D: Repository and Unit of Work Patterns with Django<aclass="anchor" href="#appendix_django"></a>Appendix A: Repository and Unit of Work </h2>
132
142
<divclass="sectionbody">
133
143
<divclass="paragraph">
134
144
<p>
@@ -197,7 +207,7 @@ <h2 id="appendix_django">Appendix D: Repository and Unit of Work Patterns with D
197
207
</table>
198
208
</div>
199
209
<divclass="sect2">
200
-
<h3id="_repository_pattern_with_django">Repository Pattern with Django</h3>
210
+
<h3id="_repository_pattern_with_django"><aclass="anchor" href="#_repository_pattern_with_django"></a>Repository Pattern with Django</h3>
201
211
<divclass="paragraph">
202
212
<p>
203
213
@@ -302,7 +312,7 @@ <h3 id="_repository_pattern_with_django">Repository Pattern with Django</h3>
302
312
some custom methods for translating to and from our domain model.<supclass="footnote">[<aid="_footnoteref_1" class="footnote" href="#_footnotedef_1" title="View footnote.">1</a>]</sup></p>
303
313
</div>
304
314
<divclass="sect3">
305
-
<h4id="_custom_methods_on_django_orm_classes_to_translate_tofrom_our_domain_model">Custom Methods on Django ORM Classes to Translate to/from Our Domain Model</h4>
315
+
<h4id="_custom_methods_on_django_orm_classes_to_translate_tofrom_our_domain_model"><aclass="anchor" href="#_custom_methods_on_django_orm_classes_to_translate_tofrom_our_domain_model"></a>Custom Methods on Django ORM Classes to Translate to/from Our Domain Model</h4>
<h3id="_unit_of_work_pattern_with_django">Unit of Work Pattern with Django</h3>
401
+
<h3id="_unit_of_work_pattern_with_django"><aclass="anchor" href="#_unit_of_work_pattern_with_django"></a>Unit of Work Pattern with Django</h3>
392
402
<divclass="paragraph">
393
403
<p>
394
404
@@ -502,7 +512,7 @@ <h3 id="_unit_of_work_pattern_with_django">Unit of Work Pattern with Django</h3>
502
512
</div>
503
513
</div>
504
514
<divclass="sect2">
505
-
<h3id="_api_django_views_are_adapters">API: Django Views Are Adapters</h3>
515
+
<h3id="_api_django_views_are_adapters"><aclass="anchor" href="#_api_django_views_are_adapters"></a>API: Django Views Are Adapters</h3>
506
516
<divclass="paragraph">
507
517
<p>
508
518
@@ -552,7 +562,7 @@ <h3 id="_api_django_views_are_adapters">API: Django Views Are Adapters</h3>
552
562
</div>
553
563
</div>
554
564
<divclass="sect2">
555
-
<h3id="_why_was_this_all_so_hard">Why Was This All So Hard?</h3>
565
+
<h3id="_why_was_this_all_so_hard"><aclass="anchor" href="#_why_was_this_all_so_hard"></a>Why Was This All So Hard?</h3>
556
566
<divclass="paragraph">
557
567
<p>
558
568
OK, it works, but it does feel like more effort than Flask/SQLAlchemy. Why is
@@ -587,7 +597,7 @@ <h3 id="_why_was_this_all_so_hard">Why Was This All So Hard?</h3>
587
597
</div>
588
598
</div>
589
599
<divclass="sect2">
590
-
<h3id="_what_to_do_if_you_already_have_django">What to Do If You Already Have Django</h3>
600
+
<h3id="_what_to_do_if_you_already_have_django"><aclass="anchor" href="#_what_to_do_if_you_already_have_django"></a>What to Do If You Already Have Django</h3>
591
601
<divclass="paragraph">
592
602
<p>
593
603
So what should you do if you want to apply some of the patterns in this book
@@ -628,7 +638,7 @@ <h3 id="_what_to_do_if_you_already_have_django">What to Do If You Already Have D
628
638
</div>
629
639
</div>
630
640
<divclass="sect2">
631
-
<h3id="_steps_along_the_way">Steps Along the Way</h3>
641
+
<h3id="_steps_along_the_way"><aclass="anchor" href="#_steps_along_the_way"></a>Steps Along the Way</h3>
632
642
<divclass="paragraph">
633
643
<p>
634
644
Suppose you’re working on a Django project that you’re not sure is going
.title{color:var(--tertiarycolor) !important; font-family:"Noto Sans",sans-serif !important;font-style: normal !important; font-weight: normal !important;}
75
85
p{font-family:"Noto Sans",sans-serif !important}
76
86
@@ -128,7 +138,7 @@
128
138
</div>
129
139
<divid="content">
130
140
<divclass="sect1">
131
-
<h2id="appendix_ds1_table">Appendix A: Summary Diagram and Table</h2>
141
+
<h2id="appendix_ds1_table">Appendix A: Summary Diagram and Table<aclass="anchor" href="#appendix_ds1_table"></a>Appendix A: Summary Diagram and Table</h2>
.title{color:var(--tertiarycolor) !important; font-family:"Noto Sans",sans-serif !important;font-style: normal !important; font-weight: normal !important;}
75
85
p{font-family:"Noto Sans",sans-serif !important}
76
86
@@ -128,7 +138,7 @@
128
138
</div>
129
139
<divid="content">
130
140
<divclass="sect1">
131
-
<h2id="appendix_project_structure">Appendix B: A Template Project Structure</h2>
141
+
<h2id="appendix_project_structure">Appendix B: A Template Project Structure<aclass="anchor" href="#appendix_project_structure"></a>Appendix A: A Template Project Structure</h2>
<p>Let’s look at a few of these files and concepts in more detail.</p>
258
268
</div>
259
269
<divclass="sect2">
260
-
<h3id="_env_vars_12_factor_and_config_inside_and_outside_containers">Env Vars, 12-Factor, and Config, Inside and Outside Containers</h3>
270
+
<h3id="_env_vars_12_factor_and_config_inside_and_outside_containers"><aclass="anchor" href="#_env_vars_12_factor_and_config_inside_and_outside_containers"></a>Env Vars, 12-Factor, and Config, Inside and Outside Containers</h3>
261
271
<divclass="paragraph">
262
272
<p>The basic problem we’re trying to solve here is that we need different
<h3id="_docker_compose_and_containers_config">Docker-Compose and Containers Config</h3>
360
+
<h3id="_docker_compose_and_containers_config"><aclass="anchor" href="#_docker_compose_and_containers_config"></a>Docker-Compose and Containers Config</h3>
351
361
<divclass="paragraph">
352
362
<p>We use a lightweight Docker container orchestration tool called <em>docker-compose</em>.
353
363
It’s main configuration is via a YAML file (sigh):<supclass="footnote">[<aid="_footnoteref_5" class="footnote" href="#_footnotedef_5" title="View footnote.">5</a>]</sup></p>
@@ -448,7 +458,7 @@ <h3 id="_docker_compose_and_containers_config">Docker-Compose and Containers Con
448
458
</div>
449
459
</div>
450
460
<divclass="sect2">
451
-
<h3id="_installing_your_source_as_a_package">Installing Your Source as a Package</h3>
461
+
<h3id="_installing_your_source_as_a_package"><aclass="anchor" href="#_installing_your_source_as_a_package"></a>Installing Your Source as a Package</h3>
0 commit comments