moved template dirs; created urls / views for pages

This commit is contained in:
Sanj 2011-10-13 16:02:33 +05:30
commit 54c382f1d5
16 changed files with 361 additions and 142 deletions

2
README
View File

@ -1,4 +1,4 @@
mofca
mofca
Get:
bzr branch PUBLIC_URL mofca

1
mofca/local_settings.py Normal file
View File

@ -0,0 +1 @@
LOCAL_DEVELOPMENT = True

View File

3
mofca/organic/models.py Normal file
View File

@ -0,0 +1,3 @@
from django.db import models
# Create your models here.

23
mofca/organic/tests.py Normal file
View File

@ -0,0 +1,23 @@
"""
This file demonstrates two different styles of tests (one doctest and one
unittest). These will both pass when you run "manage.py test".
Replace these with more appropriate tests for your application.
"""
from django.test import TestCase
class SimpleTest(TestCase):
def test_basic_addition(self):
"""
Tests that 1 + 1 always equals 2.
"""
self.failUnlessEqual(1 + 1, 2)
__test__ = {"doctest": """
Another way to test that 1 + 1 is equal to 2.
>>> 1 + 1 == 2
True
"""}

17
mofca/organic/views.py Normal file
View File

@ -0,0 +1,17 @@
# Create your views here.
from django.shortcuts import render_to_response
def index(request):
return render_to_response("index.html")
def hbt(request):
return render_to_response("hbt.html")
def pickup(request):
return render_to_response("pickup.html")
def seasons_veggies(request):
return render_to_response("seasons_veggies.html")
def meet_farmers(request):
return render_to_response("meet_farmers.html")

View File

@ -1,9 +1,9 @@
# Create your views here.
from django.http import HttpResponseRedirect
from django.shortcuts import render_to_response
def index(request):
return HttpResponseRedirect("http://blog.mofca.in")
def test(request):
return render_to_response("test/index.html", {})
# Create your views here.
from django.http import HttpResponseRedirect
from django.shortcuts import render_to_response
def index(request):
return render_to_response("test/index.html", {})
def test(request):
return render_to_response("test/index.html", {})

View File

