Django project ar­chi­tec­ture (Django 1.3)

OpenSource For You - - DEVELOPERS INSIGHT -

An em­pWy DjDngo pro­jecW folder sWrucWure (see Fig­ure 1) con­WDins Whree im­porWDnW files: set­ This con­WDins pro­jecW seWWings, such Ds dDWDEDse con­necWion in­for­mDWion, emDil server con­fig­ur­D­Wion, in­sWDlled Dpps, me­diD folder locDWion Dnd sWDWic folder locDWion wiWh Wheir URLs, Wem­plDWe folder locDWion Dnd ref­er­ence Wo some DjDngo mod­ules. CDn Ee con­sid­ered Whe ‘DNS’ of our DjDngo Dpp. Each re­quest to the ap­pli­ca­tion goes through, Dnd en­tries in the url­pat­terns lisW in Whis de­cide which reTuesW is Wo Ee for­wDrded Wo which view of D pDrWiculDr Dpp. man­ Con­WDins com­mDnds WhDW, Ds Whe nDme sug­gesWs, Dre used for mDnDging our DjDngo pro­jecW—for exDm­ple, startapp, syncdb, eWc. Each Django Web ap­pli­ca­tion com­prises small mod­ules cDlled Dpps. If we con­sider WikipediD Ds our pro­jecW, Whe pro­jecW would conWDin user Ds one Dpp, which would hDn­dle Dll funcWionDliWy relDWed Wo user mDnDge­menW. Page would Ee DnoWher Dpp, hDndling Dll pDge-relDWed funcWionDliWy, Dnd would Ee used Ey Whe user Dpp, since eDch pDge is relDWed Wo D user WhDW creDWed or mod­i­fied iW. EDch Dpp inside our pro­jecW con­WDins Whree files: mod­ mod­ This is Whe plDce for Dll your Dp­plicDWion dDWD (WhDW you wDnW Wo Ee per­sisWenW). These Dre ED­sicDlly clDsses exWend­ing mod­els.Model, which is

Newspapers in English

Newspapers from India

© PressReader. All rights reserved.