1. Andres Vargas
  2. fartapp

Commits

Andres Vargas  committed bb10ca9

update templates and settings

  • Participants
  • Parent commits 9ef930d
  • Branches master

Comments (0)

Files changed (6)

File .gitignore

View file
  • Ignore whitespace
+*.pyc
+.*.sw*
+*.db

File fartapp/context_processor.py

View file
  • Ignore whitespace
+from django.contrib.sites.models import get_current_site
+from django.conf import settings
+
+def default(request):
+    return {
+        'SITE':get_current_site(request),
+        'FACEBOOK_ID':settings.FACEBOOK_ID,
+        'FACEBOOK_SECRET_KEY':settings.FACEBOOK_SECRET_KEY,
+        'FACEBOOK_NAMESPACE':settings.FACEBOOK_NAMESPACE,
+    }

File fartapp/settings.py

View file
  • Ignore whitespace
     # 'django.middleware.clickjacking.XFrameOptionsMiddleware',
 )
 
+from django.conf import TEMPLATE_CONTEXT_PROCESSORS
+
+TEMPLATE_CONTEXT_PROCESSORS += ('context_processor.default',) 
+
+
 ROOT_URLCONF = 'fartapp.urls'
 
 # Python dotted path to the WSGI application used by Django's runserver.
     'django.contrib.sites',
     'django.contrib.messages',
     'django.contrib.staticfiles',
-     'django.contrib.admin',
+    'django.contrib.admin',
+    'south',
 )
 
 # A sample logging configuration. The only tangible logging
         },
     }
 }
+
+FACEBOOK_API_KEY= ''
+FACEBOOK_ID= FACEBOOK_API_KEY
+FACEBOOK_SECRET_KEY = ''
+FACEBOOK_NAMESPACE = ''
+

File fartapp/templates/base.html

View file
  • Ignore whitespace
 
   <body>
 
-    <div class="navbar navbar-inverse navbar-fixed-top">
-      <div class="navbar-inner">
-        <div class="container">
-          <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
-            <span class="icon-bar"></span>
-            <span class="icon-bar"></span>
-            <span class="icon-bar"></span>
-          </a>
-          <a class="brand" href="#">Project name</a>
-          <div class="nav-collapse collapse">
-            <ul class="nav">
-              <li class="active"><a href="#">Home</a></li>
-              <li><a href="#about">About</a></li>
-              <li><a href="#contact">Contact</a></li>
-            </ul>
-          </div><!--/.nav-collapse -->
-        </div>
-      </div>
-    </div>
 
     <div class="container">
 
-      <h1>Bootstrap starter template</h1>
-      <p>Use this document as a way to quick start any new project.<br> All you get is this message and a barebones HTML document.</p>
+<div class="row">
+    <div class="span2">
+      <!--content-->
+    </div>
+    <div class="span8">
+      {%block content %}
+      {% endblock %}
+    </div>
+    <div class="span2">
+      <!--content-->
+    </div>
+  </div>
+
 
     </div> <!-- /container -->
   </body>

File fartapp/templates/index.html

View file
  • Ignore whitespace
+{% extends 'base.html'%}
+{%block content %}
+
+
+
+      <h1>Bootstrap starter template</h1>
+      <p>Use this document as a way to quick start any new project.<br> All you get is this message and a barebones HTML document.</p>
+
+{% endblock %}

File fartapp/views.py

View file
  • Ignore whitespace
 from django.views import generic
 
 class Base(generic.TemplateView):
-    template_name = "base.html"
-
+    template_name = "index.html"
 
 index = Base.as_view()