Allan Davis avatar Allan Davis committed 83979f1

Broke index into base template

Comments (0)

Files changed (5)

 # switch to regexp syntax.
-syntax: regexp
-^\.pyc/
-^\.db/
+syntax: glob
+*.pyc
+*.db
 
 # Create your views here.
+from django.shortcuts import render_to_response
 
 def index(request):
+    return render_to_response("index.html", {})
+
+def checkout(request):
     pass
 
-def sign_donation(request):
-    pass
-
-def process_doantion(request):
+def process(request):
     pass

templates/base.html

+<html lang="en">
+<head>
+	<title>{% block title %}Pixels for Food{% endblock %}</title>
+	<meta name="keywords" content="food, donations, food drive, virtual food drive" />
+	<meta name="description" content="Buy food for people who need it." />
+	<link href='includes/css/FFOP.css' rel='stylesheet' type='text/css' media='all'>		
+	<link rel="icon" href="faviconFFOP.ico" />
+	
+	<script type="text/javascript" src="/js/nav.js"></script>
+
+	<script type="text/javascript" src="/js/jquery-1.2.3.pack.js"></script>
+	<script type="text/javascript" src="jquery.easynews.plus.js"></script>
+	
+  <script language='javascript' type='text/javascript' src='includes/js/jquery-1.2.6.min.js'></script>
+  <script language='javascript' type='text/javascript' src='includes/js/jquery-ui-personalized-1.6rc4.min.js'></script>   	
+	
+
+{% block header%}
+{% endblock %}
+</head>
+<body>
+    <div id="toptopBar">
+<div id="toptopBar_Content">
+<p>
+  <a href="javascript:void(0)" onClick="goToByScroll('about')">ABOUT</a> | 
+  <a href="javascript:void(0)" onClick="goToByScroll('faq')">FAQ</a> | 
+  <a href="#contact">CONTACT</a></p>
+
+</div>
+</div>
+<div id="topBar">
+<div id="topBar_Content">
+<a href="/" id="rollover2"><span>Pixels For Food</span></a>
+<a href="/" id="rollover1"><span>Directions</span></a>
+</div>
+</div>
+
+<div id="middleBar">
+<div id="middleBar_Content">
+<h3>You are donating <span id="poundTotal">0</span> lbs of food worth $<span id="total">0.00</span></h3>
+</div>
+</div>
+
+{% block content %}
+{% endblock %}
+<div id="bottombottomBar">
+<div id="bottombottomBar_Content">
+
+<div id="who">
+<a href="http://www.ccstb.org" id="rollover4"><span>Community Center of St Bernard</span></a>
+<a href="http://www.robobilly.com/lightningface" id="rollover5"><span>Lightning Face</span></a>
+
+</div>
+
+<div id="about">
+<img style="float:left; margin: 0px 6px 0px 0px;" src="includes/img/about.png" width="141" alt="about">
+<p>I work at a <a href="http://www.ccstb.org">food pantry outside of New Orleans</a> through a program called the <a href="http://www.digitalartscorps.org">Digital Arts Service Corps</a> (basically AmeriCorps for geeks). I wanted to make an easy, fun way to help fund hunger organizations - and this website was the result. If you have any questions, ideas, or criticisms feel free to send me an <a href="mailto:billybrown00@gmail.com">email</a>. Thanks!</p>
+
+</div>
+<div id="faq">
+<img style="float:left; margin: 0px 6px 0px 0px;" src="includes/img/faq.png" width="81" alt="about">
+<p><strong>Where does my donation go exactly?</strong></p>
+<p style="padding: 0px 0px 5px 0px;">Every month we choose a different hunger charity to donate to and 100% of all donations go towards that charity.</p>
+<p><strong>Does the Nonprofit actually buy the food I select?</strong></p>
+<p style="padding: 0px 0px 5px 0px;">No, the food on this website is symbolic. The nonprofit itself probably has a better idea of what food is needed at a certain time, so the donation is made as a lump sum.</p>
+<p><strong>Where did you get the food prices?</strong></p>
+<p style="padding: 0px 0px 5px 0px;">Most hunger organizations buy discounted surplus food from wholesalers, and these prices reflect that.</p>
+</div>
+</div>
+
+</div>
+</body>
+</html>

templates/index.html

