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:
parent
068403f81f
commit
2184fab678
3 changed files with 6 additions and 3 deletions
2
templates/graph_followers.html
Normal file
2
templates/graph_followers.html
Normal file
|
@ -0,0 +1,2 @@
|
|||
{# vim: set ft=htmldjango #}
|
||||
{% extends "graph_base.html" %}
|
1
urls.py
1
urls.py
|
@ -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')),
|
||||
|
|
6
views.py
6
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))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue