Skip to content

Commit

Permalink
[djangoproject.com] Various template tweaks.
Browse files Browse the repository at this point in the history
git-svn-id: http://code.djangoproject.com/svn/djangoproject.com@8468 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information
jacob committed Aug 22, 2008
1 parent 5fbf34d commit f7fe261
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 41 deletions.
5 changes: 2 additions & 3 deletions django_website/apps/contact/forms.py
Expand Up @@ -11,8 +11,7 @@ def subject(self):
return "[Contact form] " + self.cleaned_data["message_subject"]

def message(self):
body = "\n".join(textwrap.wrap(self.cleaned_data["body"], 76))
return "From: %s <%s>\n\n%s" % (self.cleaned_data["name"], self.cleaned_data["email"], body)
return "From: %(name)s <%(email)s>\n\n%(body)s" % self.cleaned_data

class FoundationContactForm(BaseContactForm):
recipient_list = ["dsf-board@googlegroups.com"]
recipient_list = ["dsf-board@googlegroups.com"]
10 changes: 5 additions & 5 deletions django_website/templates/base.html
Expand Up @@ -26,11 +26,11 @@
<div id="header">
<h1 id="logo"><a href="/"><img src="http://media.djangoproject.com/img/site/hdr_logo.gif" alt="Django" /></a></h1>
<ul id="nav-global">
<li id="nav-homepage"><a href="/">Home</a></li>
<li id="nav-download"><a href="/download/">Download</a></li>
<li id="nav-documentation"><a href="/documentation/">Documentation</a></li>
<li id="nav-weblog"><a href="/weblog/">Weblog</a></li>
<li id="nav-community"><a href="/community/">Community</a></li>
<li id="nav-homepage"><a href="http://www.djangoproject.com/">Home</a></li>
<li id="nav-download"><a href="http://www.djangoproject.com/download/">Download</a></li>
<li id="nav-documentation"><a href="http://www.djangoproject.com/documentation/">Documentation</a></li>
<li id="nav-weblog"><a href="http://www.djangoproject.com/weblog/">Weblog</a></li>
<li id="nav-community"><a href="http://www.djangoproject.com/community/">Community</a></li>
<li id="nav-code"><a href="http://code.djangoproject.com/">Code</a></li>
</ul>
</div>
Expand Down
53 changes: 23 additions & 30 deletions django_website/templates/base_foundation.html
Expand Up @@ -2,44 +2,37 @@

{% block content-related %}
<h2>Support Django</h2>
<script type="text/javascript">
function validateAmount(amount){
if(amount.value.match( /^[0-9]+(\.([0-9]+))?$/)){
return true;
}else{
alert('You must enter a valid donation.');
amount.focus();
return false;
}
}
</script>
<form action="https://checkout.google.com/cws/v2/Donations/404630304217012/checkoutForm" id="BB_BuyButtonForm" method="post" name="BB_BuyButtonForm" onSubmit="return validateAmount(this.item_price_1)">
<input name="item_name_1" type="hidden" value="Support the Django Software Foundation!"/>
<input name="item_description_1" type="hidden" value="Thanks for your help! Your money will directly support the development of Django by sponsoring developer meetings, user conferences, and other community activities."/>
<input name="item_quantity_1" type="hidden" value="1"/>
<input name="item_currency_1" type="hidden" value="USD"/>
<input name="item_is_modifiable_1" type="hidden" value="true"/>
<input name="item_min_price_1" type="hidden" value="0.0"/>
<input name="item_max_price_1" type="hidden" value="25000.0"/>
<input name="_charset_" type="hidden" value="utf-8"/>
<input id="item_price_1" name="item_price_1" onfocus="this.style.color='black'; this.value='';" size="6" type="text" value="20.00"/>
<input type="submit" name="submit" value="Donate" id="submit">
</form>
<p>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_donations">
<input type="hidden" name="business" value="jacob@djangoproject.com">
<input type="hidden" name="item_name" value="Django Software Foundation">
<input type="hidden" name="item_number" value="donation">
<input type="hidden" name="no_shipping" value="1">
<input type="hidden" name="return" value="http://www.djangoproject.com/foundation/donate/thanks/">
<input type="hidden" name="cancel_return" value="http://www.djangoproject.com/foundation/donate/">
<input type="hidden" name="no_note" value="1">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="tax" value="0">
<input type="hidden" name="lc" value="US">
<input type="hidden" name="bn" value="PP-DonationsBF">
<label for="amount" style="font-size: 14px;">$</label> <input type="text" name="amount" value="25.00" size="5" style="font-size: 14px; margin-right: 4px;">
<input type="image" align="top" src="https://www.paypal.com/en_US/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>
</p>

