Esempio n. 1
0
 def insert_type_photo_casting(self):
     if self.data_delete:
         TypePhotoCasting.objects.all().delete()
         self.stdout.write('delete data: type photo casting. \n')
     else:
         if TypePhotoCasting.objects.all().count() == 0:
             type_photo_casting_helper = TypePhotoCastingHelper()
             type_photo_casting_helper.insert_data()
             self.stdout.write('Successfully inserted data: type photo casting. \n')
         else:
             self.stdout.write('can not insert the data: type photo casting. \n')
Esempio n. 2
0
 def insert_type_photo_casting(self):
     if self.data_delete:
         TypePhotoCasting.objects.all().delete()
         self.stdout.write('delete data: type photo casting. \n')
     else:
         if TypePhotoCasting.objects.all().count() == 0:
             type_photo_casting_helper = TypePhotoCastingHelper()
             type_photo_casting_helper.insert_data()
             self.stdout.write(
                 'Successfully inserted data: type photo casting. \n')
         else:
             self.stdout.write(
                 'can not insert the data: type photo casting. \n')
Esempio n. 3
0
class InsertDataHelper(object):

    def __init__(self):
        self.country_helper = CountryHelper()
        self.feature_helper = FeatureHelper()

        self.entry_helper = EntryHelper()
        self.brand_helper = BrandHelper()
        self.commercial_helper = CommercialHelper()
        self.project_helper = ProjectHelper()
        self.model_helper = ModelHelper()
        self.model_feature_helper = ModelFeatureHelper()
        self.super_admin_helper = SuperAdminHelper()
        self.group_helper = GroupHelper()
        self.type_client_helper = TypeClientHelper()
        self.client_helper = ClientHelper()
        self.type_casting_helper = TypeCastingHelper()
        self.currency_helper = CurrencyHelper()
        self.type_photo_casting_helper = TypePhotoCastingHelper()
        self.photo_use_helper = PhotoUseHelper()
        self.type_event_helper = TypeEventHelper()
        self.broadcast_helper = BroadcastHelper()

    def run(self):
        self.entry_helper.set_data()
        self.entry_helper.insert_data()

        self.brand_helper.set_data()
        self.brand_helper.insert_data()

        self.project_helper.set_data()
        self.project_helper.insert_data()

        self.commercial_helper.set_data()
        self.commercial_helper.insert_data()

        self.country_helper.insert_data()

        self.model_helper.set_data()
        self.model_helper.insert_data()

        self.feature_helper.insert_data()

        self.model_feature_helper.set_data()
        self.model_feature_helper.insert_data()

        self.super_admin_helper.set_data()
        self.super_admin_helper.insert_data()

        self.group_helper.set_data()
        self.group_helper.insert_data()

        self.type_client_helper.set_data()
        self.type_client_helper.insert_data()

        self.client_helper.set_data()
        self.client_helper.insert_data()
        self.client_helper.insert_type()

        self.type_casting_helper.insert_data()

        self.currency_helper.insert_data()

        self.type_photo_casting_helper.insert_data()

        self.photo_use_helper.insert_data()

        self.type_event_helper.insert_data()

        self.broadcast_helper.insert_data()