Hey, I'm new to django, so please excuse me for asking simple questions for a bit.
I've installed django and have followed through a few of the simpler tutorials and have decided it's time to brave the world by myself...and have fallen at the first hurdle. I have a website with a urls.py and a views.py file in my django root, these work fine and I've added some stuff to both files and they work great: from django.conf.urls.defaults import * from zombie_django.views import hello, current_datetime, hours_ahead, mainpage urlpatterns = patterns('', (r'^hello/$', hello), (r'^time/$', current_datetime), (r'^time/plus/(\d{1,2})/$', hours_ahead), (r'^$', mainpage), ) (imagine the views.py works fine - it's not relevant here) but, I want to make a new directory on the server and create a small application with all the file residing in that folder. so I created the folder zombie_django/battleships and put a new views.py inside with a method of main which just returns some text atm. My problem is that I'm not sure how to reference that views.py file from the urls.py. I've tried adding these lines to the relevant places to no avail: from zombie_django.battleships.views import main (r'^battleships$',main), and I've tried with (r'^battleships$', battleships.main), but still no luck. I'm sure it's an easy one, but I'm stuck. Can you help? Is there somewhere on the internet I can read up about this? I've looked but can't find anything which looks right. Thanks for your help, Martyn -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@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.