integrated responder framework
This commit is contained in:
		
							
								
								
									
										51
									
								
								templates/home/index.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										51
									
								
								templates/home/index.html
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,51 @@
 | 
			
		||||
{% extends "/shared/_layout.html" %}
 | 
			
		||||
 | 
			
		||||
{% block content %}
 | 
			
		||||
 | 
			
		||||
        <div class="content">
 | 
			
		||||
            <h1><span class="font-semi-bold">Gambling Foo</span> <span class="smaller">A RESTful gaming service</span></h1>
 | 
			
		||||
            <p class="lead">
 | 
			
		||||
                Play a nice game of cards?<br>
 | 
			
		||||
                <br>
 | 
			
		||||
                <strong>Endpoints</strong>
 | 
			
		||||
            <ul>
 | 
			
		||||
                <li>
 | 
			
		||||
                    <strong>Shuffle Card Deck</strong><br>
 | 
			
		||||
                    <a href="/api/shuffle">GET /api/shuffle</a>
 | 
			
		||||
                </li>
 | 
			
		||||
                <li>
 | 
			
		||||
                    <strong>Movies by director</strong><br>
 | 
			
		||||
                    <a href="/api/director/cameron">GET /api/director/{director_name}</a>
 | 
			
		||||
                </li>
 | 
			
		||||
<!--
 | 
			
		||||
                <li>
 | 
			
		||||
                    <strong>Movie by IMDB code</strong><br>
 | 
			
		||||
                    <a href="/api/movie/tt0096754">GET /api/movie/{imdb_number}</a>
 | 
			
		||||
                </li>
 | 
			
		||||
                <li>
 | 
			
		||||
                    <strong>Top 10 Movies (by IMDB score)</strong><br>
 | 
			
		||||
                    <a href="/api/movie/top">GET /api/movie/top</a>
 | 
			
		||||
                </li>
 | 
			
		||||
                <li>
 | 
			
		||||
                    <strong>All genres</strong><br>
 | 
			
		||||
                    <a href="/api/movie/genre/all">GET /api/movie/genre/all</a>
 | 
			
		||||
                </li>
 | 
			
		||||
                <li>
 | 
			
		||||
                    <strong>Top movies for a given genres</strong><br>
 | 
			
		||||
                    <a href="/api/movie/genre/sci-fi">GET /api/movie/genre/{genre}</a>
 | 
			
		||||
                </li>
 | 
			
		||||
-->
 | 
			
		||||
            </ul>
 | 
			
		||||
            </p>
 | 
			
		||||
 | 
			
		||||
            <p class="disclaimer">
 | 
			
		||||
                Spam Bacon Sausage + Spam
 | 
			
		||||
                Spam Spam Spam Spam Spam
 | 
			
		||||
                  Spam Baked Beans Spam
 | 
			
		||||
                  Spam Spam + Spam
 | 
			
		||||
 | 
			
		||||
            </p>
 | 
			
		||||
        </div>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
{% endblock %}
 | 
			
		||||
							
								
								
									
										50
									
								
								templates/home/player.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										50
									
								
								templates/home/player.html
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,50 @@
 | 
			
		||||
{% extends "/shared/_layout.html" %}
 | 
			
		||||
 | 
			
		||||
{% block content %}
 | 
			
		||||
 | 
			
		||||
        <div class="content">
 | 
			
		||||
            <h1><span class="font-semi-bold">Gambling Foo</span> <span class="smaller">A RESTful gaming service</span></h1>
 | 
			
		||||
            <p class="lead">
 | 
			
		||||
                Play a nice game of cards?<br>
 | 
			
		||||
                <br>
 | 
			
		||||
                <strong>Player {{player}} view</strong>
 | 
			
		||||
            <table style="width:100%">
 | 
			
		||||
                <tr>
 | 
			
		||||
                {% for card in cards %}
 | 
			
		||||
                    <li>
 | 
			
		||||
                        <strong>>card {{loop.index}} is: {{card}} </strong><br>
 | 
			
		||||
                    </li>
 | 
			
		||||
                {% endfor %}
 | 
			
		||||
                    
 | 
			
		||||
<!--
 | 
			
		||||
                <li>
 | 
			
		||||
                    <strong>Movie by IMDB code</strong><br>
 | 
			
		||||
                    <a href="/api/movie/tt0096754">GET /api/movie/{imdb_number}</a>
 | 
			
		||||
                </li>
 | 
			
		||||
                <li>
 | 
			
		||||
                    <strong>Top 10 Movies (by IMDB score)</strong><br>
 | 
			
		||||
                    <a href="/api/movie/top">GET /api/movie/top</a>
 | 
			
		||||
                </li>
 | 
			
		||||
                <li>
 | 
			
		||||
                    <strong>All genres</strong><br>
 | 
			
		||||
                    <a href="/api/movie/genre/all">GET /api/movie/genre/all</a>
 | 
			
		||||
                </li>
 | 
			
		||||
                <li>
 | 
			
		||||
                    <strong>Top movies for a given genres</strong><br>
 | 
			
		||||
                    <a href="/api/movie/genre/sci-fi">GET /api/movie/genre/{genre}</a>
 | 
			
		||||
                </li>
 | 
			
		||||
