Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm trying to use django-reversion (http://code.google.com/p/django-reversion/) on one of my projects, but it won't work on the project that's running on Apache. It works perfectly fine with a project running on the Django development server, but once I try to use it with the project that's running on Apache, I can access the admin page but I can't access individual model admin pages (I get a 500 error). Anyone have any ideas and/or suggestions?

share|improve this question
    
Anything in Apache's error log? –  Sam Halicke Oct 26 '09 at 18:29
    
Yeah, a bunch of "TemplateDoesNotExist: 500.html" errors, but I don't see the name of the template it's trying to use anywhere. I'm assuming it's one of the reversion templates, but I tried putting them in all sorts of directories and nothing seemed to work. –  shawn Oct 26 '09 at 18:40
    
I just realized that error is probably saying that I have no 500 template in place, unfortunately that's even less information than Apache saying it can't find the reversion templates. –  shawn Oct 26 '09 at 18:42
    
Can you set DEBUG = True in your settings.py? This should get Django to dump you a Traceback when it fails –  Charles Hooper Oct 26 '09 at 19:13
    
Okay, I set DEBUG = True and got: Exception Type: NoReverseMatch Exception Value: 'admin' is not a registered namespace –  shawn Oct 26 '09 at 19:21

2 Answers 2

up vote 2 down vote accepted

I've been emailing back and forth with the project owner of django-reversion and after a bunch of troubleshooting he came to a conclusion - my URLconf was using (r'^admin/(.*)', admin.site.root) which is apparently deprecated, so I changed that to (r'^admin/', include(admin.site.urls)) and now it works.

share|improve this answer
    
I had the same glitch and this fix worked for me as well. Django 1.1.1, django-reversion 1.2.1. –  Ryan Townshend Apr 12 '10 at 15:03

If you're using SQLite, does the apache user (or www-data or whatever it is on your system) have permissions to read/write your database?

share|improve this answer
    
Sorry, should have clarified that I'm using MySQL. And I'm pretty sure the Apache user doesn't have permissions to read/write to the database. Should I give the Apache user permissions? –  shawn Oct 26 '09 at 18:24
    
If you're using MySQL then it'll just use the database user configured in your settings.py, so there shouldn't be a change from the dev server to apache –  Charles Hooper Oct 26 '09 at 19:11

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.