Soinstead, what I'm gonnadoisjustjumpintoindividualconcepts, puttheminto a practicalusecasein a sortofproject, andtheneventuallyyou'llhave a verygoodunderstandingofhowtobuildrielWebapplicationsusingDjango.
Andofcourse, I dorecommendthatyoulearnfromentireprojectsand I have a bunchofthembothrighthereonYouTube, onjoints.
IfhedotcomslashYouTubeaswellasonourwebsitejointsheavydotcom, wehave a tonicstufftherefrombuildingrielthingswithDjango.
Andthat's partofthefrustrationislikeyou'regonnaseemeworking a lotin a MacsoMacOSenvironment, andifyou'reonWindows, you'relike, Hey, whyisn't itthesame?
I mean, actually, usingpythonandactuallyusingDjangoisthesameonbothsystems.
I wantyoutoignorealloftheonesthathavenumbersinthemandjustgototheonetryDjango, right?
Sothere's a linkrighthereifyouwanttogodirectlythere, butthiscodewill 100% helpyoubecausewhenyouhitroadblocks, whichgonnawanttodoistakethecodethatyou'vebeenwritingandtake a lookatGetHubandmakesurethatwhatyou'vebeenwritingisthesameaswhatwe'vebeendoinginthevideos.
No, I absolutelywantyoutohave a freshvirtualenvironmentand a freshDjangoinstall, notonLee, justtogetthepracticeofit, butalsotomakesurethatwe'reallstartingfromtheexactsamespot.
Sothenthatmeansthatthefinalwaytoactuallystart a virtualenvironmentisvirtually n v v E N v three p.
Andthenthepathtothatpythonthree I hitenter, andthenwe'llactuallystartthatvirtualenvironmentaswell.
Now, oneotherthing I willmentioniswecanalsojustmakethedirectorythatwewanttocallit.
So I wanttomake a virtualenvironmentand a brandnewdirectory.
Thisisit.
I goaheadandenter a CDintoit, andthen I coulddovirtuallyenvyandthenperiodinsteadofthenameandthenwhateverversionofPython I maywant, right?
Sotheorderofthesethingsdoesn't matterthatmuchhow I'm runningthosecommandsincomparisontowhat I wasdoingbefore, Butthat's a fewdifferentwaysonhowyoucancreate a virtualenvironmentNow, Inmycase, I'm actuallygonnagoaheadandgiveridofthatdeaftofolder.
Okay, so, uh, I'llseethebackintomyoriginalprojectandjustgoaheadandleaveitatthat.
Now, ifanyofthiswasconfusingandyou'relost, rewatchedthevideoanddothismultipletimesbecausehaving a basicunderstandingofstarting a newprojectinstallingit, you'regonnaprobablydothisfairlyoften.
However, I willsayforthisentireseries, I wouldrecommendtheyuse a virtualenvironmentjusttogetusedtoit, justtogetusedtohowWebdevelopersoftenusethedevelopmentenvironmentforDjango.
Nowit's timetocreate a Djangoproject.
See, I'vegotmybrandnewcleanterminalwindowopenbecause I wanttogetinthehabitofknowinghowtoreactivate a virtualenvironment.
So I comeinhereand a CDintomydeathfolder, where I'm holdingeverything I see d intomytryJinglefolder, wheremyvirtualenvironmentrouteis.
What I wanttodoisstartworkingwithsomesortoftexteditorsomewherethat I canwritethecodethatisnotnecessarilyinsideoftheterminalbecausethatgetssupertediousforespeciallyforbeginners.
Middleware, thisis I mean, there's a lotofthingsgoingonhere, butithastodowithyourrequestsandhowrequestsarehandledandalsohowsecuritieshandledandstufflikethat.
There's somethingwillgooverlater.
It's definitelyMaurovenadvancedtopic, butit's nicebecauseitallowsustoknowthatthere's a lotofsecurityfeaturesbuiltin, aswecanseewithsomeoftheonesthatarealreadythereroute.
You'reElleCom.
Thisissomethingwilldefinitelycoverforsureto.
ThisishowDjangoknowshowtorouteanygivenyour l youknow, So, like, myserverisrunningrightnow, Soif I take a lookatthatrunningserver, if I gotoslashyouknow, whateverthisisyou'reelselikeSothosethingsareautomaticallyroutedbydefaultbyDjango.
Somethingthat's reallycoolis a builtinfeatureinthere.
Thenextthingistemplates.
Uh, youknow, likeJingorendersouthtmltemplates.
We'regonnagooverthis a lot, butbasically, likewheretorestorethem.
Wehavefourfieldsthatarerequiredso I canpassthosefourfieldsinhereastitlenewproductstowriteanddescriptionasanotheronerightpricebeing, youknow, whateverprice.
Andthenfinally, summarybeingsweet.
Okay, noticeeachone.
Eachargumentinhereis a stringitself.
Right?
So I didthatonpurpose.
They'reallstringsondhe.
That's how I cancreate a newproductahead.
Enteritcreatesit.
I couldpressupandenteragain.
It's creatingnew A newproducts, right?
Andif I didthatproductdotobjectsthatallagain, what I seehereis a listalsoknownasquerysetagain.
We'llgetintothatlater, butitshowsusallofthosenewproductscreatednow, assumingwestillhaveourserverrunning, which I do, youcancloseitoutwithcontrol.
See?
Butif I justgoaheadandmakesurethatmyserversrunning, I cancomebackintomyadmin.