meder omuraliev
meder omuraliev

Reputation: 186582

How should I setup my homepage in django?

I'm not familiar with django conventions at all so if you do provide advice could you be specific

Considering my homepage would contain components of articles:

https://i.sstatic.net/TTLh2.gif

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?

Upvotes: 0

Views: 939

Answers (1)

Ignacio Vazquez-Abrams
Ignacio Vazquez-Abrams

Reputation: 798794

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.

Upvotes: 2

Related Questions