djschemadiff - show differences between Django database schemas

5 views
Skip to first unread message

Sam Morris

unread,
Mar 20, 2007, 9:08:48 PM3/20/07
to django...@googlegroups.com
Tired of manually updating your database schema after changing your
model classes? So was I! I wrote a tool called djschemadiff to
automatically compare your database's current schema to the schema that
would be produced if you started with a fresh, empty database and then
ran syncdb.

Currently it works with PostgreSQL 8.1, but shouldn't be too hard to
extend to work with other database systems.

djschemadiff can be downloaded from
<http://robots.org.uk/src/djschemadiff/>. Feel free to send me any
comments, flames or patches!

--
Sam Morris
http://robots.org.uk/

PGP key id 1024D/5EA01078
3412 EA18 1277 354B 991B C869 B219 7FDB 5EA0 1078

signature.asc

mojo

unread,
Apr 19, 2007, 10:47:56 AM4/19/07
to django...@googlegroups.com
Hi.

I think this might be a bug. Unexpected behaviour at least.
When I delete default Site object ('example.com'), generic login view raises
exception, as it is looking for Site with pk=1.

Michael K

unread,
Apr 19, 2007, 11:02:07 AM4/19/07
to Django users

Hello!

I'm still a little new, but I believe the generic views for auth rely
upon the sites module to work. I've always just renamed the default
Site, and things Just Work. Adrian or Jacob might be able to answer
this better than I?

--
Michael

James Bennett

unread,
Apr 19, 2007, 11:05:11 AM4/19/07
to django...@googlegroups.com

We really need to document this a little better; if you delete that
Site object, you'll have to create a new one and change the SITE_ID
setting in your settings file to match the id of that new object,
because lots of things use that to look up site-specific content.

The preferred method is simply to edit the default Site object to have
the correct domain name.

--
"Bureaucrat Conrad, you are technically correct -- the best kind of correct."

mojo

unread,
Apr 19, 2007, 11:19:45 AM4/19/07
to django...@googlegroups.com
I see now. Thank you.
I just hoped that I found a bug.

Rob J Goedman

unread,
Apr 19, 2007, 11:31:26 AM4/19/07
to django...@googlegroups.com
Thanks a lot, this answers my question from a couple of days as well!
It works again!

Rob


On Apr 19, 2007, at 8:05 AM, James Bennett wrote:


On 4/19/07, mojo <mojo...@gmail.com> wrote:
I think this might be a bug. Unexpected behaviour at least.
When I delete default Site object ('example.com'), generic login view raises
exception, as it is looking for Site with pk=1.

We really need to document this a little better; if you delete that
Site object, you'll have to create a new one and change the SITE_ID
setting in your settings file to match the id of that new object,
because lots of things use that to look up site-specific content.

The preferred method is simply to edit the default Site object to have
the correct domain name.


On Apr 17, 2007, at 10:27 AM, Rob J Goedman wrote:
Hi,

In Django version 0.97-pre, rev 5020, I'm adding additional views for end users, all decorated with @login_required.

I noticed if I'm not already logged in (by 1st visiting .../admin/), I get  below error (reproduced in a python terminal, same problem as in a browser - [17/Apr/2007 10:22:43] "GET /accounts/login/?next=/GUI/start/ HTTP/1.1" 500 51242 gives:

DoesNotExist at /accounts/login/

Site matching query does not exist.

Request Method:
GET
Request URL:
Exception Type:
DoesNotExist
Exception Value:
Site matching query does not exist.
Exception Location:
/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/django/db/models/query.py in get, line 252

).



Reply all
Reply to author
Forward
0 new messages