Permalink
Browse files

Styling updates; add pages.

  • Loading branch information...
1 parent 59e83d9 commit aeda83f2a20c5706a16389f2dad4cd044141b0d3 @anthonydb committed Mar 4, 2012
Showing with 47 additions and 1 deletion.
  1. +12 −0 apis/templates/404.html
  2. +18 −0 apis/templates/apibase.html
  3. +12 −0 apis/templates/apihome.html
  4. +2 −1 apis/urls.py
  5. +3 −0 apis/views.py
@@ -0,0 +1,12 @@
+{% extends "base.html" %}
+
+{% block title %}{% endblock %}
+
+
+{% block content %}
+ <h1>anthonydb.com<h1>
+ <div id="main">
+ 404!!<br/>
+ </div>
+
+{% endblock %}
@@ -0,0 +1,18 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en">
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+ <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}api.css" />
+ <link href='http://fonts.googleapis.com/css?family=Ubuntu+Condensed' rel='stylesheet' type='text/css'>
+ <title>anthonydb.com {% block title %}{% endblock %}</title>
+ <meta name="description" content="The web development sandbox of Anthony DeBarros.">
+</head>
+<body>
+ <div id="container">
+ {% block content %}
+ {% endblock %}
+ </div>
+
+</body>
+</html>
@@ -0,0 +1,12 @@
+{% extends "apibase.html" %}
+
+{% block title %}| APIs{% endblock %}
+
+
+{% block content %}
+ <div id="main">
+ <h2>APIs</h2>
+ <a href="http://www.anthonydb.com/apis/books/">Best-Selling Books API</a>
+ </div>
+
+{% endblock %}
View
@@ -1,10 +1,11 @@
from django.conf.urls.defaults import patterns, include, url
-from apis.views import BookListAPIView
+from apis.views import BookListAPIView, APIHomeView
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
url(r'^books/', BookListAPIView, name='books'),
+ url(r'^$', APIHomeView.as_view()),
)
View
@@ -5,6 +5,9 @@
import json
from keys import *
+class APIHomeView(TemplateView):
+ template_name = 'apihome.html'
+
def BookListAPIView(request):
top_list = []
url = 'http://api.usatoday.com/open/bestsellers/books/booklists/2012/02/09/?api_key=' + BOOK_KEY + '&encoding=json'

0 comments on commit aeda83f

Please sign in to comment.