@ -99,6 +99,7 @@ INSTALLED_APPS = (
'django.contrib.messages',
'django_extensions',
'recipes',
'organic',
# Uncomment the next line to enable the admin:
'django.contrib.admin',
# Uncomment the next line to enable admin documentation:

90
mofca/static/css/home.css Normal file
View File

@ -0,0 +1,90 @@
#col1 hgroup
{text-align:left;
margin-left:0px;}
#col1 hgroup h1
{font-size:72px;
background-color:rgba(254, 254, 254, 0.4);
padding-left:10px;
padding-right:10px;
display:inline-block;} /*is this ok*/
#col1 hgroup h2
{font-size:24px;
line-height:28px;
border-left:10px solid rgba(254, 254, 254, 0.4);
} /*why doesn't padding work here? because it's inline?*/
#col1 hgroup h2 span
{background-color:rgba(254, 254, 254, 0.4);}
hgroup h3
{font-size:24px;
background-color:rgba(254, 254, 254, 0.4);
margin-top:24px;
padding:6px;
display:inline-block;}
#basket
{margin-left:0px;
margin-top:20px;
position:relative;}
#basketBottom
{position:absolute;
top:130px;
z-index:50;}
#basketTop
{position:absolute;
top:236px;
left:10px;
z-index:100;}
#basketRecipe
{position:absolute;
top:80px;
left:340px;
z-index:60;
color:#b4131b;
cursor:pointer;} /*COMES FROM THE BACKEND, please change*/
#featuredRecipe
{font-size:12px;
position:absolute;
top:40px;
left:35px;
z-index:60;
padding-bottom:6px;
border-bottom:1px solid #b4131b;
-webkit-transform: rotate(-6deg);
-moz-transform: rotate(-6deg);
transform: rotate(-6deg);}
#recipeName
{font-size:20px;
position:absolute;
top:68px;
left:68px;
z-index:60;
-webkit-transform: rotate(-6deg);
-moz-transform: rotate(-6deg);}
#vegLeft
{position:absolute;
top:160px;
left:70px;
z-index:80;}
#vegCenter
{position:absolute;
top:150px;
left:200px;
z-index:70;}
#vegRight
{position:absolute;
top:0px;
left:490px;
z-index:80;}

View File

@ -0,0 +1,12 @@
.colInner
{width:98%;
margin:0 auto;
background-color:rgba(254, 254, 254, 0.4);
padding:2%;}
.colInner h1
{font-size:18px;
font-weight:bold;}
.boldText
{font-weight:bold;}

View File

@ -9,12 +9,20 @@ body
background-attachment:fixed;
font-family:Georgia, "Times New Roman", Times, serif;} /*font squirrel font to be added*/
.wrapper
{min-height:100%;}
#wrapper
{min-height:100%;
width:86%;
margin:0 auto;}
header
{width:100%;
margin:0 auto;
height:80px;}
#logo
{margin-top:24px;
margin-left:20px;} /*this is taking the top margin of nav. because it's inline? display:block dont work*/
{position:absolute;
top:22px;
left:20px;} /*this is taking the top margin of nav. because it's inline? display:block dont work*/
.navMain
{position:absolute;
@ -77,17 +85,45 @@ background:-o-linear-gradient(top, rgba(12,77,137,1) 0%,rgba(84,117,54,1) 100%);
background:-ms-linear-gradient(top, rgba(12,77,137,1) 0%,rgba(84,117,54,1) 100%); /* IE10+ */
background: linear-gradient(top, rgba(12,77,137,1) 0%,rgba(84,117,54,1) 100%); /* W3C */}
#search
{width:240px;
border:none;
height:30px;
/*position:absolute;
right:12px;
top:22px;*/
-moz-box-shadow: rgba(0,0,0, 0.3) 0px 0px 8px;
-webkit-box-shadow: rgba(0,0,0, 0.3) 0px 0px 8px;
box-shadow: rgba(0,0,0, 0.3) 0px 0px 8px;
background-color:rgba(254, 254, 254, 0.4);
font-family:Arial, Helvetica, 'DejaVu Sans', sans-serif;
font-size:14px;
text-align:center;
float:right;
margin-top:40px;
outline:none;
/*position:absolute;
top:38px;
right:20px;*/} /*placeholder input text supported by html5 for FF3.7 and webkit, add a shiv? also*/
#search:focus
{-moz-box-shadow: rgba(0,0,0, 0.3) 0px 0px 8px;
-webkit-box-shadow: rgba(0,0,0, 0.3) 0px 0px 8px;
box-shadow: rgba(0,0,0, 0.3) 2px 3px 10px 2px;}
.clear
{clear:both;}
#columns
{width:86%;
{width:100%;
margin:0 auto;
color:#547536;
margin-top:28px;
overflow:hidden;
/*overflow-y:auto; i had to do this for sticky footer to fix a damn FF bug that was showing horizontal scrollbar on footer, i hope its ok, i'mnot sure if IE 6 accepts overflow-x hidden, the question is, do we care*/
padding-bottom:120px;}
padding-bottom:120px;
margin-bottom:20px;}
#col1
{width:65%;
@ -97,96 +133,6 @@ margin-right:10px;
float:left;
z-index:130;}
#col1 hgroup
{text-align:left;
margin-left:0px;}
#col1 hgroup h1
{font-size:72px;
background-color:rgba(254, 254, 254, 0.4);
padding-left:10px;
padding-right:10px;
display:inline-block;} /*is this ok*/
#col1 hgroup h2
{font-size:24px;
line-height:28px;
border-left:10px solid rgba(254, 254, 254, 0.4);
} /*why doesn't padding work here? because it's inline?*/
#col1 hgroup h2 span
{background-color:rgba(254, 254, 254, 0.4);}
hgroup h3
{font-size:24px;
background-color:rgba(254, 254, 254, 0.4);
margin-top:24px;
padding:6px;
display:inline-block;}
#basket
{margin-left:0px;
margin-top:20px;
position:relative;}
#basketBottom
{position:absolute;
top:130px;
z-index:50;}
#basketTop
{position:absolute;
top:236px;
left:10px;
z-index:100;}
#basketRecipe
{position:absolute;
top:80px;
left:340px;
z-index:60;
color:#b4131b;
cursor:pointer;} /*COMES FROM THE BACKEND, please change*/
#featuredRecipe
{font-size:12px;
position:absolute;
top:40px;
left:35px;
z-index:60;
padding-bottom:6px;
border-bottom:1px solid #b4131b;
-webkit-transform: rotate(-6deg);
-moz-transform: rotate(-6deg);
transform: rotate(-6deg);}
#recipeName
{font-size:20px;
position:absolute;
top:68px;
left:68px;
z-index:60;
-webkit-transform: rotate(-6deg);
-moz-transform: rotate(-6deg);}
#vegLeft
{position:absolute;
top:160px;
left:70px;
z-index:80;}
#vegCenter
{position:absolute;
top:150px;
left:200px;
z-index:70;}
#vegRight
{position:absolute;
top:0px;
left:490px;
z-index:80;}
#col2
{width:300px;
float:right;
@ -231,10 +177,9 @@ margin-top:10px;
cursor:pointer;}
.input
{width:180px;
-moz-box-shadow: rgba(0,0,0, 0.3) 0px 0px 8px;
{-moz-box-shadow: rgba(0,0,0, 0.3) 0px 0px 8px;
-webkit-box-shadow: rgba(0,0,0, 0.3) 0px 0px 8px;
box-shadow: rgba(0,0,0, 0.3) 0px 0px 8px 3px;
box-shadow: rgba(0,0,0, 0.3) 0px 0px 8px;
background-color:rgba(254, 254, 254, 0.1);
outline:none;}
@ -256,6 +201,7 @@ margin-left:4px;}
-webkit-box-shadow:0px 0px 8px #000;
box-shadow: 0px 0px 8px #000;}
#blogSection article
{margin-top:10px;} /*are the time zones in the html accurate???? and the usage of time, datetime, pubdate, only done it for the first article*/
@ -286,16 +232,13 @@ background-color:rgba(254, 254, 254, 0.4);
color:#0c4d89;
font-size:13px;
padding-top:16px;
padding-bottom:16px;
padding-bottom:24px;
padding-left:1%;
padding-right:1%;
margin-top:-120px;
position:relative;}
footer h1
{font-size:24px;}
footer h2
{font-size:13px;
padding-bottom:20px;}

