Rename follower_graph to graph_followers

Create graph_followers template
Add urlconf for graph_followers
Redirect use to followers view instead of just calling it
This commit is contained in:
Eryn Wells 2012-08-18 09:52:40 -07:00
parent 127ae209b1
commit 99f37ede03
3 changed files with 6 additions and 3 deletions

View file

@ -0,0 +1,2 @@
{# vim: set ft=htmldjango #}
{% extends "graph_base.html" %}

View file

@ -11,6 +11,7 @@ admin.autodiscover()
urlpatterns = patterns('',
url(r'^%s(?P<path>.*)$' % 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')),

View file

@ -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()
@ -30,5 +30,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))