On Wed, Oct 05, 2011 at 04:35:49PM -0400, Peter Herndon wrote: > > On Oct 5, 2011, at 3:55 PM, Chris G wrote: > > > > However two rather basic things still elude me:- > > > > Where/how do I actually start creating the top level/page of a web > > site? Do I just open vi and create some HTML and embed django > > code? That seems unlikely but I can't see anywhere that tells me > > what the code that creates a django site looks like and/or where it > > resides. An actual example of a two or three page working django > > based web site would be a huge help. > > I've seen a few different patterns in regards to this question. One scenario > is where you have a multi-purpose Django site comprised of multiple reusable > apps with no obvious top-level entry point, you can create a view "def > index(request)", and have it render a template with whatever data you want to > send it -- including perhaps no data at all. Then map your index view to '/' > in urls.py at the project level, put together a template and you're all set. > > Another option I've seen is if you have a single-purpose site where one app > is primary, you map your primary app's start page as your index. An example > would be a blog, and you would set up your chronological entries list page as > the index. > OK, so there isn't a single simple answer. However it would still be really nice to see a complete two or three page django site with a database behind it fully implemented as an example.
> > > > > I can't see anywhere that seems to tell me the issues involved with > > moving from using the built in web server to using apache2 (or > > whatever, I have apache2 on my system). > > The short version is that the built-in server was built as a > just-good-enough-to-use-while-developing solution, and is not sufficient to > handle more than a minimal load. The trade-off is that configuring apache2 + > mod_wsgi, or nginx + gunicorn, is more complex than just running the > devserver. > Sorry, I maybe didn't explain well what I wanted. I realise that configuring apache2 to do all this involves more work, what I wanted was the steps required to go from a working django project under the built-in server to one that works under apache2. Someone else has pointed me at https://docs.djangoproject.com/en/1.3/howto/deployment/modwsgi/ though which seems to be what I need. -- Chris Green -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.