diff --git a/templates/graph_followers.html b/templates/graph_followers.html new file mode 100644 index 0000000..8252d3b --- /dev/null +++ b/templates/graph_followers.html @@ -0,0 +1,2 @@ +{# vim: set ft=htmldjango #} +{% extends "graph_base.html" %} diff --git a/urls.py b/urls.py index 00f6c56..44491e3 100644 --- a/urls.py +++ b/urls.py @@ -11,6 +11,7 @@ admin.autodiscover() urlpatterns = patterns('', url(r'^%s(?P.*)$' % re.escape(settings.STATIC_URL.lstrip('/')), 'django.contrib.staticfiles.views.serve', {'insecure': True}), url(r'^admin/', include(admin.site.urls)), + url(r'^followers/', views.graph_followers, name='followers'), url(r'^login/$', views.login, name='login'), url(r'^$', views.index, name='index'), url(r'', include('social_auth.urls')), diff --git a/views.py b/views.py index 6ca9d32..fdb9e1c 100644 --- a/views.py +++ b/views.py @@ -9,7 +9,7 @@ def index(request): have a session id) return the follower_graph view. Otherwise, render the index page.''' if request.user.is_authenticated(): - return follower_graph(request) + return redirect('followers') # Set a test cookie. When the user clicks the 'Login' button, test and make # sure this cookie was set properly. request.session.set_test_cookie() @@ -34,5 +34,5 @@ def login(request): @login_required -def follower_graph(request): - return render_to_response('graph.html', RequestContext(request)) +def graph_followers(request): + return render_to_response('graph_followers.html', RequestContext(request))