user¶
A user participating in the Prophecy Practicum.
-
class
prophecypracticum.engine.user.
User
(name: str, email: str, my_id: int = 0, supplicant_id: int = 0, prophet_id: int = 0, prophecy_given: bool = False, prophecy_received: bool = False, prophecy_received_and_interacted: bool = False)¶ Bases:
object
The user participating in the Prophecy Practicum.
- Parameters
self.name – Name of the user participating in the practicum.
self.email – Email address of the user participating in the practicum.
self.my_id – The users ID in the database.
self.supplicant_id – The ID of this prophet’s supplicant
self.prophet_id – The ID of this supplicant’s prophet.
self.prophecy_given – A boolean that stores whether the prophecy has been recorded.
self.prophecy_received – Marked True when prophecy is ready to read.
self.prophecy_received_and_interacted – A boolean that stores whether this user has interacted with the prophecy they received.
self.this_week_prophecy – This week’s prophecy.
-
change_email_address
(new_email: str) → None¶ Allow the user to update their email address.
- Parameters
new_email – The new email address to associate with the user.
-
change_name
(new_name: str) → None¶ Allow the user to update their name.
- Parameters
new_name – The new name to associate with this user.
-
create_prophecy
(prophetic_words: str = '', photo_location: str = '') → None¶ Create a prophecy object.
Should also set self.prophecy_given to True.
- Parameters
prophetic_words – The text of the prophecy.
photo_location – The location of a photo prophecy.
-
email
: str = None¶
-
get_email_address
() → str¶ Return user’s email address.
- Returns
The user’s email address.
-
get_prophecy
() → prophecypracticum.engine.prophecy.Prophecy¶ Return a prophecy object.
Need to change to get previous prophecies, but how to do that depends on how many weeks will be kept.
- Returns
A prophecy object.
-
get_supplicant_id
() → int¶ Returns the supplicant ID.
- Returns
Supplicant ID
-
get_user_id
() → int¶ Return the user ID
- Returns
The user’s ID
-
is_practicum_complete
() → bool¶ Determine whether the practicum is complete.
- Returns
True if completed and false if any step is incomplete.
-
my_id
: int = None¶
-
name
: str = None¶
-
prophecy_given
: bool = None¶
-
prophecy_ready_to_read
() → None¶ Let the user know there is a prophecy to read
-
prophecy_received
: bool = None¶
-
prophecy_received_and_interacted
: bool = None¶
-
prophet_id
: int = None¶
-
set_supplicant_id
(supplicant_id: int) → None¶ Sets the supplicant id number.
- Parameters
supplicant_id – The id number for the supplicant.
-
set_user_id
(user_id: int) → None¶ Set this user’s ID
- Parameters
user_id – The ID that will identify this user.
-
supplicant_id
: int = None¶