Пример #1
0
def person_badge(person_id):
    my_person = Person.query.get(int(person_id))
    if not my_person:
        abort_json(404, "This person's not in the database")

    my_badge_file = make_badge_io(my_person)
    return send_file(my_badge_file, mimetype='image/svg+xml')
Пример #2
0
def person_badge(person_id):
    my_person = Person.query.get(int(person_id))
    if not my_person:
        abort_json(404, "This person's not in the database")

    my_badge_file = make_badge_io(my_person)
    return send_file(my_badge_file, mimetype='image/svg+xml')
Пример #3
0
def package_badge(host_or_language, project_name):
    my_id = package.make_id(host_or_language, project_name)
    my_package = Package.query.get(my_id)
    if not my_package:
        abort_json(404, "This package is not in the database")

    my_badge_file = make_badge_io(my_package)
    return send_file(my_badge_file, mimetype='image/svg+xml')
Пример #4
0
def package_badge(host_or_language, project_name):
    my_id = package.make_id(host_or_language, project_name)
    my_package = Package.query.get(my_id)
    if not my_package:
        abort_json(404, "This package is not in the database")

    my_badge_file = make_badge_io(my_package)
    return send_file(my_badge_file, mimetype='image/svg+xml')