Skip to content
Browse files

Some minor changes

  • Loading branch information...
1 parent 9683b26 commit 3209e02efdb1e51b278e2d201b688210af27d4ac @geaden committed Oct 10, 2012
View
2 SocialProjectTracking/main.py
@@ -79,7 +79,7 @@ def get(self):
if user:
self.redirect('/account')
else:
- self.render('index.html', user=user)
+ self.render('index.html', appid=FACEBOOK_APP_ID)
class UserPage(MainHandler):
View
27 SocialProjectTracking/templates/base.html
@@ -1,29 +1,10 @@
-<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-US"
- <html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://ogp.me/ns/fb#">
+<!DOCTYPE html>
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US" xmlns:fb="http://ogp.me/ns/fb#">
<head>
- <title>Social Project Tracking</title>
+ <title>Social Project Tracking | {% block title %}{% endblock %}</title>
</head>
<body>
- <div id="fb-root"></div>
- <script>
- window.fbAsyncInit = function() {
- FB.init({
- appId : '531630580186665', // App ID
- status : true, // check login status
- cookie : true, // enable cookies to allow the server to access the session
- xfbml : true // parse XFBML
- });
- };
-
- // Load the SDK Asynchronously
- (function(d){
- var js, id = 'facebook-jssdk'; if (d.getElementById(id)) {return;}
- js = d.createElement('script'); js.id = id; js.async = true;
- js.src = "//connect.facebook.net/en_US/all.js";
- d.getElementsByTagName('head')[0].appendChild(js);
- }(document));
- </script>
- {% block content %}{% endblock %}
+ {% block content %}{% endblock %}
</body>
</html>
View
22 SocialProjectTracking/templates/index.html
@@ -1,7 +1,27 @@
{% extends "base.html" %}
+{% block title %}Main page{% endblock %}
{% block content %}
+ <div id="fb-root"></div>
+ <script>
+ window.fbAsyncInit = function() {
+ FB.init({
+ appId : '{{ appid }}', // App ID
+ status : true, // check login status
+ cookie : true, // enable cookies to allow the server to access the session
+ xfbml : true // parse XFBML
+ });
+ };
+
+ // Load the SDK Asynchronously
+ (function(d){
+ var js, id = 'facebook-jssdk'; if (d.getElementById(id)) {return;}
+ js = d.createElement('script'); js.id = id; js.async = true;
+ js.src = "//connect.facebook.net/en_US/all.js";
+ d.getElementsByTagName('head')[0].appendChild(js);
+ }(document));
+ </script>
{{ user }}
- <fb:login-button autologoutlink="true" show-faces="true" width="200" max-rows="1" scope="publish_actions">
+ <fb:login-button autologoutlink="true" show-faces="true" width="200" max-rows="1" scope="email,user_checkins,publish_actions">
</fb:login-button>
{% endblock %}

0 comments on commit 3209e02

Please sign in to comment.
Something went wrong with that request. Please try again.