开发者

How should I setup my homepage in django?

开发者 https://www.devze.com 2022-12-19 03:08 出处:网络
I\'m not familiar with django conventions at all so if you do provide advice could开发者_JAVA百科 you be specific

I'm not familiar with django conventions at all so if you do provide advice could开发者_JAVA百科 you be specific

Considering my homepage would contain components of articles:

How should I setup my homepage in django?

In Zend, in my IndexController I would create models and populate the view with articles and data. What's a convention/structure I could use for the homepage view ( should I create a separate directory for home, dump a view.html file in it? or do I create a sub-application? ), how would you set your django structure up to accommodate this?


The basic component of a Django project is the application. Each app contains models, views, templates, template tags, and filters relevant to its portion of the project. The index view imports/uses resources from other apps to get its work done. Think of the homepage as parts brought into a whole, and put each independent part in its own application.

0

精彩评论

暂无评论...
验证码 换一张
取 消