Problem loading custom addon first of all hi to everyone first post !
I've recently (10 days ago) started to learn Python specifically for Blender. Obviously I got eager to try something out and I cant (for obvious reason) find a solution to this problem.
I am an absolute beginner in programming and I don't have the right jargon so please be patient with me if I said something wrong  :).

What I want to achieve is having a custom panel for some extra settings under the Render Tab. I was able to do so and convert it to an Add-on (so I can have it loaded at startup) but my custom operator (that contains 2 actions) doesn't load up together with the Add-on.. I have to manually run the script but in this way I have to do it every time I log in.

I am super sure the problem is with my custom operator since in order to make this script I've basically just dug around other people/template scripts to see how they work.. without knowledge of what I am doing (I just go too excited)

all the help will be highly appreciated

bl_info = {
    "name": "HTML Render Combo",
    "author": "Virgil Sisoe",
    "version": (1, 0),
    "blender": (2, 79, 0),
    "location": "Properties &gt; Render",
    "description": "Quick panel to export Documen HTML",
    "warning": "",
    "wiki_url": "",
    "category": "Render",
    }

import bpy
#DEFINE CUSTOM OPERATOR FOR HTML EXPORT
def main(context):
    # WANT IM TRYING IS TO HAVE A SINGLE BUTTON DOING RENDER AND EXPORT DOCUMEN
    bpy.ops.render.render()
    #DOCUMEN HTML IS AN ADDON I HAVE
    bpy.ops.scene.export_documen_html()

#CREATING CLASS
class SimpleOperator(bpy.types.Operator):
    """Export HTML"""
    bl_idname = "object.simple_operator"
    bl_label = "Simple Object Operator"

# JUST COPIED AND PASTED FROM ANOTHER RENDER SOURCE IT IS COMPLETLY WRONG 
    @classmethod
    def poll(cls, context):
        scene = context.scene
        return scene 

    def draw(self, context):
        layout = self.layout
        return {'FINISHED'}


def register():
    bpy.utils.register_class(SimpleOperator)


def unregister():
    bpy.utils.unregister_class(SimpleOperator)


if __name__ == "__main__":
    register()

    # test call
    bpy.ops.object.simple_operator()

#DEFINE CUSTOM PANEL FOR EXPORT 
def draw(self, context):
        layout = self.layout

        # ROW COLUMN LAYOUT
        row = layout.row()
        col = row.column(align = True)
        col.scale_y = 3
        row.operator("object.simple_operator", text="Render + HTML", icon='RENDER_STILL')
        #EXTERNAL ADDON (DOCUMEN)
        row.operator("scene.export_documen_html", text="HTML", icon='FILE')

        # LAYOUT EXPORT PATH 
        scene = context.scene
        box = layout.box()
        row = box.row()
        row.prop(scene, "documen_folderpath", text="Export Path")
        row.prop(scene, "buttons.directory_browse")

#render tab path      
def register():
    bpy.types.RENDER_PT_render.append(draw)

def unregister():
    bpy.types.RENDER_PT_render.re.remove(draw)

if __name__ == "__main__":
    register()





Ive added the .py file

custom_export.py file
There are two register and unregistered functions. When running the script both are registered as the __name__ == "__main__" evaluates to True and use the version of those functions that are defined upon that time

When running as an add-on the full module is loaded and blender will handle the calls to register and unregister functions. After loading the module only the latest version of the register and unregister functions are known. Hence only the custom draw function is registered.

This can be fixed my merging the two register functions and the two unregister functions.

bl_info = {
    "name": "HTML Render Combo",
    "author": "Virgil Sisoe",
    "version": (1, 0),
    "blender": (2, 79, 0),
    "location": "Properties &gt; Render",
    "description": "Quick panel to export Documen HTML",
    "warning": "",
    "wiki_url": "",
    "category": "Render",
}

import bpy
#DEFINE CUSTOM OPERATOR FOR HTML EXPORT
def main(context):
    """for ob in context.scene.objects:
        print(ob)"""
    bpy.ops.render.render()
    bpy.ops.scene.export_documen_html()

#CREATING CLASS
class SimpleOperator(bpy.types.Operator):
    """Export HTML"""
    bl_idname = "object.simple_operator"
    bl_label = "Simple Object Operator"
#CHECK
    @classmethod
    def poll(cls, context):
        return context.active_object is not None

    def execute(self, context):
        main(context)
        return {'FINISHED'}

#DEFINE CUSTOM PANEL FOR EXPORT 
def draw(self, context):
    layout = self.layout

    # write the layout code below here
    row = layout.row()
    col = row.column(align = True)
    col.scale_y = 3
    #row.operator("render.render", text="Render", icon='RENDER_STILL')
    row.operator("object.simple_operator", text="Render + HTML", icon='RENDER_STILL')
    row.operator("scene.export_documen_html", text="HTML", icon='FILE')

    scene = context.scene
    box = layout.box()
    row = box.row()
    row.prop(scene, "documen_folderpath", text="Export Path")
    row.prop(scene, "buttons.directory_browse")

#render panel path      
def register():
    bpy.utils.register_class(SimpleOperator)
    bpy.types.RENDER_PT_render.append(draw)

def unregister():
    bpy.types.RENDER_PT_render.remove(draw)
    bpy.utils.unregister_class(SimpleOperator)

if __name__ == "__main__":
    register()


There are other stuff missing from the file like the "scene.export_documen_html" operator.