@@ -228,6 +228,7 @@ <h2 id="toc-title">Contents</h2>
228228 < li > < a href ="#run-django-project " id ="toc-run-django-project " class ="nav-link " data-scroll-target ="#run-django-project "> < span class ="header-section-number "> 9</ span > Run < code > Django</ code > Project</ a > </ li >
229229 < li > < a href ="#view-in-browser " id ="toc-view-in-browser " class ="nav-link " data-scroll-target ="#view-in-browser "> < span class ="header-section-number "> 10</ span > View in Browser</ a > </ li >
230230 < li > < a href ="#django-admin-console " id ="toc-django-admin-console " class ="nav-link " data-scroll-target ="#django-admin-console "> < span class ="header-section-number "> 11</ span > < code > Django</ code > Admin Console</ a > </ li >
231+ < li > < a href ="#database " id ="toc-database " class ="nav-link " data-scroll-target ="#database "> < span class ="header-section-number "> 12</ span > Database</ a > </ li >
231232 </ ul >
232233</ nav >
233234 </ div >
@@ -264,19 +265,19 @@ <h1 data-number="2"><span class="header-section-number">2</span> <code>Django</c
264265< section id ="install-django " class ="level1 " data-number ="3 ">
265266< h1 data-number ="3 "> < span class ="header-section-number "> 3</ span > Install < code > Django</ code > </ h1 >
266267< p > In terminal:</ p >
267- < div id ="536685f2 " class ="cell " data-execution_count ="1 ">
268+ < div id ="bb231636 " class ="cell " data-execution_count ="1 ">
268269< 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 >
269270< 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 >
270271</ div >
271272< p > Verify installation:</ p >
272- < div id ="22134e2d " class ="cell " data-execution_count ="2 ">
273+ < div id ="c66de59e " class ="cell " data-execution_count ="2 ">
273274< 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 >
274275</ div >
275276</ section >
276277< section id ="create-a-django-project " class ="level1 " data-number ="4 ">
277278< h1 data-number ="4 "> < span class ="header-section-number "> 4</ span > Create a < code > Django</ code > Project</ h1 >
278279< 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 >
279- < div id ="911c99be " class ="cell " data-execution_count ="3 ">
280+ < div id ="424afb82 " class ="cell " data-execution_count ="3 ">
280281< 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 >
281282</ div >
282283< p > This will create a “nameOfProject” directory in your current directory.</ p >
@@ -324,7 +325,7 @@ <h1 data-number="6"><span class="header-section-number">6</span> Create a <code>
324325< li > wiki</ li >
325326</ ul >
326327< p > To create a < code > Django</ code > app, < strong > < code > cd</ code > </ strong > into the project folder type the following:</ p >
327- < div id ="5a2a26b5 " class ="cell " data-execution_count ="4 ">
328+ < div id ="eacaa715 " class ="cell " data-execution_count ="4 ">
328329< 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 >
329330</ div >
330331< p > This will create the “nameOfApp” folder and files for the app.</ p >
@@ -379,25 +380,29 @@ <h2 data-number="7.7" class="anchored" data-anchor-id="migrations"><span class="
379380</ section >
380381< section id ="update-migrations " class ="level1 " data-number ="8 ">
381382< h1 data-number ="8 "> < span class ="header-section-number "> 8</ span > Update Migrations</ h1 >
382- < div id ="6cee7bf7 " class ="cell " data-execution_count ="5 ">
383+ < div id ="e100044a " class ="cell " data-execution_count ="5 ">
383384< 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 makemigrations</ span >
384385< span id ="cb5-2 "> < a href ="#cb5-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 >
385386</ div >
386387</ section >
387388< section id ="run-django-project " class ="level1 " data-number ="9 ">
388389< h1 data-number ="9 "> < span class ="header-section-number "> 9</ span > Run < code > Django</ code > Project</ h1 >
389- < div id ="d55c397e " class ="cell " data-execution_count ="6 ">
390+ < div id ="f76c4c12 " class ="cell " data-execution_count ="6 ">
390391< 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 runserver</ span > </ code > < button title ="Copy to Clipboard " class ="code-copy-button "> < i class ="bi "> </ i > </ button > </ pre > </ div >
391392</ div >
392393</ section >
393394< section id ="view-in-browser " class ="level1 " data-number ="10 ">
394395< h1 data-number ="10 "> < span class ="header-section-number "> 10</ span > View in Browser</ h1 >
395396< p > < a href ="http://127.0.0.1:8000 " class ="uri "> http://127.0.0.1:8000</ a > </ p >
396- < p > < code > localhost:8000</ code > </ p >
397+ < p > < a href =" http://localhost:8000 " class =" uri " > http:// localhost:8000</ a > </ p >
397398</ section >
398399< section id ="django-admin-console " class ="level1 " data-number ="11 ">
399400< h1 data-number ="11 "> < span class ="header-section-number "> 11</ span > < code > Django</ code > Admin Console</ h1 >
400401< p > < a href ="http://127.0.0.1:8000/admin " class ="uri "> http://127.0.0.1:8000/admin</ a > </ p >
402+ </ section >
403+ < section id ="database " class ="level1 " data-number ="12 ">
404+ < h1 data-number ="12 "> < span class ="header-section-number "> 12</ span > Database</ h1 >
405+ < p > < a href ="http://localhost " class ="uri "> http://localhost</ a > </ p >
401406
402407
403408<!-- -->
@@ -1049,11 +1054,15 @@ <h1 data-number="11"><span class="header-section-number">11</span> <code>Django<
10491054< span id ="cb7-164 "> < a href ="#cb7-164 " aria-hidden ="true " tabindex ="-1 "> </ a > </ span >
10501055< span id ="cb7-165 "> < a href ="#cb7-165 " aria-hidden ="true " tabindex ="-1 "> </ a > < span class ="ot "> <http://127.0.0.1:8000></ span > </ span >
10511056< span id ="cb7-166 "> < a href ="#cb7-166 " aria-hidden ="true " tabindex ="-1 "> </ a > </ span >
1052- < span id ="cb7-167 "> < a href ="#cb7-167 " aria-hidden ="true " tabindex ="-1 "> </ a > < span class ="in " > ` localhost:8000` </ span > </ span >
1057+ < span id ="cb7-167 "> < a href ="#cb7-167 " aria-hidden ="true " tabindex ="-1 "> </ a > < span class ="ot " > <http:// localhost:8000> </ span > </ span >
10531058< span id ="cb7-168 "> < a href ="#cb7-168 " aria-hidden ="true " tabindex ="-1 "> </ a > </ span >
10541059< span id ="cb7-169 "> < a href ="#cb7-169 " aria-hidden ="true " tabindex ="-1 "> </ a > < span class ="fu "> # `Django` Admin Console</ span > </ span >
10551060< span id ="cb7-170 "> < a href ="#cb7-170 " aria-hidden ="true " tabindex ="-1 "> </ a > </ span >
10561061< span id ="cb7-171 "> < a href ="#cb7-171 " aria-hidden ="true " tabindex ="-1 "> </ a > < span class ="ot "> <http://127.0.0.1:8000/admin></ span > </ span >
1062+ < span id ="cb7-172 "> < a href ="#cb7-172 " aria-hidden ="true " tabindex ="-1 "> </ a > </ span >
1063+ < span id ="cb7-173 "> < a href ="#cb7-173 " aria-hidden ="true " tabindex ="-1 "> </ a > < span class ="fu "> # Database</ span > </ span >
1064+ < span id ="cb7-174 "> < a href ="#cb7-174 " aria-hidden ="true " tabindex ="-1 "> </ a > </ span >
1065+ < span id ="cb7-175 "> < a href ="#cb7-175 " aria-hidden ="true " tabindex ="-1 "> </ a > < span class ="ot "> <http://localhost></ span > </ span >
10571066</ code > < button title ="Copy to Clipboard " class ="code-copy-button "> < i class ="bi "> </ i > </ button > </ pre > </ div >
10581067</ div > </ div > </ div > </ div > </ div >
10591068</ div > <!-- /content -->
0 commit comments