Binary file not shown.

After

Width:  |  Height:  |  Size: 371 B

View File

@ -2,20 +2,26 @@
<html lang="en">
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
<title>PLEASE ADD TITLES HERE</title>
<link rel="stylesheet" href="/static/css/reset.css" type="text/css" />
<link rel="stylesheet" href="/static/css/main.css" type="text/css" />
<!-- ADD THE HTML5 SHIV, javascript libraries, google chrome frame -->
{% block extra_head %}
{% endblock %}
</head>
<body>
<div class="wrapper">
<div id="wrapper">
<header>
<img src="/static/img/logo.png" width="171" height="73" alt="logo-mofca" id="logo">
<a href="index.html"><img src="/static/img/logo.png" width="171" height="73" alt="logo-mofca" id="logo"></a>
<nav>
<ul class="navMain">
@ -42,12 +48,19 @@
<li><a href="#">Food questions</a></li>
<li><a href="#">Farming questions</a></li>
<li><a href="#">Ask a question</a></li>
<li><a href="#">Our blog</a></li>
<li><a href="#">Our friends/partners</a></li>
</ul>
</li>
</ul>
</nav>
<form action="" method="get">
<input type="text" placeholder="Search MOFCA" name="field" id="search"/>
</form>
<div class="clear"></div>
</header>
@ -55,27 +68,9 @@
<div id="columns">
<div id="col1">
<hgroup>
<h1>Hari Bhari Tokri</h1>
<h2><span>is a weekly selection of organic vegetables gathered by &nbsp;<br/>Mofca &#150; the Mumbai Organic Farmers & Consumers &nbsp;<br/> Association. Mouse over the vegetables in this week's tokri &nbsp;<br/>for nutrition information, recipes, and more. &nbsp;</span>
</h2>
<h3>Monsoon 2011, Tokri 1</h3>
</hgroup>
<div id="basket">
<div id="basketTop"><img src="/static/img/tokri-tops.png" width="677" height="177" alt="basket-top"></div>
<div id="basketBottom"><img src="/static/img/tokri.png" width="729" height="325" alt ="tokri"></div>
<div id="basketRecipe"><img src="/static/img/recipe-cards.png" width="265" height="182" alt="recipe-card"><!--this is a large png 24 file needs to be reduced in size-->
<p id="featuredRecipe">THIS WEEK'S FEATURED RECIPE</p>
<p id="recipeName">Gongura Pickle</p>
</div>
<div id="vegLeft"><img src="/static/img/brinjal.png" width="187" height="155" alt="brinjal"></div>
<div id="vegCenter"><img src="/static/img/bhindis.png" width="240" height="214" alt="brinjal"></div>
<div id="vegRight"><img src="/static/img/dudhis.png" width="188" height="394" alt="dudhi"></div>
</div>
{% block content %}
{% endblock %}
</div>
@ -132,10 +127,10 @@
<footer>
<hgroup>
<h1>Mofca</h1>
<h2>Mumbai Organic Farmers & Consumers Association</h2>
</hgroup>
<a href="index.html"><img src="/static/img/logo.png" width="90" height="38" alt="logo-mofca" id="logoFooter"></a>
<h1>Mumbai Organic Farmers & Consumers Association</h1>
<ul>
<li><a href="#">About Us</a></li>

