hmm..
have you 'init'ed  your database ? ( $ django-admin.py init)

also.. check out http://www.djangoproject.com/documentation/authentication/
and more specifically the get_profile() call.

regards
Ian

On 12/31/05, Andreas Neumeier <[EMAIL PROTECTED]> wrote:
>
> Hello Django Users,
>
> I try to have some additional data per user, like DOB, a picture,
> gender, stuff...
>
> My thought was to have a OneToOneField in one of my selfdefined models
> like that:
>
> --- cut ---
> from django.core import meta
> from django.models.auth import User
>
> class Member(meta.Model):
>   uid = meta.OneToOneField(User)
>   gender = meta.CharField(maxlength=1, choices=GENDER_CHOICES)
>   dob = meta.DateField()
>   desc = meta.TextField()
>   [etc.pp.]
> --- cut ---
>
> When I try to install that, everything works correctly, also the SQL
> looks good to me.
>
> But when I try to use the admin interface, it gives me bad errors:
>
> --- cut ---
> OperationalError at /app/admin/match/members/
> (1109, "Unknown table 'auth_users' in order clause")
> --- cut ---
>
> A quick lookup gave me the following SQL statement generated for the
> lookup: (Hooray for the _great_ debug pages :)
>
> --- cut ---
> 'SELECT
> `match_members`.`uid_id`,`match_members`.`image`,`match_members`.`gender`,`match_members`.`dob`,`match_members`.`desc`
> FROM `match_members` ORDER BY `auth_users`.`username` DESC'
> --- cut ---
>
> which does not contain 'auth_users' in the FROM clause.
>
> Is it my fault, what am I doing wrong?
>
> Or is it the complete wrong way to have that additional user data?
>
> I'm using mysql, django dev rev. 1809
>
> Thanks for your help and a happy new year
>
> :)
>
>
> --
> Andreas Neumeier
> http://andreas.neumeier.org || http://lovebox.ath.cx ||
> mailto:andreas(at)neumeier.org
>
>


--
[EMAIL PROTECTED] -- blog: http://feh.holsman.net/ -- PH: ++61-3-9877-0909

If everything seems under control, you're not going fast enough. -
Mario Andretti

Reply via email to