Feat: Blog new article.

This commit is contained in:
2025-08-18 15:57:22 +01:00
parent f434281f6a
commit e370e3a709
34 changed files with 2212 additions and 552 deletions

View File

@@ -274,7 +274,8 @@ class Model_View_Base(BaseModel, ABC):
HASH_PAGE_ACCESSIBILITY_STATEMENT: ClassVar[str] = '/accessibility-statement'
HASH_PAGE_ADMIN_HOME: ClassVar[str] = '/admin'
HASH_PAGE_APPLY_FOUNDING_PARTNER: ClassVar[str] = '/apply-founding-partner'
HASH_PAGE_APPLY_FOUNDING_PARTNER_SUCCESS: ClassVar[str] = '/apply-founding-partner-success'#
HASH_PAGE_APPLY_FOUNDING_PARTNER_SUCCESS: ClassVar[str] = '/apply-founding-partner-success'
HASH_PAGE_BLOG_ARTICLE_5_WAYS_TO_INCREASE_CLIENT_RETENTION_IN_YOUR_DOG_TRAINING_BUSINESS: ClassVar[str] = '/blog/article/5-ways-to-increase-client-retention-in-your-dog-training-business'
HASH_PAGE_BLOG_ARTICLE_HOW_TO_SCALE_YOUR_DOG_TRAINING_BUSINESS_FROM_25_TO_100_PLUS_CLIENTS: ClassVar[str] = '/blog/article/how-to-scale-your-dog-training-business-from-25-to-100-plus-clients'
HASH_PAGE_BLOG_ARTICLE_HOW_TO_SCALE_YOUR_DOG_TRAINING_BUSINESS_FROM_SOLO_TO_MULTI_TRAINER_SUCCESS: ClassVar[str] = '/blog/article/how-to-scale-your-dog-training-business-from-solo-to-multi-trainer-success'
HASH_PAGE_BLOG_ARTICLE_THE_HIDDEN_COSTS_OF_SPREADSHEET_DOG_TRAINING_WHY_UK_TRAINERS_ARE_LOSING_2000_PLUS_POUNDS_PER_YEAR: ClassVar[str] = '/blog/article/the-hidden-costs-of-spreadsheet-dog-training-why-uk-trainers-are-losing-2000-plus-pounds-per-year'

View File

@@ -160,7 +160,7 @@ class Model_View_Dog_Assessment(Model_View_Dog_Base):
self.form_filters.id_command_modality.choices += [(str(command_modality.id_command_modality), command_modality.name) for command_modality in self.filter_command_modalities]
"""
parameters_filter_bribe = Parameters_Bribe.get_default()
parameters_filter_bribe = Parameters_Bribe.get_default(user_session.id_user)
self.filter_bribes, errors = datastore_dog.get_many_bribe(parameters_filter_bribe)
"""
if len(self.filter_bribes) > 0:

View File

@@ -35,8 +35,8 @@ class Model_View_Dog_Button_Icon(Model_View_Dog_Base):
self._title = 'Button Icon'
self.form_filters = form_filters_old
datastore = DataStore_Dog()
user_session = datastore.get_user_session()
Helper_App.console_log(f'Form filters: {self.form_filters}')
parameters_filter_button_icon = Parameters_Button_Icon.from_form_filters_button_icon(self.form_filters)
parameters_filter_button_icon = Parameters_Button_Icon.from_form_filters_button_icon(self.form_filters, user_session.id_user)
Helper_App.console_log(f'Query args: {parameters_filter_button_icon}')
self.button_icons, errors = datastore.get_many_button_icon(parameters_filter_button_icon)

View File

@@ -46,6 +46,6 @@ class Model_View_Dog_Command(Model_View_Dog_Base):
self.form_filters.id_command_category.choices += [(str(command_category.id_command_category), command_category.name) for command_category in self.filter_command_categories]
Helper_App.console_log(f'Form filters: {self.form_filters}')
parameters_filter_command = Parameters_Command.from_form_filters_command(self.form_filters)
parameters_filter_command = Parameters_Command.from_form_filters_command(self.form_filters, user_session.id_user)
Helper_App.console_log(f'Query args: {parameters_filter_command}')
command_categories, self.commands, errors = datastore.get_many_command(parameters_filter_command)

