dumpdata with custom auth model

250 views
Skip to first unread message

Christian Jensen

unread,
Nov 9, 2012, 2:57:37 PM11/9/12
to django-d...@googlegroups.com
Hi,

Has anyone run into an issue where dumpdata refers to the old auth model and tries to dump its data?

Here is what I am encountering:

DEBUG 2012-11-09 11:49:46,363 util 8457 140488053692160 (0.002) SELECT "auth_user"."id", "auth_user"."password", "auth_user"."last_login", "auth_user"."username", "auth_user"."first_name", "auth_user"."last_name", "auth_user"."email", "auth_user"."is_staff", "auth_user"."is_active", "auth_user"."is_superuser", "auth_user"."date_joined" FROM "auth_user" ORDER BY "auth_user"."id" ASC; args=()

CommandError: Unable to serialize database: relation "auth_user" does not exist
LINE 1: ...r"."is_superuser", "auth_user"."date_joined" FROM "auth_user...



--

Christian Jensen
724 Ioco Rd
Port Moody, BC V3H 2W8
+1 (778) 996-4283

chri...@jensenbox.com


Russell Keith-Magee

unread,
Nov 9, 2012, 7:02:42 PM11/9/12
to django-d...@googlegroups.com
On Sat, Nov 10, 2012 at 3:57 AM, Christian Jensen <chri...@jensenbox.com> wrote:
Hi,

Has anyone run into an issue where dumpdata refers to the old auth model and tries to dump its data?

Here is what I am encountering:

DEBUG 2012-11-09 11:49:46,363 util 8457 140488053692160 (0.002) SELECT "auth_user"."id", "auth_user"."password", "auth_user"."last_login", "auth_user"."username", "auth_user"."first_name", "auth_user"."last_name", "auth_user"."email", "auth_user"."is_staff", "auth_user"."is_active", "auth_user"."is_superuser", "auth_user"."date_joined" FROM "auth_user" ORDER BY "auth_user"."id" ASC; args=()

CommandError: Unable to serialize database: relation "auth_user" does not exist
LINE 1: ...r"."is_superuser", "auth_user"."date_joined" FROM "auth_user...


Short answer -- no, I haven't run into this problem.

I've tried running dump data with a custom User model, and it worked for me; can you provide a minimal project setup to reproduce this problem?

Yours,
Russ Magee %-)

 

Russell Keith-Magee

unread,
Nov 24, 2012, 1:43:51 AM11/24/12
to django-d...@googlegroups.com
Hi Benoit,

Like I said in my last response, I'm *not* seeing the problem. Saying "I'm seeing the problem" doesn't help me. Saying "I've got a custom User" doesn't help me either -- I've got a custom User (several, actually - a test case extending AbstractUser and one extending AbstractBaseUser, plus a of live projects using custom user models), and dumpdata is working fine for me on all of them.

What I need is a complete project that demonstrates the problem -- the minimal set of instructions necessary to reproduce the problem you are seeing.

I also need you to tell me what version of trunk you're using. Django 1.5 hasn't been released yet, so the problem is with a specific revision, not with a final release, and since the branch is under constant development, the *exact* revision matters.

Yours,
Russ Magee %-)

On Fri, Nov 23, 2012 at 5:33 PM, Benoit Petit <benoit.p...@gmail.com> wrote:
I have the same issue with django 1.5. I have a custom User model that extends AbstractUser.

Regards

--
You received this message because you are subscribed to the Google Groups "Django developers" group.
To view this discussion on the web visit https://groups.google.com/d/msg/django-developers/-/VFhbHqt6P4cJ.

To post to this group, send email to django-d...@googlegroups.com.
To unsubscribe from this group, send email to django-develop...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-developers?hl=en.

Bruno Renié

unread,
Nov 24, 2012, 8:22:14 AM11/24/12
to django-d...@googlegroups.com
Hello,

On Sat, Nov 24, 2012 at 7:43 AM, Russell Keith-Magee
<rus...@keith-magee.com> wrote:
> Hi Benoit,
>
> Like I said in my last response, I'm *not* seeing the problem. Saying "I'm
> seeing the problem" doesn't help me. Saying "I've got a custom User" doesn't
> help me either -- I've got a custom User (several, actually - a test case
> extending AbstractUser and one extending AbstractBaseUser, plus a of live
> projects using custom user models), and dumpdata is working fine for me on
> all of them.
>
> What I need is a complete project that demonstrates the problem -- the
> minimal set of instructions necessary to reproduce the problem you are
> seeing.
>
> I also need you to tell me what version of trunk you're using. Django 1.5
> hasn't been released yet, so the problem is with a specific revision, not
> with a final release, and since the branch is under constant development,
> the *exact* revision matters.

Out of curiosity I ran 'dumpdata auth' on one of our projects that
uses the 1.5 branch and got the same error. I tried to reproduce it
and it turns out this was fixed very recently, in c8985a8a73 [0].

With Django installed using
https://github.com/django/django/tarball/0a0a0d66b3 -> error on
'manage.py dumpdata auth'

With Django installed using
https://github.com/django/django/tarball/c8985a8a73 -> no error.

Christian, Benoit: could you try again using a recent tarball of the 1.5 branch?

Russel: thanks for your work on this feature, which is already proving
very useful for us :)

Regards,
Bruno

[0] https://github.com/django/django/commit/c8985a8a73
Reply all
Reply to author
Forward
0 new messages