I've been trying to make a simple app in Django for a while now and I noticed the following behaviours:
Everytime I make changes to urls.py in my project folder, changes are not reflected until I restart http daemon. Why? Is there any way I can do without this?
I tried to redirecting r'^staff/$' to staff.views.index (staff is my app name). But accessing /staff gave me a "Server Error", which on inspection of error_log showed "TemplateSyntaxError: Caught ImportError while rendering: No module named staff". What does this mean?
On removing that particular line from urls.py (and restarting httpd), accessing / reverted back to "It works" page. But, when I refresh the page after clearing all browsing data (including cache), I magically get back the page saying
Using the URLconf defined in myproj.urls, Django tried these URL patterns, in this order: ^staff/$ The current URL, , didn't match any of these.
This really puzzles me; how could it have possibly come back? I've tried to understand what's going on, but sadly, I've failed. At this rate, I might just go back to cakephp. I don't want to go back, help!
I run Apache with mod_wsgi on Arch Linux. myproj is my project name (located at /srv/http-django) and it has one app called staff (added to INSTALLED_APPS). My WSGI script adds /srv/http-django to sys.path and sets DJANGO_SETTINGS_MODULE to myproj.settings.
myproj/staff/views.py contains index function which simply returns "Hello, World!" as HttpResponse