urls.py changes ignored

37 views
Skip to first unread message

Rock

unread,
Mar 30, 2006, 11:13:31 AM3/30/06
to Django users

I have a development site where I can update myproject.urls.py and the
changes are acted upon immediately by my server. I just cloned this
site onto another computer and everything seems to be in order except
that on this new system, changes to urls.py are entirely ignored.
Nothing I do seems to be able to convince the system that I have
changed the urls.py file.

Both systems are running with Apache2 and mod_python on Linux.

Things I have tried:

Adding NO_CACHE = True to settings.py.

touch myproject/urls.py

checked the permissions of myproject/urls.py

Even removing myproject/urls.py makes no difference in the operation of
the clone system.

I am using 0.91 for this project.

What else should I be looking at?

James Bennett

unread,
Mar 30, 2006, 12:22:16 PM3/30/06
to django...@googlegroups.com
On 3/30/06, Rock <ro...@rockhoward.com> wrote:
> What else should I be looking at?

Did you nuke urls.pyc?
--
"May the forces of evil become confused on the way to your house."
-- George Carlin

Rock

unread,
Mar 30, 2006, 12:35:10 PM3/30/06
to Django users
Yes I did. No help.

Then I forced the creation of a new urls.pyc by importing urls.py in
"python manage.py shell" and importing urls.py and explicitly checking
that the correct number of urlpatterns were defined. Still no joy in
the browser though.

Note that the access_log shows my request but the error_log logs no
associated errors.

Don Arbow

unread,
Mar 30, 2006, 1:09:13 PM3/30/06
to django...@googlegroups.com

How about you post your urls.py, we could take a look at it and maybe
find the error?

Don


medhat

unread,
Mar 30, 2006, 1:10:18 PM3/30/06
to Django users

If you are using Apache with mod_python you will need to restart the
webserver.

--
Medhat Assaad

Rock

unread,
Mar 30, 2006, 2:20:57 PM3/30/06
to Django users
On my development machine I do not have to restart the webserver to
have the changes enforced.

In any event, I have tried restarting the webserver and also dumping
the cache in my browsers without effect.

There is no reason to suspect an error with the cloned urls.py file as
it is an exact copy of the version on the development machine.

Another thing that I have checked is the timezone and tod settings on
the two machines and the timezone setting in the settings.py file.

I am going to take a deeper dive into the http configurations now.

Rock

Rock

unread,
Mar 30, 2006, 3:02:11 PM3/30/06
to Django users
I found a tiny difference in the http.conf files (AllowOveride was set
to "FileInfo" instead of "None".) I made that change, even though I
seriously doubted that it would make a difference. Then I bounced
apache and amazingly enough the new urls.py showed up.

I set the AllowOverride setting back to FileInfo and changed the
urls.py again and so forth and proved to myself that the AllowOveride
setting had nothing to do with anythng. It was all about the bounce.
(Apparently I thought I had bounced the server previously, but had not.
Perhaps I was not su when I did the previous bounces.)

So now I can force the urls.py changes to be respected by bouncing the
server. (Whew!) But that still begs the question -- why is my
development server picking up urls.py changes right away while my clone
machine requires a server bounce. Hmmm.

Reply all
Reply to author
Forward
0 new messages