@@ -266,19 +266,19 @@ <h1 data-number="2"><span class="header-section-number">2</span> <code>Django</c
266
266
< section id ="install-django " class ="level1 " data-number ="3 ">
267
267
< h1 data-number ="3 "> < span class ="header-section-number "> 3</ span > Install < code > Django</ code > </ h1 >
268
268
< p > In terminal:</ p >
269
- < div id ="d0b0ecbf " class ="cell " data-execution_count ="1 ">
269
+ < div id ="a4be6df8 " class ="cell " data-execution_count ="1 ">
270
270
< div class ="sourceCode cell-code " id ="cb1 "> < pre class ="sourceCode python code-with-copy "> < code class ="sourceCode python "> < span id ="cb1-1 "> < a href ="#cb1-1 " aria-hidden ="true " tabindex ="-1 "> </ a > python3 < span class ="op "> -</ span > m pip install Django< span class ="op "> ==</ span > < span class ="fl "> 5.0.4</ span > < span class ="co "> # install Django on Mac</ span > </ span >
271
271
< span id ="cb1-2 "> < a href ="#cb1-2 " aria-hidden ="true " tabindex ="-1 "> </ a > py < span class ="op "> -</ span > m pip install Django< span class ="op "> ==</ span > < span class ="fl "> 5.0.4</ span > < span class ="co "> # install Django on Windows</ span > </ span > </ code > < button title ="Copy to Clipboard " class ="code-copy-button "> < i class ="bi "> </ i > </ button > </ pre > </ div >
272
272
</ div >
273
273
< p > Verify installation:</ p >
274
- < div id ="6b129777 " class ="cell " data-execution_count ="2 ">
274
+ < div id ="bc4c12d0 " class ="cell " data-execution_count ="2 ">
275
275
< div class ="sourceCode cell-code " id ="cb2 "> < pre class ="sourceCode python code-with-copy "> < code class ="sourceCode python "> < span id ="cb2-1 "> < a href ="#cb2-1 " aria-hidden ="true " tabindex ="-1 "> </ a > python3 < span class ="op "> -</ span > m django < span class ="op "> --</ span > version < span class ="co "> # gets Django version</ span > </ span > </ code > < button title ="Copy to Clipboard " class ="code-copy-button "> < i class ="bi "> </ i > </ button > </ pre > </ div >
276
276
</ div >
277
277
</ section >
278
278
< section id ="create-a-django-project " class ="level1 " data-number ="4 ">
279
279
< h1 data-number ="4 "> < span class ="header-section-number "> 4</ span > Create a < code > Django</ code > Project</ h1 >
280
280
< p > From the command line, < strong > < code > cd</ code > </ strong > into a directory where you’d like to store your code, then run the following command:</ p >
281
- < div id ="a708bfcf " class ="cell " data-execution_count ="3 ">
281
+ < div id ="7f965f3f " class ="cell " data-execution_count ="3 ">
282
282
< div class ="sourceCode cell-code " id ="cb3 "> < pre class ="sourceCode python code-with-copy "> < code class ="sourceCode python "> < span id ="cb3-1 "> < a href ="#cb3-1 " aria-hidden ="true " tabindex ="-1 "> </ a > django< span class ="op "> -</ span > admin startproject nameOfProject</ span > </ code > < button title ="Copy to Clipboard " class ="code-copy-button "> < i class ="bi "> </ i > </ button > </ pre > </ div >
283
283
</ div >
284
284
< p > This will create a “nameOfProject” directory in your current directory.</ p >
@@ -326,7 +326,7 @@ <h1 data-number="6"><span class="header-section-number">6</span> Create a <code>
326
326
< li > wiki</ li >
327
327
</ ul >
328
328
< p > To create a < code > Django</ code > app, < strong > < code > cd</ code > </ strong > into the project folder type the following:</ p >
329
- < div id ="95f00329 " class ="cell " data-execution_count ="4 ">
329
+ < div id ="3825117f " class ="cell " data-execution_count ="4 ">
330
330
< div class ="sourceCode cell-code " id ="cb4 "> < pre class ="sourceCode python code-with-copy "> < code class ="sourceCode python "> < span id ="cb4-1 "> < a href ="#cb4-1 " aria-hidden ="true " tabindex ="-1 "> </ a > python3 manage.py startapp nameOfApp</ span > </ code > < button title ="Copy to Clipboard " class ="code-copy-button "> < i class ="bi "> </ i > </ button > </ pre > </ div >
331
331
</ div >
332
332
< p > This will create the “nameOfApp” folder and files for the app.</ p >
@@ -381,30 +381,31 @@ <h2 data-number="7.7" class="anchored" data-anchor-id="migrations"><span class="
381
381
</ section >
382
382
< section id ="remove-migrations " class ="level1 " data-number ="8 ">
383
383
< h1 data-number ="8 "> < span class ="header-section-number "> 8</ span > Remove Migrations</ h1 >
384
- < div id ="d0ccb274 " class ="cell " data-execution_count ="5 ">
384
+ < div id ="0f07db71 " class ="cell " data-execution_count ="5 ">
385
385
< div class ="sourceCode cell-code " id ="cb5 "> < pre class ="sourceCode python code-with-copy "> < code class ="sourceCode python "> < span id ="cb5-1 "> < a href ="#cb5-1 " aria-hidden ="true " tabindex ="-1 "> </ a > python3 manage.py migrate zero < span class ="co "> # can insert appname before 'zero'</ span > </ span > </ code > < button title ="Copy to Clipboard " class ="code-copy-button "> < i class ="bi "> </ i > </ button > </ pre > </ div >
386
386
</ div >
387
387
</ section >
388
388
< section id ="update-migrations " class ="level1 " data-number ="9 ">
389
389
< h1 data-number ="9 "> < span class ="header-section-number "> 9</ span > Update Migrations</ h1 >
390
- < div id ="f3304a8d " class ="cell " data-execution_count ="6 ">
390
+ < div id ="2ef027cd " class ="cell " data-execution_count ="6 ">
391
391
< div class ="sourceCode cell-code " id ="cb6 "> < pre class ="sourceCode python code-with-copy "> < code class ="sourceCode python "> < span id ="cb6-1 "> < a href ="#cb6-1 " aria-hidden ="true " tabindex ="-1 "> </ a > python3 manage.py makemigrations < span class ="co "> # can insert appname after 'makemigrations'</ span > </ span >
392
392
< span id ="cb6-2 "> < a href ="#cb6-2 " aria-hidden ="true " tabindex ="-1 "> </ a > python3 manage.py migrate</ span > </ code > < button title ="Copy to Clipboard " class ="code-copy-button "> < i class ="bi "> </ i > </ button > </ pre > </ div >
393
393
</ div >
394
394
</ section >
395
395
< section id ="run-django-project " class ="level1 " data-number ="10 ">
396
396
< h1 data-number ="10 "> < span class ="header-section-number "> 10</ span > Run < code > Django</ code > Project</ h1 >
397
- < div id ="8331adb6 " class ="cell " data-execution_count ="7 ">
397
+ < div id ="f787a692 " class ="cell " data-execution_count ="7 ">
398
398
< div class ="sourceCode cell-code " id ="cb7 "> < pre class ="sourceCode python code-with-copy "> < code class ="sourceCode python "> < span id ="cb7-1 "> < a href ="#cb7-1 " aria-hidden ="true " tabindex ="-1 "> </ a > python3 manage.py runserver</ span > </ code > < button title ="Copy to Clipboard " class ="code-copy-button "> < i class ="bi "> </ i > </ button > </ pre > </ div >
399
399
</ div >
400
400
</ section >
401
401
< section id ="view-in-browser " class ="level1 " data-number ="11 ">
402
402
< h1 data-number ="11 "> < span class ="header-section-number "> 11</ span > View in Browser</ h1 >
403
- < p > < a href ="http://127.0.0.1:8000 " class ="uri "> http://127.0.0.1:8000</ a > </ p >
404
403
< p > < a href ="http://localhost:8000 " class ="uri "> http://localhost:8000</ a > </ p >
404
+ < p > < a href ="http://127.0.0.1:8000 " class ="uri "> http://127.0.0.1:8000</ a > </ p >
405
405
</ section >
406
406
< section id ="django-admin-console " class ="level1 " data-number ="12 ">
407
407
< h1 data-number ="12 "> < span class ="header-section-number "> 12</ span > < code > Django</ code > Admin Console</ h1 >
408
+ < p > < a href ="http://localhost:8000/admin " class ="uri "> http://localhost:8000/admin</ a > </ p >
408
409
< p > < a href ="http://127.0.0.1:8000/admin " class ="uri "> http://127.0.0.1:8000/admin</ a > </ p >
409
410
</ section >
410
411
< section id ="database " class ="level1 " data-number ="13 ">
@@ -1067,17 +1068,19 @@ <h1 data-number="13"><span class="header-section-number">13</span> Database</h1>
1067
1068
< span id ="cb8-172 "> < a href ="#cb8-172 " aria-hidden ="true " tabindex ="-1 "> </ a > </ span >
1068
1069
< span id ="cb8-173 "> < a href ="#cb8-173 " aria-hidden ="true " tabindex ="-1 "> </ a > < span class ="fu "> # View in Browser</ span > </ span >
1069
1070
< span id ="cb8-174 "> < a href ="#cb8-174 " aria-hidden ="true " tabindex ="-1 "> </ a > </ span >
1070
- < span id ="cb8-175 "> < a href ="#cb8-175 " aria-hidden ="true " tabindex ="-1 "> </ a > < span class ="ot "> <http://127.0.0.1 :8000></ span > </ span >
1071
+ < span id ="cb8-175 "> < a href ="#cb8-175 " aria-hidden ="true " tabindex ="-1 "> </ a > < span class ="ot "> <http://localhost :8000></ span > </ span >
1071
1072
< span id ="cb8-176 "> < a href ="#cb8-176 " aria-hidden ="true " tabindex ="-1 "> </ a > </ span >
1072
- < span id ="cb8-177 "> < a href ="#cb8-177 " aria-hidden ="true " tabindex ="-1 "> </ a > < span class ="ot "> <http://localhost :8000></ span > </ span >
1073
+ < span id ="cb8-177 "> < a href ="#cb8-177 " aria-hidden ="true " tabindex ="-1 "> </ a > < span class ="ot "> <http://127.0.0.1 :8000></ span > </ span >
1073
1074
< span id ="cb8-178 "> < a href ="#cb8-178 " aria-hidden ="true " tabindex ="-1 "> </ a > </ span >
1074
1075
< span id ="cb8-179 "> < a href ="#cb8-179 " aria-hidden ="true " tabindex ="-1 "> </ a > < span class ="fu "> # `Django` Admin Console</ span > </ span >
1075
1076
< span id ="cb8-180 "> < a href ="#cb8-180 " aria-hidden ="true " tabindex ="-1 "> </ a > </ span >
1076
- < span id ="cb8-181 "> < a href ="#cb8-181 " aria-hidden ="true " tabindex ="-1 "> </ a > < span class ="ot "> <http://127.0.0.1 :8000/admin></ span > </ span >
1077
+ < span id ="cb8-181 "> < a href ="#cb8-181 " aria-hidden ="true " tabindex ="-1 "> </ a > < span class ="ot "> <http://localhost :8000/admin></ span > </ span >
1077
1078
< span id ="cb8-182 "> < a href ="#cb8-182 " aria-hidden ="true " tabindex ="-1 "> </ a > </ span >
1078
- < span id ="cb8-183 "> < a href ="#cb8-183 " aria-hidden ="true " tabindex ="-1 "> </ a > < span class ="fu " > # Database </ span > </ span >
1079
+ < span id ="cb8-183 "> < a href ="#cb8-183 " aria-hidden ="true " tabindex ="-1 "> </ a > < span class ="ot " > <http://127.0.0.1:8000/admin> </ span > </ span >
1079
1080
< span id ="cb8-184 "> < a href ="#cb8-184 " aria-hidden ="true " tabindex ="-1 "> </ a > </ span >
1080
- < span id ="cb8-185 "> < a href ="#cb8-185 " aria-hidden ="true " tabindex ="-1 "> </ a > < span class ="ot "> <http://localhost></ span > </ span >
1081
+ < span id ="cb8-185 "> < a href ="#cb8-185 " aria-hidden ="true " tabindex ="-1 "> </ a > < span class ="fu "> # Database</ span > </ span >
1082
+ < span id ="cb8-186 "> < a href ="#cb8-186 " aria-hidden ="true " tabindex ="-1 "> </ a > </ span >
1083
+ < span id ="cb8-187 "> < a href ="#cb8-187 " aria-hidden ="true " tabindex ="-1 "> </ a > < span class ="ot "> <http://localhost></ span > </ span >
1081
1084
</ code > < button title ="Copy to Clipboard " class ="code-copy-button "> < i class ="bi "> </ i > </ button > </ pre > </ div >
1082
1085
</ div > </ div > </ div > </ div > </ div >
1083
1086
</ div > <!-- /content -->
0 commit comments