AA
Size: a a a
AA
AA
SK
p
SK
АФ
D!
p
DS
class User:Есть у этого побочные эффекты?
def __init__(self):
self.tg_user_id = self.goal = self.dob = self.city = self.gender = self.country = self.comment = None
self.photos = {'file_id': [], 'file_unique_id': [], 'photo_index': 0} # Scroll user photos before registration
class User:
def __init__(self):
self.profile_data = {
'text_data': {'goal': None, 'dob': None, 'city': None, 'gender': None, 'country': None, 'comment': None}
'photos': {'file_id': [], 'file_unique_id': [], 'photo_index': 0} # Scroll user photos before registration
}
MA
class User:Есть у этого побочные эффекты?
def __init__(self):
self.tg_user_id = self.goal = self.dob = self.city = self.gender = self.country = self.comment = None
self.photos = {'file_id': [], 'file_unique_id': [], 'photo_index': 0} # Scroll user photos before registration
class User:
def __init__(self):
self.profile_data = {
'text_data': {'goal': None, 'dob': None, 'city': None, 'gender': None, 'country': None, 'comment': None}
'photos': {'file_id': [], 'file_unique_id': [], 'photo_index': 0} # Scroll user photos before registration
}
DS
MA
DS
MA
DS
def prepare_user_data(*keys):
profile_data = { # Data that shown to user like a text. DB = True, Show = True
'goal': None, 'gender': None,
'dob': None, 'country': None, # dob - date of birth
'city': None, 'comment': None,
}
photos = { # Data that shown to user like a photo. DB = True, Show = True
'file_id': [],
'file_unique_id': [], # Unique identifier
}
temp_reg_data = { # DB = False, Show = False
'photo_index': 0, # Scroll profile photos before registration
'old_media_id': 0, # Don't set to None because further it be compared with None!
}
filters = { # Data that shown to user like a text. DB = True, Show = True
'goal': None, 'gender': None, 'dob': None, # Any filter may be iterable if user choose option "both"
'country': None, 'city': None, }
checkboxes = {
'goal': True, 'gender': True,
'dob': True, 'photo': True,
'country': False, 'city': False} # Default exclude accounts with empty fields
matches = {
'all_matches': None,
'filtered_matches': None,
'result_matches': None,
}
user_db_data = {'profile_data': profile_data, 'photos': photos} # Data to storing into the DB
reg_data = {'user_db_data': user_db_data, 'temp_reg_data': temp_reg_data} # Showing data + additional help data
target_data = {'filters': filters, 'matches': matches, 'checkboxes': checkboxes}
data = {'reg_data': reg_data, 'target_data': target_data}
result = data
for key in keys:
result = result[key]
return result
MA
DS
MA
DS
MA