Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The Pinax account is just a wrapper for that holds the user, timezone and language. user is a foreign key relation to the standard django.auth User model.</p> <pre><code>class Account(models.Model): user = models.ForeignKey(User, unique=True, verbose_name=_('user')) timezone = TimeZoneField(_('timezone')) language = models.CharField(_('language'), max_length=10, choices=settings.LANGUAGES, default=settings.LANGUAGE_CODE) def __unicode__(self): return self.user.username </code></pre> <p>The idios Profile model basically does the same thing but has some custom methods: </p> <pre><code>class ProfileBase(models.Model): # @@@ could be unique=True if subclasses don't inherit a concrete base class # @@@ need to look at this more user = models.ForeignKey(User, verbose_name=_("user")) class Meta: verbose_name = _("profile") verbose_name_plural = _("profiles") abstract = True def __unicode__(self): return self.user.username def get_absolute_url(self): if idios.settings.MULTIPLE_PROFILES: # @@@ using PK here is kind of ugly. the alternative is to # generate a unique slug for each profile, which is tricky kwargs = { "profile_slug": self.profile_slug, "pk": self.pk } else: if idios.settings.USE_USERNAME: kwargs = {"username": self.user.username} else: kwargs = {"pk": self.pk} return reverse("profile_detail", kwargs=kwargs) @classmethod def get_form(cls): return get_profile_form(cls) def _default_profile_slug(cls): return cls._meta.module_name profile_slug = ClassProperty(classmethod(_default_profile_slug)) </code></pre> <p>Neither of them replicates the authentication functionality of django.auth.User if that is what you are asking. It doesn't look like either one has a dependency on the other either. So if you can't see a good use for both of them, just go with the one that makes sense.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload