(self, app, model_names, models)
If not already there, creates a new init file in views and urls directory.  Init file imports from all
            of the files within the directory.
If not already there, creates a new init file in views and urls directory.  Init file imports from all
            of the files within the directory.
If not already there creates a new init file in views and urls directory . Init file imports from all of the files within the directory .
def create_init_files(self, app, model_names, models):
        """
            If not already there, creates a new init file in views and urls directory.  Init file imports from all
            of the files within the directory.
        """
        model_name_slugs = ["%s_views" % (self.camel_to_slug(model_name)) for model_name in model_names]
        model_names_dict = {self.camel_to_slug(model.__name__): self.camel_to_slug(self.model_name_plural(model)) for
                            model in models}
        for folder_name in ["views", "urls"]:
            file_path = "%s/%s/__init__.py" % (app.path, folder_name)
            template_path = "django_baker/__init__%s" % folder_name
            self.create_file_from_template(file_path, template_path, {"app_label": app.label,
                                                                      "model_name_slugs": model_name_slugs,
                                                                      "model_names_dict": model_names_dict
                                                                      })
def create_init_files ( self , app , model_names , models ) : model_name_slugs = [ "%s_views" % ( self . camel_to_slug ( model_name ) ) for model_name in model_names ] model_names_dict = { self . camel_to_slug ( model . __name__ ) : self . camel_to_slug ( self . model_name_plural ( model ) ) for model in models } for folder_name in [ "views" , "urls" ] : file_path = "%s/%s/__init__.py" % ( app . path , folder_name ) template_path = "django_baker/__init__%s" % folder_name self . create_file_from_template ( file_path , template_path , { "app_label" : app . label , "model_name_slugs" : model_name_slugs , "model_names_dict" : model_names_dict } )