View File

@@ -73,7 +73,7 @@ class Model_View_Dog_Command_Button_Link(Model_View_Dog_Base):
if len(self.filter_colours) > 0:
self.form_filters.id_colour.choices += [(str(colour.id_colour), colour.name) for colour in self.filter_colours]
parameters_filter_button_icon = Parameters_Button_Icon.get_default()
parameters_filter_button_icon = Parameters_Button_Icon.get_default(user_session.id_user)
self.filter_button_icons, errors = datastore.get_many_button_icon(parameters_filter_button_icon)
if len(self.filter_button_icons) > 0:
self.form_filters.id_button_icon.choices += [(str(button_icon.id_button_icon), button_icon.name) for button_icon in self.filter_button_icons]
@@ -84,6 +84,6 @@ class Model_View_Dog_Command_Button_Link(Model_View_Dog_Base):
self.form_filters.id_location.choices += [(str(location.id_location), location.name) for location in self.filter_locations]
Helper_App.console_log(f'Form filters: {self.form_filters}')
parameters_command_button_link = Parameters_Command_Button_Link.from_form_filters_command_button_link(self.form_filters)
parameters_command_button_link = Parameters_Command_Button_Link.from_form_filters_command_button_link(self.form_filters, user_session.id_user)
Helper_App.console_log(f'Query args: {parameters_command_button_link}')
self.command_button_links, errors = datastore.get_many_command_button_link(parameters_command_button_link)

View File

@@ -36,9 +36,10 @@ class Model_View_Dog_Command_Category(Model_View_Dog_Base):
self._title = 'Command Category'
self.form_filters = form_filters_old
datastore = DataStore_Dog()
user_session = datastore.get_user_session()
Helper_App.console_log(f'Form filters: {self.form_filters}')
parameters_filter_command = Parameters_Command.from_form_filters_command_category(self.form_filters)
parameters_filter_command = Parameters_Command.from_form_filters_command_category(self.form_filters, user_session.id_user)
Helper_App.console_log(f'Query args: {parameters_filter_command}')
self.command_categories, commands, errors = datastore.get_many_command(parameters_filter_command)

View File

@@ -35,8 +35,8 @@ class Model_View_Dog_Dog(Model_View_Dog_Base):
self._title = 'Dog'
self.form_filters = form_filters_old
datastore = DataStore_Dog()
user_session = datastore.get_user_session()
Helper_App.console_log(f'Form filters: {self.form_filters}')
parameters_filter_dog = Parameters_Dog.from_form_filters_dog(self.form_filters)
parameters_filter_dog = Parameters_Dog.from_form_filters_dog(self.form_filters, user_session.id_user)
Helper_App.console_log(f'Query args: {parameters_filter_dog}')
self.dogs, errors = datastore.get_many_dog(parameters_filter_dog)

View File

@@ -61,6 +61,6 @@ class Model_View_Dog_Dog_Command_Link(Model_View_Dog_Base):
self.form_filters.id_command.choices += [(str(command.id_command), command.name) for command in sorted_filter_commands] # .sort(key = lambda command: command[1])
Helper_App.console_log(f'Form filters: {self.form_filters}')
parameters_filter_dog_command_link = Parameters_Dog_Command_Link.from_form_filters_dog_command_link(self.form_filters)
parameters_filter_dog_command_link = Parameters_Dog_Command_Link.from_form_filters_dog_command_link(self.form_filters, user_session.id_user)
Helper_App.console_log(f'Query args: {parameters_filter_dog_command_link}')
self.dog_command_links, errors = datastore.get_many_dog_command_link(parameters_filter_dog_command_link)

View File

@@ -35,9 +35,9 @@ class Model_View_Dog_Location(Model_View_Dog_Base):
self._title = 'Location'
self.form_filters = form_filters_old
datastore = DataStore_Dog()
user_session = datastore.get_user_session()
Helper_App.console_log(f'Form filters: {self.form_filters}')
parameters_filter_location = Parameters_Location.from_form_filters_location(self.form_filters)
parameters_filter_location = Parameters_Location.from_form_filters_location(self.form_filters, user_session.id_user)
Helper_App.console_log(f'Query args: {parameters_filter_location}')
self.locations, errors = datastore.get_many_location(parameters_filter_location)