views:

278

answers:

2

I'm using django and when users go to www.website.com/ I want to point them to the index view.

Right now I'm doing this:

(r'^$', 'ideas.idea.views.index'),

However, it's not working. I'm assuming my regular expression is wrong. Can anyone help me out? I've looked at python regular expressions but they didn't help me.

+2  A: 

What you have should work (it does for me). Make sure it's in the top urls.py, and it should also be at the top of the list.

Harley
I moved it up and now it works. Thanks.
rksprst
A: 

Is there any way you can just use a generic view and go straight to template for your index page?:

urlpatterns += patterns('django.views.generic.simple',
    (r'', 'direct_to_template', {'template': 'index.html'}),
)