Login

Tag "profiles"

Snippet List

Alternative to User.get_profile()

**This is an alternative to User.get_profile.** Rather than having you call `User.get_profile` directly, this retrieves the profile instance for a `User` and attaches the fields from the profile to the `User` object when instantiated. The special methods for `DateField`, `FileField`, `ImageField` and fields with `choices` are also created. Since the profile object still has to be retrieved from the database before its fields can be added to the `User`, the costs for using this might outweigh the rewards unless you are heavily using profiles. To install, place it in a module on your `PYTHONPATH` and add it to `INSTALLED_APPS`.

  • user
  • profile
  • auth
  • userprofile
  • profiles
Read More

1 snippet posted so far.