new to django - just need pages

29 views
Skip to first unread message

Claire Watkins

unread,
May 9, 2012, 6:44:15 AM5/9/12
to Django users
Hi,

I'm new to django, python etc so i've ran through the django tutorial
and it seemed to make sense.
I'm on creating my first website and i've managed to create a project
and get the admin site up and running. Now all i need to do is create
3 pages "Home", "About", and "Maps". I downloaded the django-pages-cms
but i don't seem to be getting anywhere with that.

Basically i need to configure my url's so that i can place home.html
or index.html into the site. I can't seem to do this and i've spent so
many hours looking at the settings.py, urls.py. I think i need to do
something with the template_dirs and the url patterns but... i'm just
stuck!

Any help would be appreciated!

Thanks,

Claire
Message has been deleted

Timothy Makobu

unread,
May 9, 2012, 8:02:04 AM5/9/12
to django...@googlegroups.com
Hi Claire,

A good foundation in Python is needed. First read all of this  http://docs.python.org/tutorial/  then all four of these https://docs.djangoproject.com/en/1.4/intro/tutorial01/ then this  http://www.djangobook.com/en/2.0/  (its old, but it works).



On Wed, May 9, 2012 at 2:50 PM, Ivo Marcelo Leonardi Zaniolo <imarc...@gmail.com> wrote:
Hi Claire,

You can configure the website urls like that:

from django.conf.urls.defaults import patterns, include, url
from django.views.generic.simple import direct_to_template

urlpatterns = patterns('',
                       
    url(r'^$', direct_to_template, { 'template' : 'home.html'}, name='about'),
)

Those URL conf will render the "home.html" template when you that url "/".
To test it you run manage.py runserver then, open on your browser "http://localhost/8000"


Um Abraço!
Ivo Marcelo Leonardi Zaniolo



2012/5/9 Claire Watkins <m4clair...@gmail.com>

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django...@googlegroups.com.
To unsubscribe from this group, send email to django-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.


--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django...@googlegroups.com.
To unsubscribe from this group, send email to django-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

Reply all
Reply to author
Forward
0 new messages