-->
 | 
			
		||||
            </table>
 | 
			
		||||
            </p>
 | 
			
		||||
 | 
			
		||||
            <p class="disclaimer">
 | 
			
		||||
                Spam Bacon Sausage + Spam
 | 
			
		||||
                Spam Spam Spam Spam Spam
 | 
			
		||||
                  Spam Baked Beans Spam
 | 
			
		||||
                  Spam Spam + Spam
 | 
			
		||||
 | 
			
		||||
            </p>
 | 
			
		||||
        </div>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
{% endblock %}
 | 
			
		||||
							
								
								
									
										64
									
								
								templates/shared/_layout.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										64
									
								
								templates/shared/_layout.html
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,64 @@
 | 
			
		||||
<!DOCTYPE html>
 | 
			
		||||
<html >
 | 
			
		||||
<head>
 | 
			
		||||
    <meta charset="utf-8">
 | 
			
		||||
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
 | 
			
		||||
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
 | 
			
		||||
    <meta name="description" content="pyramid web application">
 | 
			
		||||
    <meta name="author" content="Pylons Project">
 | 
			
		||||
 | 
			
		||||
    <title>MovieDB Service</title>
 | 
			
		||||
 | 
			
		||||
    <!-- Bootstrap core CSS -->
 | 
			
		||||
    <link href="//oss.maxcdn.com/libs/twitter-bootstrap/3.0.3/css/bootstrap.min.css" rel="stylesheet">
 | 
			
		||||
 | 
			
		||||
    <!-- Custom styles for this scaffold -->
 | 
			
		||||
    <link href="/css/theme.css" rel="stylesheet">
 | 
			
		||||
    <link href="/css/docs.css" rel="stylesheet">
 | 
			
		||||
 | 
			
		||||
    <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
 | 
			
		||||
    <!--[if lt IE 9]>
 | 
			
		||||
    <script src="//oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
 | 
			
		||||
    <script src="//oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
 | 
			
		||||
    <![endif]-->
 | 
			
		||||
</head>
 | 
			
		||||
 | 
			
		||||
<body>
 | 
			
		||||
 | 
			
		||||
<div class="starter-template">
 | 
			
		||||
    <div class="container">
 | 
			
		||||
        <div class="row">
 | 
			
		||||
            <div class="col-md-2">
 | 
			
		||||
            </div>
 | 
			
		||||
            <div class="col-md-10">
 | 
			
		||||
                <div>{% block content %}{% endblock %}</div>
 | 
			
		||||
            </div>
 | 
			
		||||
        </div>
 | 
			
		||||
        <div class="row">
 | 
			
		||||
            <div class="links">
 | 
			
		||||
                <ul>
 | 
			
		||||
                    <li><i class="glyphicon glyphicon-cog icon-muted"></i><a
 | 
			
		||||
                            href="https://github.com/mikeckennedy/python-jumpstart-course-demos"
 | 
			
		||||
                            target="_blank">Github Project</a></li>
 | 
			
		||||
                    <li><i class="glyphicon glyphicon-globe icon-muted"></i><a href="https://twitter.com/talkpython"
 | 
			
		||||
                                                                               target="_blank">Twitter</a>
 | 
			
		||||
                    </li>
 | 
			
		||||
                </ul>
 | 
			
		||||
            </div>
 | 
			
		||||
        </div>
 | 
			
		||||
        <div class="row">
 | 
			
		||||
            <div class="copyright">
 | 
			
		||||
                Copyright © Talk Python Training
 | 
			
		||||
            </div>
 | 
			
		||||
        </div>
 | 
			
		||||
    </div>
 | 
			
		||||
</div>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
<!-- Bootstrap core JavaScript
 | 
			
		||||
================================================== -->
 | 
			
		||||
<!-- Placed at the end of the document so the pages load faster -->
 | 
			
		||||
<script src="//oss.maxcdn.com/libs/jquery/1.10.2/jquery.min.js"></script>
 | 
			
		||||
<script src="//oss.maxcdn.com/libs/twitter-bootstrap/3.0.3/js/bootstrap.min.js"></script>
 | 
			
		||||
</body>
 | 
			
		||||
</html>
 | 
			
		||||
		Reference in New Issue
	
	Block a user