Commit b901b7f1 authored by danmcquillan's avatar danmcquillan
Browse files

lab-15

parent 2a9aa3b8
{% extends "base.html" %}
{% block body %}
<div class="jumbotron">
<div >
<form class="form-horizontal" method="post" action="/edit_twit">
{{ form.csrf_token }}
<div class='form-group'>
<div class='col-md-6'>
{% if form.twit.errors %}
<ul class='errors'>
{% for error in form.twit.errors %}
<li>{{ error }}</li>
{% endfor %}
</ul>
{% endif %}
{{ form.twit(class='form-control') }}
</div>
</div>
<div>
{{ form.twit_id }}
</div>
<div class='form-group'>
<div class='col-md-6'>
{{ form.submit(class='btn btn-primary btn-block') }}
</div>
</div>
</form>
</div>
</div>
{% endblock %}
{% extends "base_8.html" %}
{% block body %}
<div class="jumbotron">
<div >
<form class="form-horizontal" method="post" action="/edit_twit">
{{ form.csrf_token }}
<div class='form-group'>
<div class='col-md-6'>
{% if form.twit.errors %}
<ul class='errors'>
{% for error in form.twit.errors %}
<li>{{ error }}</li>
{% endfor %}
</ul>
{% endif %}
{{ form.twit(class='form-control') }}
</div>
</div>
<div>
{{ form.twit_id }}
</div>
<div class='form-group'>
<div class='col-md-6'>
{{ form.submit(class='btn btn-primary btn-block') }}
</div>
</div>
</form>
</div>
</div>
{% endblock %}
{% extends "base_8.html" %}
{% block body %}
<div class="jumbotron">
<div >
<form class="form-horizontal" method="post" action="/edit_twit">
{{ form.csrf_token }}
<div class='form-group'>
<div class='col-md-6'>
{% if form.twit.errors %}
<ul class='errors'>
{% for error in form.twit.errors %}
<li>{{ error }}</li>
{% endfor %}
</ul>
{% endif %}
{{ form.twit(class='form-control') }}
</div>
</div>
<div>
{{ form.twit_id }}
</div>
<div class='form-group'>
<div class='col-md-6'>
{{ form.submit(class='btn btn-primary btn-block') }}
</div>
</div>
</form>
</div>
</div>
{% endblock %}
<html>
<head>
<title>Headlines</title>
</head>
<body>
<h1><a href="/">Headlines</a></h1>
<form>
<input type="text" name="publication" placeholder="search for headlines" />
<input type="submit" value="Submit" />
</form>
{% for article in articles %}
<b>{{article.title}}</b><br />
<i>{{article.published}}</i><br />
<p>{{article.summary}}</p>
<hr />
{% endfor %}
</body>
</html>
{% extends "base.html" %}
{% block body %}
<div class="jumbotron">
<form class='form-horizontal' method="post">
{{ form.csrf_token }}
<div class='form-group'>
<div class='col-md-6'>
{% if form.username.errors %}
<ul class='errors'>
{% for error in form.username.errors %}
<li>{{ error }}</li>
{% endfor %}
</ul>
{% endif %}
{{ form.username(class='form-control',placeholder='username') }}
</div>
</div>
<div class='form-group'>
<div class='col-md-6'>
{% if form.password.errors %}
<ul class='errors'>
{% for error in form.password.errors %}
<li>{{ error }}</li>
{% endfor %}
</ul>
{% endif %}
{{
form.password(class='form-control',placeholder='password') }}
</div>
</div>
<div class='form-group'>
<div class='col-md-6'>
{% if form.password2.errors %}
<ul class='errors'>
{% for error in form.password2.errors %}
<li>{{ error }}</li>
{% endfor %}
</ul>
{% endif %}
{{ form.password2(class='form-control',placeholder='confirm password') }}
</div>
</div>
<div class='form-group'>
<div class='col-md-6'>
{{ form.submit(class='btn btn-primary btn-block') }}
</div>
</div>
</form>
</div >
{% endblock %}
{% extends "base_10.html" %}
{% block body %}
<div class="jumbotron">
<form class='form-horizontal' method="post">
{{ form.csrf_token }}
<div class='form-group'>
<div class='col-md-6'>
{% if form.username.errors %}
<ul class='errors'>
{% for error in form.username.errors %}
<li>{{ error }}</li>
{% endfor %}
</ul>
{% endif %}
{{ form.username(class='form-control',placeholder='username') }}
</div>
</div>
<div class='form-group'>
<div class='col-md-6'>
{% if form.password.errors %}
<ul class='errors'>
{% for error in form.password.errors %}
<li>{{ error }}</li>
{% endfor %}
</ul>
{% endif %}
{{
form.password(class='form-control',placeholder='password') }}
</div>
</div>
<div class='form-group'>
<div class='col-md-6'>
{% if form.password2.errors %}
<ul class='errors'>
{% for error in form.password2.errors %}
<li>{{ error }}</li>
{% endfor %}
</ul>
{% endif %}
{{ form.password2(class='form-control',placeholder='confirm password') }}
</div>
</div>
<div class='form-group'>
<div class='col-md-6'>
{{ form.submit(class='btn btn-primary btn-block') }}
</div>
</div>
</form>
</div >
{% endblock %}
{% extends "base_8.html" %}
{% block body %}
<div class="jumbotron">
<form class='form-horizontal' method="post">
{{ form.csrf_token }}
<div class='form-group'>
<div class='col-md-6'>
{% if form.username.errors %}
<ul class='errors'>
{% for error in form.username.errors %}
<li>{{ error }}</li>
{% endfor %}
</ul>
{% endif %}
{{ form.username(class='form-control',placeholder='username') }}
</div>
</div>
<div class='form-group'>
<div class='col-md-6'>
{% if form.password.errors %}
<ul class='errors'>
{% for error in form.password.errors %}
<li>{{ error }}</li>
{% endfor %}
</ul>
{% endif %}
{{
form.password(class='form-control',placeholder='password') }}
</div>
</div>
<div class='form-group'>
<div class='col-md-6'>
{% if form.password2.errors %}
<ul class='errors'>
{% for error in form.password2.errors %}
<li>{{ error }}</li>
{% endfor %}
</ul>
{% endif %}
{{ form.password2(class='form-control',placeholder='confirm password') }}
</div>
</div>
<div class='form-group'>
<div class='col-md-6'>
{{ form.submit(class='btn btn-primary btn-block') }}
</div>
</div>
</form>
</div >
{% endblock %}
{% extends "base_8.html" %}
{% block body %}
<div class="jumbotron">
<form class='form-horizontal' method="post">
{{ form.csrf_token }}
<div class='form-group'>
<div class='col-md-6'>
{% if form.username.errors %}
<ul class='errors'>
{% for error in form.username.errors %}
<li>{{ error }}</li>
{% endfor %}
</ul>
{% endif %}
{{ form.username(class='form-control',placeholder='username') }}
</div>
</div>
<div class='form-group'>
<div class='col-md-6'>
{% if form.password.errors %}
<ul class='errors'>
{% for error in form.password.errors %}
<li>{{ error }}</li>
{% endfor %}
</ul>
{% endif %}
{{
form.password(class='form-control',placeholder='password') }}
</div>
</div>
<div class='form-group'>
<div class='col-md-6'>
{% if form.password2.errors %}
<ul class='errors'>
{% for error in form.password2.errors %}
<li>{{ error }}</li>
{% endfor %}
</ul>
{% endif %}
{{ form.password2(class='form-control',placeholder='confirm password') }}
</div>
</div>
<div class='form-group'>
<div class='col-md-6'>
{{ form.submit(class='btn btn-primary btn-block') }}
</div>
</div>
</form>
</div >
{% endblock %}
{% extends "base_10.html" %}
{% block body %}
<div class="jumbotron">
{% for twit in twits %}
<div class="row">
<div class="col-md-4">{{ twit[0] }}</div>
<div class="col-md-4">{{ twit[2] }}</div>
<div class="col-md-4"><a href='/edit_twit?id={{ twit[1] }}'> edit </a><a
href='/delete_twit?id={{ twit[1] }}'> delete </a></div>
</div>
{% endfor %}
</div>
{% endblock %}
{% extends "base.html" %}
{% block body %}
<div class="jumbotron">
{% for twit in twits %}
<div class="row">
<div class="col-md-4">{{ twit[0] }}</div>
<div class="col-md-4">{{ twit[2] }}</div>
<div class="col-md-4"><a href='/edit_twit?id={{ twit[1] }}'> edit </a><a
href='/delete_twit?id={{ twit[1] }}'> delete </a></div>
</div>
{% endfor %}
</div>
{% endblock %}
{% extends "base.html" %}
{% block body %}
<div class="jumbotron">
{% for twit in twits %}
<div class="row">
<div class="col-md-4">{{ twit[0] }}</div>
<div class="col-md-4">{{ twit[2] }}</div>
<div class="col-md-4"><a href='/edit_twit?id={{ twit[1] }}'> edit </a><a
href='/delete_twit?id={{ twit[1] }}'> delete </a></div>
</div>
{% endfor %}
</div>
{% endblock %}
{% extends "base_8.html" %}
{% block body %}
<div class="jumbotron">
{% for twit in twits %}
<div class="row">
<div class="col-md-4">{{ twit[0] }}</div>
<div class="col-md-4">{{ twit[2] }}</div>
<div class="col-md-4"><a href='/edit_twit?id={{ twit[1] }}'> edit </a><a
href='/delete_twit?id={{ twit[1] }}'> delete </a></div>
</div>
{% endfor %}
</div>
{% endblock %}
{% extends "base_8.html" %}
{% block body %}
<div class="jumbotron">
{% for twit in twits %}
<div class="row">
<div class="col-md-4">{{ twit[0] }}</div>
<div class="col-md-4">{{ twit[2] }}</div>
<div class="col-md-4"><a href='/edit_twit?id={{ twit[1] }}'> edit </a><a
href='/delete_twit?id={{ twit[1] }}'> delete </a></div>
</div>
{% endfor %}
</div>
{% endblock %}
File added
from flask import url_for
URL_PREFIX = '/usr/253'
def vs_url_for(view):
url = url_for(view)
url = URL_PREFIX + url
return url
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment