@@ -418,19 +418,19 @@ <h1 data-number="2"><span class="header-section-number">2</span> <code>Django</c
418418< section id ="install-django " class ="level1 " data-number ="3 ">
419419< h1 data-number ="3 "> < span class ="header-section-number "> 3</ span > Install < code > Django</ code > </ h1 >
420420< p > In terminal:</ p >
421- < div id ="c1a6ae46 " class ="cell " data-execution_count ="1 ">
421+ < div id ="2ca945b9 " class ="cell " data-execution_count ="1 ">
422422< div class ="code-copy-outer-scaffold "> < 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 >
423423< 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 > </ pre > </ div > < button title ="Copy to Clipboard " class ="code-copy-button "> < i class ="bi "> </ i > </ button > </ div >
424424</ div >
425425< p > Verify installation:</ p >
426- < div id ="0bf239f5 " class ="cell " data-execution_count ="2 ">
426+ < div id ="e564c55e " class ="cell " data-execution_count ="2 ">
427427< div class ="code-copy-outer-scaffold "> < 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 > </ pre > </ div > < button title ="Copy to Clipboard " class ="code-copy-button "> < i class ="bi "> </ i > </ button > </ div >
428428</ div >
429429</ section >
430430< section id ="create-a-django-project " class ="level1 " data-number ="4 ">
431431< h1 data-number ="4 "> < span class ="header-section-number "> 4</ span > Create a < code > Django</ code > Project</ h1 >
432432< 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 >
433- < div id ="55eaa241 " class ="cell " data-execution_count ="3 ">
433+ < div id ="87e50ada " class ="cell " data-execution_count ="3 ">
434434< div class ="code-copy-outer-scaffold "> < 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 > </ pre > </ div > < button title ="Copy to Clipboard " class ="code-copy-button "> < i class ="bi "> </ i > </ button > </ div >
435435</ div >
436436< p > This will create a “nameOfProject” directory in your current directory.</ p >
@@ -478,7 +478,7 @@ <h1 data-number="6"><span class="header-section-number">6</span> Create a <code>
478478< li > wiki</ li >
479479</ ul >
480480< p > To create a < code > Django</ code > app, < strong > < code > cd</ code > </ strong > into the project folder type the following:</ p >
481- < div id ="2a8f284c " class ="cell " data-execution_count ="4 ">
481+ < div id ="f70f03d2 " class ="cell " data-execution_count ="4 ">
482482< div class ="code-copy-outer-scaffold "> < 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 > </ pre > </ div > < button title ="Copy to Clipboard " class ="code-copy-button "> < i class ="bi "> </ i > </ button > </ div >
483483</ div >
484484< p > This will create the “nameOfApp” folder and files for the app.</ p >
@@ -533,26 +533,26 @@ <h2 data-number="7.7" class="anchored" data-anchor-id="migrations"><span class="
533533</ section >
534534< section id ="remove-migrations " class ="level1 " data-number ="8 ">
535535< h1 data-number ="8 "> < span class ="header-section-number "> 8</ span > Remove Migrations</ h1 >
536- < div id ="3f59c267 " class ="cell " data-execution_count ="5 ">
536+ < div id ="2e1ee933 " class ="cell " data-execution_count ="5 ">
537537< div class ="code-copy-outer-scaffold "> < 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 > </ pre > </ div > < button title ="Copy to Clipboard " class ="code-copy-button "> < i class ="bi "> </ i > </ button > </ div >
538538</ div >
539539</ section >
540540< section id ="update-migrations " class ="level1 " data-number ="9 ">
541541< h1 data-number ="9 "> < span class ="header-section-number "> 9</ span > Update Migrations</ h1 >
542- < div id ="3e6886c5 " class ="cell " data-execution_count ="6 ">
542+ < div id ="e4f7a753 " class ="cell " data-execution_count ="6 ">
543543< div class ="code-copy-outer-scaffold "> < 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 >
544544< span id ="cb6-2 "> < a href ="#cb6-2 " aria-hidden ="true " tabindex ="-1 "> </ a > python3 manage.py migrate</ span > </ code > </ pre > </ div > < button title ="Copy to Clipboard " class ="code-copy-button "> < i class ="bi "> </ i > </ button > </ div >
545545</ div >
546546</ section >
547547< section id ="run-django-commands " class ="level1 " data-number ="10 ">
548548< h1 data-number ="10 "> < span class ="header-section-number "> 10</ span > Run < code > Django</ code > Commands</ h1 >
549- < div id ="efeee1a9 " class ="cell " data-execution_count ="7 ">
549+ < div id ="bc2b9b4b " class ="cell " data-execution_count ="7 ">
550550< div class ="code-copy-outer-scaffold "> < 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 NAME_OF_COMMAND</ span > </ code > </ pre > </ div > < button title ="Copy to Clipboard " class ="code-copy-button "> < i class ="bi "> </ i > </ button > </ div >
551551</ div >
552552</ section >
553553< section id ="run-django-project " class ="level1 " data-number ="11 ">
554554< h1 data-number ="11 "> < span class ="header-section-number "> 11</ span > Run < code > Django</ code > Project</ h1 >
555- < div id ="f4174d1e " class ="cell " data-execution_count ="8 ">
555+ < div id ="0167fe1b " class ="cell " data-execution_count ="8 ">
556556< div class ="code-copy-outer-scaffold "> < div class ="sourceCode cell-code " id ="cb8 "> < pre class ="sourceCode python code-with-copy "> < code class ="sourceCode python "> < span id ="cb8-1 "> < a href ="#cb8-1 " aria-hidden ="true " tabindex ="-1 "> </ a > python3 manage.py runserver</ span > </ code > </ pre > </ div > < button title ="Copy to Clipboard " class ="code-copy-button "> < i class ="bi "> </ i > </ button > </ div >
557557</ div >
558558</ section >
@@ -569,14 +569,14 @@ <h1 data-number="13"><span class="header-section-number">13</span> <code>Django<
569569< section id ="query-database-with-orm " class ="level1 " data-number ="14 ">
570570< h1 data-number ="14 "> < span class ="header-section-number "> 14</ span > Query Database with ORM</ h1 >
571571< p > Object-Relational Mapper (ORM)</ p >
572- < div id ="f1326e43 " class ="cell " data-execution_count ="9 ">
572+ < div id ="e8182e1e " class ="cell " data-execution_count ="9 ">
573573< div class ="code-copy-outer-scaffold "> < div class ="sourceCode cell-code " id ="cb9 "> < pre class ="sourceCode python code-with-copy "> < code class ="sourceCode python "> < span id ="cb9-1 "> < a href ="#cb9-1 " aria-hidden ="true " tabindex ="-1 "> </ a > python3 manage.py shell</ span > </ code > </ pre > </ div > < button title ="Copy to Clipboard " class ="code-copy-button "> < i class ="bi "> </ i > </ button > </ div >
574574</ div >
575575</ section >
576576< section id ="database " class ="level1 " data-number ="15 ">
577577< h1 data-number ="15 "> < span class ="header-section-number "> 15</ span > Database</ h1 >
578578< p > < a href ="http://localhost " class ="uri "> http://localhost</ a > </ p >
579- < div id ="46323532 " class ="cell " data-execution_count ="10 ">
579+ < div id ="a865f0e0 " class ="cell " data-execution_count ="10 ">
580580< div class ="code-copy-outer-scaffold "> < div class ="sourceCode cell-code " id ="cb10 "> < pre class ="sourceCode python code-with-copy "> < code class ="sourceCode python "> < span id ="cb10-1 "> < a href ="#cb10-1 " aria-hidden ="true " tabindex ="-1 "> </ a > python3 manage.py createsuperuser</ span > </ code > </ pre > </ div > < button title ="Copy to Clipboard " class ="code-copy-button "> < i class ="bi "> </ i > </ button > </ div >
581581</ div >
582582</ section >
0 commit comments