Skip to content

Instantly share code, notes, and snippets.

@mmdbalkhi
Created April 25, 2021 08:23
Show Gist options
  • Save mmdbalkhi/5670f158c14581a2aed0a3bcb04b95d3 to your computer and use it in GitHub Desktop.
Save mmdbalkhi/5670f158c14581a2aed0a3bcb04b95d3 to your computer and use it in GitHub Desktop.
{% extends 'base.html' %}
{% block content %}
<h1>{% block title %} MozLink! {% endblock %}</h1>
<form method="post">
<div class="form-group">
<label for="url">URL</label>
<input type="text" name="url" placeholder="URL to shorten" class="form-control"
value="{{ request.form['url'] }}" autofocus></input>
</div>
<div align="center" class="form-group">
<button type="submit" class="btn btn-outline-success">Submit</button>
</div>
</form>
{% if short_url %}
<hr>
<span>Your short link is {{ short_url }}</span>
{% endif %}
{% endblock %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment