Question

Morning all - I've got an issue I didn't encounter with previous Django apps I've deployed. I have a working application that only uses the admin app and a custom management command for automated email reminders.

This app worked fine on my development machine, with a working admin interface and working custom management command. I copied the entire project directory from the dev machine to the server, and all I get is the generic "It worked!" page I'd expect from a brand new project.

I find this rather odd, as the project was copied verbatim from a working installation to a location with the exact path name. Anyone have an idea?

Edit: As noted in comments below, I found the issue to be the compiled .pyc files I had copied over along with my project code. I don't know enough about Python to understand why the .pyc files would not be portable. Deleting all .pyc files prior to copying over the project, and then running syncdb solved the issue.

Was it helpful?

Solution

Make sure you have a url map for the ^$ pattern (which is basically an empty URL). This is what is loaded when you simply type the URL without a path component.

example.com = ^$

example.com/ = ^/$, although the APPEND_SLASH setting helps with this (its on by default).

If you turn off DEBUG - which you should do in production - you will no longer see that page. Make you have to provide a 404.html and 500.html template for the respective error conditions.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top