Exemplo n.º 1
0
def get_watermark():
    """Create and return a watermark"""

    oErr = ErrHandle()
    watermark_template = "seeker/passim_watermark.html"
    watermark = ""
    try:
        # create a watermark with the right datestamp
        context_wm = dict(
            datestamp=get_crpp_date(get_current_datetime(), True))
        watermark = render_to_string(watermark_template, context_wm)
    except:
        msg = oErr.get_error_message()
        oErr.DoError("get_watermark")
    # Return the result
    return watermark
Exemplo n.º 2
0
    def get_saved(self):
        """REturn the saved date in a readable form"""

        # sDate = self.saved.strftime("%d/%b/%Y %H:%M")
        sDate = get_crpp_date(self.saved, True)
        return sDate