View File

@ -0,0 +1,32 @@
{% extends 'test/base.html' %}
{% block extra_head %}
<link rel="stylesheet" href="/static/css/home.css" type="text/css" />
{% endblock %}
{% block content %}
<hgroup>
<h1>Hari Bhari Tokri</h1>
<h2><span>is a weekly selection of organic vegetables gathered by &nbsp;<br/>Mofca &#150; the Mumbai Organic Farmers & Consumers &nbsp;<br/> Association. Mouse over the vegetables in this week's tokri &nbsp;<br/>for nutrition information, recipes, and more. &nbsp;</span>
</h2>
<h3>Monsoon 2011, Tokri 1</h3>
</hgroup>
<div id="basket">
<div id="basketTop"><img src="/static/img/tokri-tops.png" width="677" height="177" alt="basket-top"></div>
<div id="basketBottom"><img src="/static/img/tokri.png" width="729" height="325" alt ="tokri"></div>
<div id="basketRecipe"><img src="/static/img/recipe-cards.png" width="265" height="182" alt="recipe-card"><!--this is a large png 24 file needs to be reduced in size-->
<p id="featuredRecipe">THIS WEEK'S FEATURED RECIPE</p>
<p id="recipeName">Gongura Pickle</p>
</div>
<div id="vegLeft"><img src="/static/img/brinjal.png" width="187" height="155" alt="brinjal"></div>
<div id="vegCenter"><img src="/static/img/bhindis.png" width="240" height="214" alt="brinjal"></div>
<div id="vegRight"><img src="/static/img/dudhis.png" width="188" height="394" alt="dudhi"></div>
</div>
{% endblock %}

View File

