<|file_name|>PageView.py<|end_file_name|><｜fim▁begin｜>"""
Page view class
"""


import os

from Server.Importer import ImportFromModule


class PageView(ImportFromModule("Server.PageViewBase", "PageViewBase")):
    """
    Page view class.
    """


    _PAGE_TITLE = "Python Web Framework"


    def __init__(self, htmlToLoad):
        """
        Constructor.
        - htmlToLoad : HTML to load
        """
        self.SetPageTitle(self._PAGE_TITLE)
<｜fim▁hole｜>        self.AddMetaData("charset=\"UTF-8\"")
        self.AddMetaData("name=\"viewport\" content=\"width=device-width, initial-scale=1\"")

        self.AddStyleSheet("/css/styles.css")

        self.AddJavaScript("/js/http.js")

        self.LoadHtml(os.path.join(os.path.dirname(__file__), "%s.html" % htmlToLoad))

        self.SetPageData({ "PageTitle" : self._PAGE_TITLE })<｜fim▁end｜>