initial commit, adding flask structure, README, routes
- routes defined in routes.py uses the <path:..> function to catch every non-empty url comming along - request.full_path is used to get the entire url, as <path:> would remove eg GET '?' from the url, which we don't want for the link forwarding. - request.full_path[1:] removes the '/' from the url
This commit is contained in:
18
app/template/short.html
Normal file
18
app/template/short.html
Normal file
@ -0,0 +1,18 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8", content="width=device-width", name="viewport"/>
|
||||
<title>Link Shortening</title>
|
||||
<link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='css/style.css') }}">
|
||||
<link rel="shortcut icon" type="image/jpg" href="{{ url_for('static', filename='res/favicon.ico') }}">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h2>
|
||||
Your Link:
|
||||
</h2>
|
||||
{{ path }}
|
||||
</body>
|
||||
|
||||
</html>
|
Reference in New Issue
Block a user