profiles

models

class profiles.models.Profile(*args, **kwargs)[source]

Bases: Model

Data object storing the tenants Profile informations.

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

favorite_city

A string representing the favorite city of the user

user

A reference to an user

tests

profiles.tests.test_profile_model()[source]

Test the Profile model behavior

profiles.tests.test_profile_single_view()[source]

Test that single profile views are correctly displayed.

profiles.tests.test_profile_urls()[source]

Test that the name views and url are correct

profiles.tests.test_profiles_index()[source]

Test the global profiles view

views

profiles.views.index(request)[source]

Display a list of all available profiles

profiles.views.profile(request, username)[source]

Display details of a given Profile

Args:

username: str

the username of the Profile to display