예제 #1
0
def adjust_priority(view, context, model, name):
    _href = '/admin/adjust-priority?url=%s&model=%s&id=%s' % (
        view.url, model.__class__.__name__, model.id
    )
    _i = lambda icon: html.i(class_="icon %s" % icon, style="margin-right: 5px;")()
    return html.div()(
        html.a(href=_href + '&delta=-1')(_i('icon-circle-arrow-up')),
        html.a(href=_href + '&delta=1')(_i('icon-circle-arrow-down')),
    )
예제 #2
0
파일: models.py 프로젝트: MehmetNuri/quokka
def format_datetime(self, request, obj, fieldname, *args, **kwargs):
    return html.div(style='min-width:130px;')(
        getattr(obj, fieldname).strftime(self.get_datetime_format())
    )
예제 #3
0
def format_datetime(self, request, obj, fieldname, *args, **kwargs):
    return html.div(style='min-width:130px;')(getattr(obj, fieldname).strftime(
        self.get_datetime_format()))