<h3>Questions?</h3>
<p>Read more about <a href="/foundation/donate/">donating to the DSF</a>.

<h2>Licensing &amp; Trademarks</h2>
<ul>
<li>Django licensing policies</li>
<li>Contributor license agreements</li>
<li><a href="/foundation/cla/">Contributor license agreements</a></li>
</ul>

<h2>About the foundation</h2>
<ul>
<li>FAQ</li>
<li>Records</li>
<li>Board meeting minutes</li>
<li>Board resolutions</li>
<li><a href="/foundation/faq/">FAQ</a></li>
<li><a href="/foundation/records">Records</a></li>
<li><a href="/contact/foundation/">Contact us</a></li>
</ul>
{% endblock %}
6 changes: 4 additions & 2 deletions django_website/templates/docs/index.html
Expand Up @@ -47,8 +47,8 @@ <h2 id="reference">Reference</h2>

<li>Templates: <a href="templates/">Guide for HTML authors</a> | <a href="templates_python/">Guide for Python programmers</a></li>

<li><a href="newforms/">The newforms library</a> | <a href="forms/">The old forms and manipulators library</a></li>
<li><strong>New:</strong> <a href="upload_handling/">File uploads</a></li>
<li><a href="forms/">Forms</a></li>
<li><strong>New:</strong> Files: <a href="files/">file handling</a> | <a href="upload_handling/">file uploads</a></li>
<li><a href="testing/">Testing Django applications</a></li>
<li><a href="sessions/">Sessions</a></li>
<li><a href="cache/">Caching</a></li>
Expand All @@ -66,6 +66,7 @@ <h2 id="reference">Reference</h2>

<li><a href="add_ons/">The django.contrib add-ons</a>
<ul>
<li><a href="admin/">The automatic admin interface</a> (<code>django.contrib.admin</code>)</li>
<li><a href="contenttypes/">Contenttypes Framework</a> (<code>django.contrib.contenttypes</code>)</li>
<li><a href="csrf/">Cross Site Request Forgery protection</a> (<code>django.contrib.csrf</code>)</li>
<li><a href="databrowse/">Databrowse</a> (<code>django.contrib.databrowse</code>)</li>
Expand Down Expand Up @@ -110,6 +111,7 @@ <h2>Et cetera</h2>

<h2>Release notes</h2>
<ul>
<li><a href="release_notes_1.0_alpha/">Version 1.0 Alpha</a></li>
<li><a href="release_notes_0.96/">Version 0.96</a></li>
<li><a href="release_notes_0.95/">Version 0.95</a></li>
</ul>
Expand Down
3 changes: 2 additions & 1 deletion django_website/templates/flatpages/foundation.html
Expand Up @@ -5,7 +5,8 @@
form #submit {
border: 0px none;
background-color: transparent;
color: transparent;
overflow:hidden;
text-indent: -999px;
background-image: url(https://checkout.google.com/buttons/donateNow.gif?merchant_id=404630304217012&w=115&h=50&style=trans&variant=text&loc=en_US);
background-position: 0px 3px;
width: 115px;
Expand Down
1 change: 1 addition & 0 deletions djangodocs/settings.py
Expand Up @@ -4,6 +4,7 @@
INSTALLED_APPS = []
TEMPLATE_DIRS = [os.path.join(os.path.dirname(__file__), "templates")] + TEMPLATE_DIRS
ROOT_URLCONF = 'djangodocs.urls'
CACHE_MIDDLEWARE_KEY_PREFIX = 'djangodocs'

if DEVELOPMENT_MODE:
DOCS_PICKLE_ROOT = "/Users/jacob/Projects/Django/upstream/docs/_build/pickle/"
Expand Down

0 comments on commit f7fe261

Please sign in to comment.