lck.django 0.8.5 documentation

This Page

lck.django.profile.models

lck.django.profile.models

Contains building blocks for creating user profiles.

Classes

class BasicInfo(*args, **kwargs)

Bases: django.db.models.base.Model

Describes a basic user profile that links through a one-to-one field to django.contrib.auth.models.User. Provides fields to store nicks, birth dates, genders, countries of origin, cities and time zones.

This model is also a transparent proxy to the User object enabling most of the functionality that would require explicitly getting the user model. This enables for enhanced duck typing in scenarios where user objects are expected.

age() → numeric_age
is_male()

True if the gender is male.

is_female()

True if the gender is female.

has_gender()

True if the gender is set.

get_country_display_english()

Displays the country of origin in its English form. This is useful for distionary lookups.

class GravatarSupport(*args, **kwargs)

Bases: django.db.models.base.Model

Enables getting the user’s gravatar by using the model.avatar_{size} attribute notation. Works in both code and templates.

Possible values for size are the same as in AvatarSupport but the modifier is always treated as “s”.

class ActivationSupport(*args, **kwargs)

Bases: django.db.models.base.Model

Adds an activation_token field.