-<head>
-	<title>Pixels for Food</title>
-	<meta name="keywords" content="food, donations, food drive, virtual food drive" />
-	<meta name="description" content="Buy food for people who need it." />
-	<link href='includes/css/FFOP.css' rel='stylesheet' type='text/css' media='all'>		
-	<link rel="icon" href="faviconFFOP.ico" />
-	
-	<script type="text/javascript" src="/js/nav.js"></script>
-
-	<script type="text/javascript" src="/js/jquery-1.2.3.pack.js"></script>
-	<script type="text/javascript" src="jquery.easynews.plus.js"></script>
-	
-  <script language='javascript' type='text/javascript' src='includes/js/jquery-1.2.6.min.js'></script>
-  <script language='javascript' type='text/javascript' src='includes/js/jquery-ui-personalized-1.6rc4.min.js'></script>   	
-	
+{% extends "base.html" %}
+{%block header%}	
   <script language="javascript" type="text/javascript">
         var total = 0;  
         var totalPounds = 0;     
 }
 //-->
 </SCRIPT>
+{%endblock%}
 
-</head>
-
-<body>
-<div id="toptopBar">
-<div id="toptopBar_Content">
-<p>
-  <a href="javascript:void(0)" onClick="goToByScroll('about')">ABOUT</a> | 
-  <a href="javascript:void(0)" onClick="goToByScroll('faq')">FAQ</a> | 
-  <a href="#contact">CONTACT</a></p>
-
-</div>
-</div>
-<div id="topBar">
-<div id="topBar_Content">
-<a href="/" id="rollover2"><span>Pixels For Food</span></a>
-<a href="/" id="rollover1"><span>Directions</span></a>
-</div>
-</div>
-
-<div id="middleBar">
-<div id="middleBar_Content">
-<h3>You are donating <span id="poundTotal">0</span> lbs of food worth $<span id="total">0.00</span></h3>
-</div>
-</div>
-
+{% block content%}
 <div id="content">
 
 <div id="bagAndItems">     
 </div>
 </div>
 
-<div id="bottombottomBar">
-<div id="bottombottomBar_Content">
-
-<div id="who">
-<a href="http://www.ccstb.org" id="rollover4"><span>Community Center of St Bernard</span></a>
-<a href="http://www.robobilly.com/lightningface" id="rollover5"><span>Lightning Face</span></a>
-
-</div>
-
-<div id="about">
-<img style="float:left; margin: 0px 6px 0px 0px;" src="includes/img/about.png" width="141" alt="about">
-<p>I work at a <a href="http://www.ccstb.org">food pantry outside of New Orleans</a> through a program called the <a href="http://www.digitalartscorps.org">Digital Arts Service Corps</a> (basically AmeriCorps for geeks). I wanted to make an easy, fun way to help fund hunger organizations - and this website was the result. If you have any questions, ideas, or criticisms feel free to send me an <a href="mailto:billybrown00@gmail.com">email</a>. Thanks!</p>
-
-</div>
-<div id="faq">
-<img style="float:left; margin: 0px 6px 0px 0px;" src="includes/img/faq.png" width="81" alt="about">
-<p><strong>Where does my donation go exactly?</strong></p>
-<p style="padding: 0px 0px 5px 0px;">Every month we choose a different hunger charity to donate to and 100% of all donations go towards that charity.</p>
-<p><strong>Does the Nonprofit actually buy the food I select?</strong></p>
-<p style="padding: 0px 0px 5px 0px;">No, the food on this website is symbolic. The nonprofit itself probably has a better idea of what food is needed at a certain time, so the donation is made as a lump sum.</p>
-<p><strong>Where did you get the food prices?</strong></p>
-<p style="padding: 0px 0px 5px 0px;">Most hunger organizations buy discounted surplus food from wholesalers, and these prices reflect that.</p>
-</div>
-</div>
-
-</div>
-
-
-</body>
+{%endblock%}
 from django.contrib import admin
 admin.autodiscover()
 
+
 urlpatterns = patterns('',
     # Example:
     # (r'^pixels_for_food/', include('pixels_for_food.foo.urls')),
+    (r'^includes/(?P<path>.*)$', 'django.views.static.serve',{'document_root': 'includes'}),
 
     # Uncomment the admin/doc line below and add 'django.contrib.admindocs' 
     # to INSTALLED_APPS to enable admin documentation:
     # (r'^admin/doc/', include('django.contrib.admindocs.urls')),
 
     # Uncomment the next line to enable the admin:
-    (r'^admin/', include(admin.site.urls)),
+    (r'^admin/', include(admin.site.urls)),    
+    (r'^checkout/', 'pixels.views.checkout'),
+    (r'^process/', 'pixels.views.process'),
+    (r'^', 'pixels.views.index'),
 )
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.