proso_user package¶
Submodules¶
proso_user.0006_migrate_to_psa module¶
-
class
proso_user.0006_migrate_to_psa.
Migration
(name, app_label)[source]¶ Bases:
django.db.migrations.migration.Migration
-
dependencies
= [('auth', '__first__'), ('proso_user', '0005_auto_user_questions'), ('default', '0001_initial')]¶
-
operations
= [<CreateModel options={'db_table': 'social_auth_code'}, bases=(<class 'django.db.models.base.Model'>, <class 'social.storage.django_orm.DjangoCodeMixin'>), fields=[('id', <django.db.models.fields.AutoField>), ('email', <django.db.models.fields.EmailField>), ('code', <django.db.models.fields.CharField>), ('verified', <django.db.models.fields.BooleanField>)], name='Code'>, <AlterUniqueTogether name='code', unique_together={('email', 'code')}>]¶
-
proso_user.admin module¶
-
class
proso_user.admin.
ClassAdmin
(model, admin_site)[source]¶ Bases:
django.contrib.admin.options.ModelAdmin
-
list_display
= ('code', 'name')¶
-
media
¶
-
search_fields
= ('code', 'name')¶
-
-
class
proso_user.admin.
SessionAdmin
(model, admin_site)[source]¶ Bases:
django.contrib.admin.options.ModelAdmin
-
list_display
= ('user', 'time_zone', 'http_user_agent', 'location', 'locale', 'display_width', 'display_height')¶
-
list_filter
= ('time_zone', 'locale')¶
-
media
¶
-
search_fields
= ('user__username',)¶
-
proso_user.json_enrich module¶
proso_user.models module¶
-
class
proso_user.models.
Class
(id, code, name, owner)[source]¶ Bases:
django.db.models.base.Model
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
Class.
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
Class.
members
¶ Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
pizza.toppings
andtopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
Class.
objects
= <proso_user.models.ClassManager object>¶
-
Class.
owner
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
child.parent
is aForwardManyToOneDescriptor
instance.
-
exception
-
class
proso_user.models.
HttpUserAgent
(id, content, content_hash, device_family, os_family, os_version, browser_family, browser_version)[source]¶ Bases:
django.db.models.base.Model
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
HttpUserAgent.
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
HttpUserAgent.
objects
= <proso_user.models.HttpUserAgentManager object>¶
-
HttpUserAgent.
session_set
¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
exception
-
class
proso_user.models.
Location
(id, ip_address)[source]¶ Bases:
django.db.models.base.Model
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
Location.
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
Location.
objects
= <proso_user.models.LocationManager object>¶
-
Location.
session_set
¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
exception
-
class
proso_user.models.
Session
(id, user, time_zone, http_user_agent, location, locale, display_width, display_height)[source]¶ Bases:
django.db.models.base.Model
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
Session.
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
Session.
answer_set
¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
Session.
comment_set
¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
Session.
http_user_agent
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
child.parent
is aForwardManyToOneDescriptor
instance.
-
Session.
location
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
child.parent
is aForwardManyToOneDescriptor
instance.
-
Session.
objects
= <proso_user.models.SessionManager object>¶
-
Session.
subscription_set
¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
Session.
time_zone
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
child.parent
is aForwardManyToOneDescriptor
instance.
-
Session.
user
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
child.parent
is aForwardManyToOneDescriptor
instance.
-
exception
-
class
proso_user.models.
TimeZone
(id, content, content_hash)[source]¶ Bases:
django.db.models.base.Model
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
TimeZone.
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
TimeZone.
objects
= <proso_user.models.TimeZoneManager object>¶
-
TimeZone.
session_set
¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
exception
-
class
proso_user.models.
UserProfile
(id, user, send_emails, public)[source]¶ Bases:
django.db.models.base.Model
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
UserProfile.
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
UserProfile.
classes
¶ Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
pizza.toppings
andtopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
UserProfile.
objects
= <django.db.models.manager.Manager object>¶
-
UserProfile.
owned_classes
¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
UserProfile.
user
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
child.parent
is aForwardManyToOneDescriptor
instance.
-
UserProfile.
userprofileproperty_set
¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
exception
-
class
proso_user.models.
UserProfileProperty
(id, user_profile, name, value)[source]¶ Bases:
django.db.models.base.Model
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
UserProfileProperty.
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
UserProfileProperty.
objects
= <django.db.models.manager.Manager object>¶
-
UserProfileProperty.
user_profile
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
child.parent
is aForwardManyToOneDescriptor
instance.
-
exception
-
class
proso_user.models.
UserQuestion
(id, identifier, lang, content, active, answer_type, repeat)[source]¶ Bases:
django.db.models.base.Model
-
ANSWER_TYPES
= (('c', 'closed'), ('m', 'mixed'), ('o', 'open'))¶
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
UserQuestion.
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
UserQuestion.
TYPE_CLOSED
= 'c'¶
-
UserQuestion.
TYPE_MIXED
= 'm'¶
-
UserQuestion.
TYPE_OPEN
= 'o'¶
-
UserQuestion.
conditions
¶ Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
pizza.toppings
andtopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
UserQuestion.
get_answer_type_display
(*moreargs, **morekwargs)¶
-
UserQuestion.
objects
= <proso_user.models.UserQuestionManager object>¶
-
UserQuestion.
on_events
¶ Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
pizza.toppings
andtopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
UserQuestion.
possible_answers
¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
UserQuestion.
user_answers
¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
-
class
proso_user.models.
UserQuestionAnswer
(id, user, closed_answer, open_answer, time, question)[source]¶ Bases:
django.db.models.base.Model
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
UserQuestionAnswer.
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
UserQuestionAnswer.
closed_answer
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
child.parent
is aForwardManyToOneDescriptor
instance.
-
UserQuestionAnswer.
get_next_by_time
(*moreargs, **morekwargs)¶
-
UserQuestionAnswer.
get_previous_by_time
(*moreargs, **morekwargs)¶
-
UserQuestionAnswer.
objects
= <django.db.models.manager.Manager object>¶
-
UserQuestionAnswer.
question
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
child.parent
is aForwardManyToOneDescriptor
instance.
-
UserQuestionAnswer.
user
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
child.parent
is aForwardManyToOneDescriptor
instance.
-
exception
-
class
proso_user.models.
UserQuestionCondition
(id, type, value)[source]¶ Bases:
django.db.models.base.Model
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
UserQuestionCondition.
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
UserQuestionCondition.
objects
= <proso_user.models.UserQuestionConditionManager object>¶
-
UserQuestionCondition.
userquestion_set
¶ Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
pizza.toppings
andtopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
exception
-
class
proso_user.models.
UserQuestionConditionManager
[source]¶ Bases:
django.db.models.manager.Manager
-
class
proso_user.models.
UserQuestionEvent
(id, type, value)[source]¶ Bases:
django.db.models.base.Model
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
UserQuestionEvent.
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
UserQuestionEvent.
objects
= <proso_user.models.UserQuestionEventManager object>¶
-
UserQuestionEvent.
userquestion_set
¶ Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
pizza.toppings
andtopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
exception
-
class
proso_user.models.
UserQuestionPossibleAnswer
(id, identifier, active, content, question)[source]¶ Bases:
django.db.models.base.Model
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
UserQuestionPossibleAnswer.
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
UserQuestionPossibleAnswer.
objects
= <django.db.models.manager.Manager object>¶
-
UserQuestionPossibleAnswer.
question
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
child.parent
is aForwardManyToOneDescriptor
instance.
-
UserQuestionPossibleAnswer.
userquestionanswer_set
¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
exception
proso_user.urls module¶
proso_user.views module¶
-
proso_user.views.
initmobile_view
(request)[source]¶ Create lazy user with a password. Used from the Android app. Also returns csrf token.
- GET parameters:
- username:
- user’s name
- password:
- user’s password
-
proso_user.views.
login
(request)[source]¶ Log in
- GET parameters:
- html
- turn on the HTML version of the API
- POST parameters (JSON):
- username:
- user’s name
- password:
- user’s password
-
proso_user.views.
profile
(request, status=200)[source]¶ Get the user’s profile. If the user has no assigned profile, the HTTP 404 is returned. Make a POST request to modify the user’s profile.
- GET parameters:
- html
- turn on the HTML version of the API
- username:
- username of user (only for users with public profile)
- stats:
- attache addition user statistics
- POST parameters (JSON):
- send_emails:
- switcher turning on sending e-mails to user
- public:
- swicher making the user’s profile publicly available
- user:
- password:
- user’s password
- password_check:
- user’s password again to check it
- first_name (optional):
- user’s first name
- last_name (optional):
- user’s last name
-
proso_user.views.
session
(request)[source]¶ Get the information about the current session or modify the current session.
- GET parameters:
- html
- turn on the HTML version of the API
- POST parameters:
- locale:
- client’s locale
- time_zone:
- client’s time zone
- display_width:
- width of the client’s display
- display_height
- height of the client’s display
-
proso_user.views.
signup
(request)[source]¶ Create a new user with the given credentials.
- GET parameters:
- html
- turn on the HTML version of the API
- POST parameters (JSON):
- username:
- user’s name
- email:
- user’s e-mail
- password:
- user’s password
- password_check:
- user’s password again to check it
- first_name (optional):
- user’s first name
- last_name (optional):
- user’s last name