@@ -266,19 +266,19 @@ <h1 data-number="2"><span class="header-section-number">2</span> <code>Django</c
266266< section id ="install-django " class ="level1 " data-number ="3 ">
267267< h1 data-number ="3 "> < span class ="header-section-number "> 3</ span > Install < code > Django</ code > </ h1 >
268268< p > In terminal:</ p >
269- < div id ="d0b0ecbf " class ="cell " data-execution_count ="1 ">
269+ < div id ="a4be6df8 " class ="cell " data-execution_count ="1 ">
270270< 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 >
271271< 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 >
272272</ div >
273273< p > Verify installation:</ p >
274- < div id ="6b129777 " class ="cell " data-execution_count ="2 ">
274+ < div id ="bc4c12d0 " class ="cell " data-execution_count ="2 ">
275275< 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 >
276276</ div >
277277</ section >
278278< section id ="create-a-django-project " class ="level1 " data-number ="4 ">
279279< h1 data-number ="4 "> < span class ="header-section-number "> 4</ span > Create a < code > Django</ code > Project</ h1 >
280280< 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 ">
282282< 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 >
283283</ div >
284284< 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>
326326< li > wiki</ li >
327327</ ul >
328328< 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 ">
330330< 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 >
331331</ div >
332332< 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="
381381</ section >
382382< section id ="remove-migrations " class ="level1 " data-number ="8 ">
383383< 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 ">
385385< 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 >
386386</ div >
387387</ section >
388388< section id ="update-migrations " class ="level1 " data-number ="9 ">
389389< 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 ">
391391< 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 >
392392< 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 >
393393</ div >
394394</ section >
395395< section id ="run-django-project " class ="level1 " data-number ="10 ">
396396< 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 ">
398398< 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 >
399399</ div >
400400</ section >
401401< section id ="view-in-browser " class ="level1 " data-number ="11 ">
402402< 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 >
404403< 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 >
405405</ section >
406406< section id ="django-admin-console " class ="level1 " data-number ="12 ">
407407< 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 >
408409< p > < a href ="http://127.0.0.1:8000/admin " class ="uri "> http://127.0.0.1:8000/admin</ a > </ p >
409410</ section >
410411< 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>
10671068< span id ="cb8-172 "> < a href ="#cb8-172 " aria-hidden ="true " tabindex ="-1 "> </ a > </ span >
10681069< span id ="cb8-173 "> < a href ="#cb8-173 " aria-hidden ="true " tabindex ="-1 "> </ a > < span class ="fu "> # View in Browser</ span > </ span >
10691070< 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 >
10711072< 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 >
10731074< span id ="cb8-178 "> < a href ="#cb8-178 " aria-hidden ="true " tabindex ="-1 "> </ a > </ span >
10741075< span id ="cb8-179 "> < a href ="#cb8-179 " aria-hidden ="true " tabindex ="-1 "> </ a > < span class ="fu "> # `Django` Admin Console</ span > </ span >
10751076< 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 >
10771078< 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 >
10791080< 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 >
10811084</ code > < button title ="Copy to Clipboard " class ="code-copy-button "> < i class ="bi "> </ i > </ button > </ pre > </ div >
10821085</ div > </ div > </ div > </ div > </ div >
10831086</ div > <!-- /content -->
0 commit comments