Skip to content

Commit 5f86e08

Browse files
committed
first pass at adding the UI. Still needs jQuery and fix for assets
1 parent 6f4f2eb commit 5f86e08

File tree

4 files changed

+95
-1
lines changed

4 files changed

+95
-1
lines changed

hello/static/lang-logo.png

1.71 KB
Loading

hello/templates/base.html

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title>GettingStarted</title>
5+
<link rel="stylesheet" type="text/css" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css" />
6+
<script type="text/javascript" src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
7+
</head>
8+
<body>
9+
<nav class="navbar navbar-default navbar-static-top navbar-inverse">
10+
<div class="container">
11+
<ul class="nav navbar-nav">
12+
<li class="active">
13+
<a href="/"><span class="glyphicon glyphicon-home"></span> Home</a>
14+
</li>
15+
<li>
16+
<a href="https://devcenter.heroku.com/articles/how-heroku-works"><span class="glyphicon glyphicon-user"></span> How Heroku Works</a>
17+
</li>
18+
<li class="dropdown">
19+
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"><span class="glyphicon glyphicon-info-sign"></span> Getting Started Guides <span class="caret"></span></a>
20+
<ul class="dropdown-menu" role="menu">
21+
<li><a href="https://devcenter.heroku.com/articles/getting-started-with-ruby">Getting Started with Ruby on Heroku</a></li>
22+
<li><a href="https://devcenter.heroku.com/articles/getting-started-with-nodejs">Getting Started with Node on Heroku</a></li>
23+
<li><a href="https://devcenter.heroku.com/articles/getting-started-with-php">Getting Started with PHP on Heroku</a></li>
24+
<li><a href="https://devcenter.heroku.com/articles/getting-started-with-python">Getting Started with Python on Heroku</a></li>
25+
<li><a href="https://devcenter.heroku.com/articles/getting-started-with-java">Getting Started with Java on Heroku</a></li>
26+
<li><a href="https://devcenter.heroku.com/articles/getting-started-with-clojure">Getting Started with Clojure on Heroku</a></li>
27+
<li><a href="https://devcenter.heroku.com/articles/getting-started-with-scala">Getting Started with Scala on Heroku</a></li>
28+
<li class="divider"></li>
29+
<li><a href="https://devcenter.heroku.com/articles/getting-started-with-heroku-and-connect-without-local-dev">Getting Started on Heroku with Heroku Connect</a></li>
30+
<li><a href="https://devcenter.heroku.com/articles/getting-started-with-jruby">Getting Started with Ruby on Heroku (Microsoft Windows)</a></li>
31+
</ul>
32+
</li>
33+
</ul>
34+
<ul class="nav navbar-nav navbar-right">
35+
<li class="navbar-right">
36+
<a href="https://devcenter.heroku.com"><span class="glyphicon glyphicon-book"></span> Heroku Dev Center</a>
37+
</li>
38+
</ul>
39+
</div>
40+
</nav>
41+
42+
{% block content %}{% endblock %}
43+
44+
</body>
45+
</html>

hello/templates/index.html

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
{% extends "base.html" %}
2+
{% load staticfiles %}
3+
4+
{% block content %}
5+
6+
<div class="jumbotron text-center">
7+
<div class="container">
8+
<a href="/" class="lang-logo">
9+
<img src="{% static 'lang-logo.png'%}">
10+
</a>
11+
<h1>Getting Started with Python on Heroku</h1>
12+
<p>This is a sample Python application deployed to Heroku. It's a reasonably simple app - but a good foundation for understanding how to get the most out of the Heroku platform.</p>
13+
<a type="button" class="btn btn-lg btn-default" href="https://devcenter.heroku.com/articles/getting-started-with-ruby"><span class="glyphicon glyphicon-flash"></span> Getting Started with Python</a>
14+
<a type="button" class="btn btn-lg btn-primary" href="https://github.com/heroku/ruby-getting-started"><span class="glyphicon glyphicon-download"></span> Source on GitHub</a>
15+
</div>
16+
</div>
17+
<div class="container">
18+
<div class="alert alert-info text-center" role="alert">
19+
To deploy your own copy, and learn the fundamentals of the Heroku platform, head over to the <a href="https://devcenter.heroku.com/articles/getting-started-with-python" class="alert-link">Getting Started with Python on Heroku</a> tutorial.
20+
</div>
21+
<hr>
22+
<div class="row">
23+
<div class="col-md-6">
24+
<h3><span class="glyphicon glyphicon-info-sign"></span> How this sample app works</h3>
25+
<ul>
26+
<li>This app was deployed to Heroku, either using Git or by using <a href="https://github.com/heroku/python-getting-started">Heroku Button</a> on the repository.</li>
27+
28+
<li>When Heroku received the source code, it grabbed all the dependencies in the <a href="https://github.com/heroku/python-getting-started/blob/master/Gemfile">Gemfile</a>.</li>
29+
<li>The platform then spins up a dyno, a lightweight container that provides an isolated environment in which the slug can be mounted and executed.</li>
30+
<li>You can scale your app, manage it, and deploy over <a href="https://addons.heroku.com/">150 add-on services</a>, from the Dashboard or CLI.</li>
31+
<li>Check out the <a href="https://devcenter.heroku.com/articles/getting-started-with-python">Getting Started</a> guide to learn more!</li>
32+
</ul>
33+
</div>
34+
<div class="col-md-6">
35+
<h3><span class="glyphicon glyphicon-link"></span> Helpful Links</h3>
36+
<ul>
37+
<li><a href="https://www.heroku.com/home">Heroku</a></li>
38+
<li><a href="https://devcenter.heroku.com/">Heroku Dev Center</a></li>
39+
<li><a href="https://devcenter.heroku.com/articles/getting-started-with-python">Getting Started with Python on Heroku</a></li>
40+
<li><a href="https://devcenter.heroku.com/articles/django-app-configuration">Configuring Django Apps for Heroku</a></li>
41+
</ul>
42+
</div>
43+
</div> <!-- row -->
44+
<div class="alert alert-info text-center" role="alert">
45+
Please do work through the Getting Started guide, even if you do know how to build such an application. The guide covers the basics of working with Heroku, and will familiarize you with all the concepts you need in order to build and deploy your own apps.
46+
</div>
47+
</div>
48+
{% endblock %}

hello/views.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55

66
# Create your views here.
77
def index(request):
8-
return HttpResponse('Hello from Python!')
8+
# return HttpResponse('Hello from Python!')
9+
return render(request, 'index.html')
910

1011

1112
def db(request):

0 commit comments

Comments
 (0)