Skip to content

Instantly share code, notes, and snippets.

Sinar Mustika Ruslan sinar96

  • Makassar, Sulawesi Selatan, Indonesia
Block or report user

Report or block sinar96

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@sinar96
sinar96 / layout.html
Created Jul 28, 2016
untuk memanggil layout-list yang telah kita buat.
View layout.html
<title>This is Title </title>
<body>
<h2>
<ul>
<!--% for user(as variable)-->
{% for user in users %}
<!--Dan disinilah dynamic route itu berfungsi-->
<li><a href="{{ user.url }}">{{ user.username }}</a></li>
{% endfor %}
</ul>
@sinar96
sinar96 / layout-list.html
Last active Jul 28, 2016
Contoh fungsi penggunaan Jinja
View layout-list.html
{% extends "layout.html" %}
{% block body %}
<ul>
{% for user in users %}
<li><a href="{{ user.url }}">{{ user.username }}</a></li>
{% endfor %}
</ul>
{% endblock %}
@sinar96
sinar96 / Learn route in Flask
Last active Jul 28, 2016
Code ini akan membantu kalian untuk memahami perbedaan code pada Static Route dan Dynamic route
View Learn route in Flask
from flask import Flask
#create the application object
app = Flask(__name__)
app.config.from_object('config')
database.init_app(app)
@app.route("/")
def main():
# Static Route
You can’t perform that action at this time.