views:

116

answers:

2

I've been having a look at Django and, from what I've seen, it's pretty darn fantastic. I'm a little confused, however, how I go about implementing a "home page" for my website? Would it be a separate app, or just a view within the project, or what?

A: 

The easiest way is using Django's "Flatpages". See this link for more info: http://docs.djangoproject.com/en/dev/ref/contrib/flatpages/

Anthony Lewis
Flatpages works as advertised, but I've found that I almost never have a use for static content. For instance a home page will often need to display 'top ten posts' or different inserts based on user preferences.
TokenMacGuy
+4  A: 

There's no real rule for this, But one thing I like to do is actually arrange for the index access to redirect to another spot. If you prefer, though, you can just give the index page a plain view.

That said, It's probably a good idea to keep all your code in an actual app, so that you can refactor it more easily, and so that it appears on the python path as a normal module. Putting views in the project rather than an app seems to cause more headaches than it solves.

TokenMacGuy