Home Page

57 views
Skip to first unread message

Malik Rumi

unread,
Feb 23, 2016, 7:59:05 AM2/23/16
to Django users
Why is there so little information in the docs about how to build a home page, where to put the url, whether or not to build a separate app around it, why or why not to put it in the folder with settings in it, and how to handle a complex home page with a lot of changing content - like on a newspaper, where Django was created? 

And second, where (other than trial and error) do I find that kind of documentation / support?

Sithembewena Lloyd Dube

unread,
Feb 23, 2016, 8:31:24 AM2/23/16
to django...@googlegroups.com
Have you done the tutorial? Django is suitable for everything you listed, it's just that you need to learn how to implement those things in Django. This means you need to know how to use Django.

I suggest you do the tutorial first.

On Tue, Feb 23, 2016 at 2:59 PM, Malik Rumi <malik....@gmail.com> wrote:
Why is there so little information in the docs about how to build a home page, where to put the url, whether or not to build a separate app around it, why or why not to put it in the folder with settings in it, and how to handle a complex home page with a lot of changing content - like on a newspaper, where Django was created? 

And second, where (other than trial and error) do I find that kind of documentation / support?

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/82af7d52-2db2-449e-9f29-cb2f2b29e51d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Regards,
Sithembewena

jorr...@gmail.com

unread,
Feb 23, 2016, 10:05:03 AM2/23/16
to Django users
I struggled with this as well. I usually end up creating a 'common' app for my homepage and project-wide templates and static files, but I don't know if that's considered a best practice. Alternatively you could put your homepage in your most used/most important app.

Bob Gailer

unread,
Feb 23, 2016, 10:40:17 AM2/23/16
to Django users


On Feb 23, 2016 7:59 AM, "Malik Rumi" <malik....@gmail.com> wrote:
>
> Why is there so little information in the docs

Documentation evolves. User input helps that process. Perhaps you can make a contribution as you learn.

about how to build a home page

I'm not sure what you're looking for here. Designing a home page is not a django topic. Using django to deliver a homepage is the same as delivering any other page

where to put the url

I don't understand  what you mean by that. please explain

whether or not to build a separate app around it, or why not to put it in the folder with settings in it,

If your home page is a portal to several apps then it seems to me you would have an app for the home page

And how to handle a complex home page with a lot of changing content - like on a newspaper, where Django was created? 

Seems to me that's not a django issue.


>
> And second, where (other than trial and error) do I find that kind of documentation / support?

Google CMS?

Malik Rumi

unread,
Feb 24, 2016, 2:58:24 PM2/24/16
to django...@googlegroups.com
I'm not sure what you're looking for here. Designing a home page is not a django topic. Using django to deliver a homepage is the same as delivering any other page

Please don't take offense, Bob, I appreciate you taking the time to respond. I could not disagree with you more. Every web site has a home page. And by definition, a home page is DIFFERENT from all other pages. But the docs say nothing about any of that. Search them for 'home page' and see what you get. Django sets you up with a series of apps which, taken together, form your project. But in which of these apps does the home page go? Does it matter? Why or why not? Should you make a separate app for the home page? If so, why don't they tell us to put it in the app that is created with startproject? 

>> where to put the url

>I don't understand  what you mean by that. please explain

I know that the url is r'^$. But if I knew what app to put it in, then I would know where to put this home page url. But what if the views and templates related to your home and other static pages (like About Us) have nothing to do with the views and templates of the rest of you project - aside, maybe, from the very basic common html?

This is why people like jorrit787 and I struggle with the home page in Django, and why we would like a little guidance and some wisdom about best practices. 

>>And how to handle a complex home page with a lot of changing content - like on a newspaper, where Django was created? 

>Seems to me that's not a django issue.

Again, with all due respect, I disagree. Why do we have filters like truncate? Isn't that so you can put a teaser on the home page and then link it to somewhere deeper in your site? Don't a lot of non-blog sites also have rapidly changing content? Member sites, fan sites, etc? Of course we can put an article on the home page, and the next day swap it out for a new one, but that's the most obvious way to do it. Is there a better way? What is the technology, coding, views, template set up and admin that best accommodate that kind of site? But we get no guidance on these things. And even if you think this is for designers and not developers, you have to remember that a lot of us are doing both, and even if we aren't, the designers and owners are going to ask us to put this together for them, aren't they?

To the uninitiated, these are not small questions. And when you then try to configure your urls, it becomes an even bigger problem. And I think that the fact that you and other more experienced Django users don't see this as a problem is itself a problem. 

> And second, where (other than trial and error) do I find that kind of documentation / support?

Trust me, I've googled this plenty, and the pickings are slim. 

--
You received this message because you are subscribed to a topic in the Google Groups "Django users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/django-users/EMtRahO3EYI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to django-users...@googlegroups.com.

To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.

Rafael E. Ferrero

unread,
Feb 24, 2016, 3:30:25 PM2/24/16
to django...@googlegroups.com
Malik, this is an example of a homepage in a site already in production. Look this site www.python.org.ar, this homepage have the urls.py in this github repository in line 32. You can find the view here in line 16

Hope you can find them useful to learn.

Regards!!



Rafael E. Ferrero

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.

To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.

Andreas Kuhne

unread,
Feb 24, 2016, 4:41:51 PM2/24/16
to django...@googlegroups.com
Malik,

I find that in many of your questions you are thinking a bit too hard.

If you want to have a view for the default page (home page) on a website, just create an app that will handle those pages. In one project that I am currently working on, we created an app called website. In that app we have the default page and a lot of the static pages that we have. We also put the base.html template that we use as a base for all of our HTML pages. What you choose to call the app is up to you. All you have to do is add an app that will have the default page url in it.

Regarding serving complex home pages with a lot of changing content, that is also a design issue. Your other question regarding filling the context before redering the template is realy about the same thing. You put in the data that you want to render on the template and you do that in a view. It doesn't matter if that view is the default page or a poll list (like the example at https://docs.djangoproject.com/en/1.9/intro/tutorial03/) - you fill the context with the information you need (from your database, from another webserver) and you render it in the template. That way you can create as dynamic pages as you like.

Regards,

Andréas

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.

To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.

Malik Rumi

unread,
Feb 25, 2016, 9:25:21 AM2/25/16
to django...@googlegroups.com
I find that in many of your questions you are thinking a bit too hard.
I have been accused of that before, so there's probably something to it. What to do about it is another question. 

Reply all
Reply to author
Forward
0 new messages