On Feb 19, 1:52 pm, "Honza Král" <[EMAIL PROTECTED]> wrote: > On 2/19/07, kbochert <[EMAIL PROTECTED]> wrote: > > > > > > > On Feb 19, 1:25 pm, "Honza Kr?l" <[EMAIL PROTECTED]> wrote: > > > On 2/19/07, kbochert <[EMAIL PROTECTED]> wrote: > > > > > On Feb 19, 12:46 pm, "Honza Kr?l" <[EMAIL PROTECTED]> wrote: > > > > > > what exactly are you doing? > > > > > this approach works perfectly for me... > > > > > I put the mentioned sql in a file in my Djano installation django/ > > > > contrib/auth/sql/users.sql > > > > exactly please, I would like to see the insert statement > > > BEGIN; > > INSERT INTO "auth_user" ('username', 'email', 'password') VALUES > > ('admin', '[EMAIL PROTECTED]', 'sha1$b0461$2ed273ea30cf73581'); #'admin' > > COMMIT; > > > BEGIN; > > INSERT INTO "auth_user" ('is_staff', 'is_active', 'is_superuser') > > VALUES > > ('True', 'True', 'True'); > > COMMIT; > > OK, please do the following things: > > 1) with a working DB (after syncdb, no matter about the missing user), > do ./manage.py dbshell manage.py dbshell OSError: [Errno 2] No such file or directory > and try to run these inserts... > 2) after you get them to work (unquote column names, add missing > columns and values), put them back into the file without the BEGIN and > END command > 3) run ./manage.py shell > 4) write > import os > from django.db import models > > os.path.normpath(os.path.join(os.path.dirname(models.get_app('auth').__file__), > 'sql')) > --> "site_packages > that is the directory where the file should be > C:\Python25\lib\site_packages................/auth/sql (Someone ought to put that Python directory structure out of its misery) I had the sql file elsewhere. I put it there and got the same behavior except after answering 'no' to syncdb's 'create one now' message, I got sqlite3.OperationalError: SQL logic error or missing database' I went to the sql file and removed the "BEGIN:" and "COMMIT" lines. The sqlite3 error went away but still no superuser created. > > > Karl > > -- > Honza Kr?l > E-Mail: [EMAIL PROTECTED] > ICQ#: 107471613 > Phone: +420 606 678585 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---