Forums

500 error after django auth new group creation

Hello, this morning I created a new user and a new group for my django project in the admin, then I logged out and I got a server error (500). Now I'm not able to login to the admin anymore. why is it happen? Is it possible to login to the database from a software like "Sequel pro" to see if there are mistakes in the database?

Did you bounce your app after the changes?


Reload from the Web tab


You can access the database from the "Databases" tab on your dashboard; just click on the database name and you'll get a MySQL console. The error on your admin page says Site matching query does not exist - perhaps you deleted one accidentally?

I've just created a new user and a new group, after that I assigned the user to that group. After I edited the group adding a space in the name. saved and I got doesn't exist message..

That's very strange. I think the easiest fix is going to be to add a site object. Create a bash shell, go to your Django app's directory, then run python manage.py shell to get a Django admin shell, the follow the instructions in this Stack Overflow post

I followed those steps but the message is still there.. very strange.. any ideas?

I found it happens at logout.. I dropped the database, I created a new database and syncdb. After that I logged in to the admin, went to Sites and changed "example.com" in "avafab.pythonanywhere.com", saved, logged out and... I got "Site matching query does not exist." again..

Are you using the Django Sites framework at all? If not, the simplest thing might just be to remove it from your INSTALLED_APPS and reload the web app.