4040# EventLocation
4141from app .models .event_location import EventLocation
4242
43+ # Custom Placeholder
44+ from app .models .custom_placeholder import CustomPlaceholder
45+
4346# User Permissions
4447from app .models .user_permission import UserPermission
4548SALES = 'sales'
@@ -174,7 +177,7 @@ def create_event_sub_topics():
174177 "Religion & Spirituality" : ["Mysticism and Occult" ],
175178 "Government & Politics" : ["Non-partisan" ]
176179 }
177- eventopics = db .session .query (EventTopic ).all ()
180+ eventopics = db .session .query (EventTopic ).all ()
178181 for keysub_topic in event_sub_topic :
179182 for subtopic in event_sub_topic [keysub_topic ]:
180183 get_or_create (EventSubTopic , name = subtopic , event_topic_id = next (x for x in eventopics if x .name == keysub_topic ).id )
@@ -311,6 +314,15 @@ def create_admin_message_settings():
311314 )
312315
313316
317+ def create_custom_placeholders ():
318+ custom_placeholder , _ = get_or_create (
319+ CustomPlaceholder , name = 'Hills' ,
320+ original_image_url = 'https://www.w3schools.com/html/pic_mountain.jpg' ,
321+ event_sub_topic_id = 1
322+ )
323+ db .session .add (custom_placeholder )
324+
325+
314326def populate ():
315327 """
316328 Create defined Roles, Services and Permissions.
@@ -347,6 +359,8 @@ def populate():
347359 create_event_locations ()
348360 print ('Creating admin message settings...' )
349361 create_admin_message_settings ()
362+ print ('Creating custom placeholders...' )
363+ create_custom_placeholders ()
350364
351365
352366def populate_without_print ():
@@ -369,6 +383,7 @@ def populate_without_print():
369383 create_event_types ()
370384 create_event_locations ()
371385 create_admin_message_settings ()
386+ create_custom_placeholders ()
372387
373388 db .session .commit ()
374389
0 commit comments