@ -0,0 +1,95 @@
{% extends 'test/base.html' %}
{% block extra_head %}
<link rel="stylesheet" href="/static/css/inner.css" type="text/css" />
{% endblock %}
{% block content %}
<div class="colInner">
<h1>CSA or 'farm sharing' through HBT</h1>
<br>
<p>Most of us are aware that profit from food is impossible if farming and food supply is carried out in the spirit of ahimsa. In spite of the fact that food is an everyday necessity or perhaps precisely because it is one, the proportion of income spent on food decreases as income increases. It is why our country's (and other countries') farmers are in the state they're in. It is also why our earth is in the state it is in.</p>
<br>
<p>To underline our efforts to reclaim food from the clutches of commodification we are proposing the idea of family farms/ farmers (similar to that of family doctor). We want to encourage the deepening of trust, responsibility and reciprocity within our human and ecological communities.</p>
<br>
<p>20 farmers have pledged their lands and labour to the practice of sustainable farming methods for this monsoon season (2011). This growing cycle begins in May with sowing and a harvest is expected from July to October. MOFCA will support the farmers with sharing of technical know-how and other farming resources, creating an assured market and a fair, consistent price for their produce and creating and managing the supply chain logistics.</p>
<br>
<p>We have available to us a total of 4 acres of farm land, cultivated by the 20 farmers partnering with us for this season. We are estimating a yield of 100 kg. / week from each acre which will give us a total of approximately 400 kilos. We have 200 farm shares available this season for public issue each worth Rs 2500/-.</p>
<br>
<p>As a shareholder you are paying the true cost of growing the food (in a sustainable and just way) and bringing it to you for the duration of the season. You are also helping in the long-term promotion of sustainable farming by enabling MOFCA to share resources among farmers and also to help consumers and the wider public learn to be more conscious about the food they eat.</p>
<br><br>
<h1>Why become a shareholder?</h1>
<br>
<p>As a shareholder and consumer of seasonal, local organic food you are <span class="boldText">investing in your health</span> everyday. You will have access to nutritious vegetables, produced organically. By eating local and in season vegetables you will be eating them at their freshest, most natural state, and at a time when they will most benefit you.</p>
<br>
<p>As a shareholder you are <span class="boldText">investing in your community.</span> As consumers have become more and more disconnected from the process of food production they have also become more disconnected from the human and ecological communities that support this process. By shareholding you will have the opportunity to personally get to know the farmers and they will know who's eating the food they are growing. Food traditions can be celebrated and kept alive among family and friends.</p>
<br>
<p>As a shareholder you are <span class="boldText">investing in your planet.</span> Even though increasingly fewer and fewer people are farming the earth, it is the responsibility of all of us to maintain the health of the earth. Through your support of organic practices you can do this. By buying local you are reducing the distance food travels to reach you- your food miles. And by preregistering as a shareholder you enable farmers to better plan their growing cycle thereby reducing wastages.</p>
<br>
<p>As a shareholder you are <span class="boldText">investing in learning.</span> You will have the opportunity to visit the farms where the food is grown and be re-introduced to traditional (forgotten) vegetables and different ways to prepare and store them. Shareholding is a great way to introduce children to various aspects of food and its production, nature and the community.</p>
<br>
<p>As a shareholder you are <span class="boldText">investing in your local economy.</span> Without intermediaries, shareholders benefit from reasonable, predetermined prices not subject to economic fluctuations or false scarcities. Wastages that occur from excess produce not being sold will be minimized, which in turn will reduce losses to the farmer and keep costs to the consumer under control. Farmers also benefit from fair prices paid directly to them.</p>
<br><br>
<h1>Shareholder Terms</h1>
<br>
1. You, the consumer, will partner with MOFCA for one <span class="boldText">growing season.</span> The monsoon cycle begins in May with sowing and a harvest is expected from July to October.<br>
2. At the time of registering, you will be required to give a contribution of <span class="boldText">Rs. 3000/-</span> for the season. This amount represents a shared responsibility for the costs of vegetable production and logistics for the season as well as for the undertaking of certain projects to ensure the long term sustainability of the project.<br>
3. A list of vegetables that will be grown during the season will be made available so consumers will know what to expect.<br>
4. Each week, on a pre-determined day, your tokri/share of the produce will be delivered to your pre-selected <span class="boldText">pick-up point.</span> Members are requested to collect their tokris the same day during the hours specified by the respective pick-up point. If possible, arrangements for delivery will be made available at actuals for those interested.<br>
5. Each tokri will contain a proportionate share (in quantity and variety) of the produce harvested that week. Each week, depending upon availability, we will try to vary the vegetables included in the tokri. The quantities supplied during the harvest will also vary during the season generally peaking at the middle of the season and tapering off at the beginning and end of the season.<br>
6. In case you <span class="boldText">do not want a tokri</span> for a week or more during the season you are requested to inform us in advance if you would like for us to donate it for you or if you are gifting it to someone and who will pick it up on your behalf.<br>
7. In case of <span class="boldText">special, one-off requests</span> where a larger quantity is required, the allocation will be made only after all the regular registered baskets are filled.<br>
8. Occasionally, in addition to vegetables, farmers will have <span class="boldText">fruits and other provisions</span> (e.g. cereals, pulses, oils, etc) for sale. Additional costs and other details will be provided as and when available. Occasionally these are from farmers outside of the MOFCA group but are organic farmers whose commitment to sustainable farming we are convinced of.<br>
9. Consumer shareholders will from time to time have access to <span class="boldText">resources</span> (e.g. recipes) and <span class="boldText">activities</span> (demonstrations, workshops, farm visits, etc) to further their learning about growing and eating seasonal, local, food.<br>
10. Shareholders who would like to to continue for the <span class="boldText">next season</span> are requested to intimate us by the 1st of September 2011. At that time we will update shareholders about any modifications in policy, costs, etc for the next season.
<br><br>
<h1>The True Cost of our Food or Why Can't my Food be Cheaper?</h1>
<br>
Accounts from HBT's 1st winter season (Sept 2010- March 2011)
COSTS
Vegetable (-) 77,926
Transport (-) 42,500
Misc (phone, seeds, jute and partial payment for crates and bags) (-) 32,500
Additional resources:
Time for transport, pick up, sorting and packing, coordination,
management, etc (60+ hours per week): Donated by volunteers
Space and resources at the pick up points : Donated by volunteers
Total cost (-) 152,926
INCOME from sales (+) 94,886
LOSS (-) 58,040
Loss shared among consumers (135) (-) 429
Initial Deposit paid by Consumers (+) 500
Balance payable after cutting losses (+) 70/-per partner *
*rounded off except if defaulted on picking up a tokri; in which case the amount is deducted from deposit.
<p>Our first season's accounts give some indication of the costs involved in growing and transporting food from farm to table. Of course, this being our first season there was more learning than efficiency. While we will get better at it, cheap food will never be our goal for market prices do not reveal the true costs nor the extent of exploitation, of people and resources. A model that is just and sustainable and with minimal loss is what we are aiming for.</p>
<br>
<p>At this point we are committed to paying farmers a rate of 25/- per kilo for any vegetable they supply. For the long duration crops like roots and tubers they receive a slightly higher rate. This is far above the rate they typically receive in the market.</p>
<br>
<p>For the monsoon season, we are also factoring in the costs for those items that were donated for the first season, largely labour, space and resources. Some amount of resources, donated as well as included in the costing is earmarked for long term projects (please refer to extension activities) and other supportive tasks. Keeping these in mind the investment cost for one share, for an estimated weekly delivery of 16 weeks of harvest for the monsoon season is Rs 3,000/-.</p>
<br>
<p>Because we believe healthy food is everyone's birthright and we understand that there may be some that cannot afford to give a downpayment of Rs 3,000 we request those who are interested to come and speak to us. We are willing to work out a resource exchange commitment (typically time and energy) for the season.</p>
<br><br>
<h1>Extension activities</h1>
<br>
<p>We have become accustomed to "what we want, when we want". We must now re-learn how to eat what Nature provides in plenty "where we are, when we are".</p>
<br>
<p>Consumer education and community building to facilitate use of the tokri veggies might include;
dealing with large quantities of seasonal food- recipes, preservation
introducing "new" foods- uncultivated, forgotten,
celebrating (slow) food- sharing traditional food preparation methods, cooking together, film screenings, food meditation newsletter, blog, recipe exchange, etc.<br>
Also farm visits. Linking to other closely related food movements- urban farming.</p>
<br>
<p>Developing an internal certification process.<br>
While we initially considered a participatory guarantee scheme (PGS) system which emphasises peer group accountability with regards to on-farm policy and practice, because of the distances between farms this is not quite viable. So using various criteria drawn from the PGS standards MOFCA will create a team including both farmer and consumer representatives that will visit farms and understand their views and practices of sustainability. We will support farmers as they transition to organic and eventually natural farming.</p>
<br>
<p>Seed saving and other resource sharing, networking activities to support on farm work needs to begin.</p>
</div>
{% endblock %}

View File

@ -9,8 +9,15 @@ admin.autodiscover()
urlpatterns = patterns('',
# Example:
# (r'^mofca/', include('mofca.foo.urls')),
(r'^$', 'recipes.views.index'),
(r'^test$', 'recipes.views.test'),
(r'^$', 'organic.views.index'),
(r'^test/$', 'recipes.views.test'),
(r'^hbt/$', 'organic.views.hbt'),
(r'^pickup-delivery/$', 'organic.views.pickup'),
(r'^seasons-veggies/$', 'organic.views.season_veggies'),
(r'^meet-farmers/$', 'organic.views.meet_farmers'),
(r'^recipes/$', 'recipes.views.index'),
# (r'^events/$', 'organic.views.events'),
# (r'^resources/$', 'organic.views.resources'),
# Uncomment the admin/doc line below to enable admin documentation:
(r'^admin/doc/', include('django.contrib.admindocs.urls')),