Author: jacob Date: 2008-09-19 15:49:50 -0500 (Fri, 19 Sep 2008) New Revision: 9073
Added: djangoproject.com/django_website/apps/aggregator/admin.py djangoproject.com/django_website/apps/blog/admin.py djangoproject.com/django_website/templates/comments/base.html djangoproject.com/django_website/templates/comments/comment_list.html djangoproject.com/django_website/templates/comments/form.html djangoproject.com/django_website/templates/comments/preview.html djangoproject.com/django_website/templates/homepage.html djangoproject.com/django_website/upgrade/ djangoproject.com/django_website/upgrade/upgrade-to-1.0.sql Removed: djangoproject.com/django_website/templates/comments/free_preview.html djangoproject.com/django_website/templates/comments/freecomment_list.html djangoproject.com/django_website/templates/comments/freeform.html djangoproject.com/django_website/templates/flatpages/homepage.html Modified: djangoproject.com/ djangoproject.com/django_website/apps/aggregator/models.py djangoproject.com/django_website/apps/blog/models.py djangoproject.com/django_website/apps/contact/forms.py djangoproject.com/django_website/apps/docs/models.py djangoproject.com/django_website/settings.py djangoproject.com/django_website/templates/blog/entry_archive.html djangoproject.com/django_website/templates/blog/entry_archive_day.html djangoproject.com/django_website/templates/blog/entry_archive_month.html djangoproject.com/django_website/templates/blog/entry_detail.html djangoproject.com/django_website/templates/blog/entry_snippet.html djangoproject.com/django_website/templates/contact/foundation.html djangoproject.com/django_website/templates/registration/registration_form.html djangoproject.com/django_website/urls.py djangoproject.com/djangodocs/forms.py djangoproject.com/djangodocs/templates/docs/doc.html djangoproject.com/djangodocs/templates/docs/search_form.html Log: [djangoproject.com] updated website to use Django 1.0. Property changes on: djangoproject.com ___________________________________________________________________ Name: svn:externals - django -r6063 http://code.djangoproject.com/svn/django/trunk/django/ registration -r139 http://django-registration.googlecode.com/svn/trunk/registration/ comment_utils -r78 http://django-comment-utils.googlecode.com/svn/trunk/comment_utils/ contact_form -r48 http://django-contact-form.googlecode.com/svn/trunk/contact_form/ + django http://code.djangoproject.com/svn/django/tags/releases/1.0/django registration -r168 http://django-registration.googlecode.com/svn/trunk/registration/ contact_form -r49 http://django-contact-form.googlecode.com/svn/trunk/contact_form/ Added: djangoproject.com/django_website/apps/aggregator/admin.py =================================================================== --- djangoproject.com/django_website/apps/aggregator/admin.py (rev 0) +++ djangoproject.com/django_website/apps/aggregator/admin.py 2008-09-19 20:49:50 UTC (rev 9073) @@ -0,0 +1,17 @@ +from django.contrib import admin +from django_website.apps.aggregator.models import Feed, FeedItem + +admin.site.register(Feed, + list_display = ["title", "public_url", "is_defunct"], + list_filter = ["is_defunct"], + ordering = ["title"], + search_fields = ["title", "public_url"], + list_per_page = 500, +) + +admin.site.register(FeedItem, + list_display = ['title', 'feed', 'date_modified'], + list_filter = ['feed'], + search_fields = ['feed__title', 'feed__public_url', 'title'], + date_heirarchy = ['date_modified'], +) \ No newline at end of file Modified: djangoproject.com/django_website/apps/aggregator/models.py =================================================================== --- djangoproject.com/django_website/apps/aggregator/models.py 2008-09-19 19:45:54 UTC (rev 9072) +++ djangoproject.com/django_website/apps/aggregator/models.py 2008-09-19 20:49:50 UTC (rev 9073) @@ -1,31 +1,24 @@ from django.db import models class Feed(models.Model): - title = models.CharField(maxlength=500) - feed_url = models.URLField(unique=True, maxlength=500) - public_url = models.URLField(maxlength=500) + title = models.CharField(max_length=500) + feed_url = models.URLField(unique=True, max_length=500) + public_url = models.URLField(max_length=500) is_defunct = models.BooleanField() class Meta: db_table = 'aggregator_feeds' - class Admin: - list_display = ["title", "public_url", "is_defunct"] - list_filter = ["is_defunct"] - ordering = ["title"] - search_fields = ["title", "public_url"] - list_per_page = 500 - def __unicode__(self): return self.title class FeedItem(models.Model): feed = models.ForeignKey(Feed) - title = models.CharField(maxlength=500) - link = models.URLField(maxlength=500) + title = models.CharField(max_length=500) + link = models.URLField(max_length=500) summary = models.TextField(blank=True) date_modified = models.DateTimeField() - guid = models.CharField(maxlength=500, unique=True, db_index=True) + guid = models.CharField(max_length=500, unique=True, db_index=True) class Meta: db_table = 'aggregator_feeditems' Added: djangoproject.com/django_website/apps/blog/admin.py =================================================================== --- djangoproject.com/django_website/apps/blog/admin.py (rev 0) +++ djangoproject.com/django_website/apps/blog/admin.py 2008-09-19 20:49:50 UTC (rev 9073) @@ -0,0 +1,6 @@ +from django.contrib import admin +from django_website.apps.blog.models import Entry + +admin.site.register(Entry, + list_display = ('pub_date', 'headline', 'author'), +) \ No newline at end of file Modified: djangoproject.com/django_website/apps/blog/models.py =================================================================== --- djangoproject.com/django_website/apps/blog/models.py 2008-09-19 19:45:54 UTC (rev 9072) +++ djangoproject.com/django_website/apps/blog/models.py 2008-09-19 20:49:50 UTC (rev 9073) @@ -1,14 +1,18 @@ +import akismet import datetime +from django.conf import settings from django.db import models -from comment_utils.moderation import CommentModerator, moderator +from django.contrib.sites.models import Site +from django.contrib.comments.signals import comment_was_posted +from django.utils.encoding import smart_str class Entry(models.Model): pub_date = models.DateTimeField() slug = models.SlugField(unique_for_date='pub_date') - headline = models.CharField(maxlength=200) + headline = models.CharField(max_length=200) summary = models.TextField(help_text="Use raw HTML.") body = models.TextField(help_text="Use raw HTML.") - author = models.CharField(maxlength=100) + author = models.CharField(max_length=100) class Meta: db_table = 'blog_entries' @@ -16,9 +20,6 @@ ordering = ('-pub_date',) get_latest_by = 'pub_date' - class Admin: - list_display = ('pub_date', 'headline', 'author') - def __unicode__(self): return self.headline @@ -30,8 +31,20 @@ delta = datetime.datetime.now() - self.pub_date return delta.days < 60 -class EntryModerator(CommentModerator): - akismet = True - enable_field = "comments_enabled" - -moderator.register(Entry, EntryModerator) +def moderate_comment(sender, comment, request, **kwargs): + ak = akismet.Akismet( + key = settings.AKISMET_API_KEY, + blog_url = 'http://%s/' % Site.objects.get_current().domain + ) + data = { + 'user_ip': request.META.get('REMOTE_ADDR', '127.0.0.1'), + 'user_agent': request.META.get('HTTP_USER_AGENT', ''), + 'referrer': request.META.get('HTTP_REFERRER', ''), + 'comment_type': 'comment', + 'comment_author': smart_str(comment.user_name), + } + if ak.comment_check(smart_str(comment.comment), data=data, build_data=True): + comment.is_public = False + comment.save() + +comment_was_posted.connect(moderate_comment) \ No newline at end of file Modified: djangoproject.com/django_website/apps/contact/forms.py =================================================================== --- djangoproject.com/django_website/apps/contact/forms.py 2008-09-19 19:45:54 UTC (rev 9072) +++ djangoproject.com/django_website/apps/contact/forms.py 2008-09-19 20:49:50 UTC (rev 9073) @@ -1,5 +1,5 @@ import textwrap -from django import newforms as forms +from django import forms from contact_form.forms import AkismetContactForm attrs = {'class': 'required'} Modified: djangoproject.com/django_website/apps/docs/models.py =================================================================== --- djangoproject.com/django_website/apps/docs/models.py 2008-09-19 19:45:54 UTC (rev 9072) +++ djangoproject.com/django_website/apps/docs/models.py 2008-09-19 20:49:50 UTC (rev 9073) @@ -1,8 +1,8 @@ from django.db import models class DocumentRelease(models.Model): - version = models.CharField(maxlength=20, unique=True) - repository_path = models.CharField(maxlength=50, help_text="(i.e. 'tags/releases/0.95' or 'branches/0.95-bugfixes')") + version = models.CharField(max_length=20, unique=True) + repository_path = models.CharField(max_length=50, help_text="(i.e. 'tags/releases/0.95' or 'branches/0.95-bugfixes')") release_date = models.DateField() class Meta: Modified: djangoproject.com/django_website/settings.py =================================================================== --- djangoproject.com/django_website/settings.py 2008-09-19 19:45:54 UTC (rev 9072) +++ djangoproject.com/django_website/settings.py 2008-09-19 20:49:50 UTC (rev 9073) @@ -18,6 +18,7 @@ PREPEND_WWW = False CACHE_BACKEND = "dummy:///" DJANGO_SVN_ROOT = "http://code.djangoproject.com/svn/django/" + ADMIN_MEDIA_PREFIX = '/media/' else: DEBUG = False PREPEND_WWW = True @@ -25,6 +26,7 @@ CACHE_BACKEND = 'memcached://127.0.0.1:11211/' TEMPLATE_DIRS = ['/home/djangoproject.com/django_website/templates'] DJANGO_SVN_ROOT = "file:///home/svn/django/django/" + ADMIN_MEDIA_PREFIX = 'http://media.djangoproject.com/admin/' SITE_ID = 1 ROOT_URLCONF = 'django_website.urls' @@ -43,9 +45,7 @@ 'django_website.apps.docs', 'django_website.apps.aggregator', 'registration', - 'comment_utils', ) -ADMIN_MEDIA_PREFIX = 'http://media.djangoproject.com/admin/' MEDIA_ROOT = "/home/html/djangoproject.com/m/" MEDIA_URL = "http://www.djangoproject.com.com/m/" Modified: djangoproject.com/django_website/templates/blog/entry_archive.html =================================================================== --- djangoproject.com/django_website/templates/blog/entry_archive.html 2008-09-19 19:45:54 UTC (rev 9072) +++ djangoproject.com/django_website/templates/blog/entry_archive.html 2008-09-19 20:49:50 UTC (rev 9073) @@ -2,13 +2,11 @@ {% block content %} -{% load comments comment_utils %} - <h1>Latest entries</h1> {% for object in latest %} - <h2><a href="{{ object.get_absolute_url }}">{{ object.headline }}</a></h2> - {{ object.body }} + <h2><a href="{{ object.get_absolute_url }}">{{ object.headline|safe }}</a></h2> + {{ object.body|safe }} <p class="date small">Posted by <strong>{{ object.author }}</strong> on {{ object.pub_date|date:"F j, Y" }}</p> {% endfor %} Modified: djangoproject.com/django_website/templates/blog/entry_archive_day.html =================================================================== --- djangoproject.com/django_website/templates/blog/entry_archive_day.html 2008-09-19 19:45:54 UTC (rev 9072) +++ djangoproject.com/django_website/templates/blog/entry_archive_day.html 2008-09-19 20:49:50 UTC (rev 9073) @@ -7,9 +7,9 @@ <h1>{{ day|date:"F j" }} archive</h1> {% for object in object_list %} -<h2><a href="{{ object.get_absolute_url }}">{{ object.headline }}</a></h2> +<h2><a href="{{ object.get_absolute_url }}">{{ object.headline|safe }}</a></h2> <p class="small date">{{ object.pub_date|date:"F j, Y" }}</p> -{{ object.body }} +{{ object.body|safe }} {% endfor %} Modified: djangoproject.com/django_website/templates/blog/entry_archive_month.html =================================================================== --- djangoproject.com/django_website/templates/blog/entry_archive_month.html 2008-09-19 19:45:54 UTC (rev 9072) +++ djangoproject.com/django_website/templates/blog/entry_archive_month.html 2008-09-19 20:49:50 UTC (rev 9073) @@ -7,9 +7,9 @@ <h1>{{ month|date:"F" }} archive</h1> {% for object in object_list %} -<h2><a href="{{ object.get_absolute_url }}">{{ object.headline }}</a></h2> +<h2><a href="{{ object.get_absolute_url }}">{{ object.headline|safe }}</a></h2> <p class="small date">{{ object.pub_date|date:"F j, Y" }}</p> -{{ object.body }} +{{ object.body|safe }} {% endfor %} Modified: djangoproject.com/django_website/templates/blog/entry_detail.html =================================================================== --- djangoproject.com/django_website/templates/blog/entry_detail.html 2008-09-19 19:45:54 UTC (rev 9072) +++ djangoproject.com/django_website/templates/blog/entry_detail.html 2008-09-19 20:49:50 UTC (rev 9073) @@ -4,26 +4,26 @@ {% block content %} -<h1>{{ object.headline }}</h1> -{{ object.body }} +<h1>{{ object.headline|safe }}</h1> +{{ object.body|safe }} <p class="date small">Posted by <strong>{{ object.author }}</strong> on {{ object.pub_date|date:"F j, Y" }}</p> -{% load comments comment_utils %} -{% get_public_free_comment_list for blog.entry object.id as comment_list %} +{% load comments %} +{% get_comment_list for blog.entry object.id as comment_list %} <div id="content-secondary"> <h2 id="comments">Comments</h2> {% for comment in comment_list %} <div class="comment" id="c{{ comment.id }}"> - <h3>{{ comment.person_name|escape }} <span class="small quiet">{{ comment.submit_date|date:"F j, Y" }} at {{ comment.submit_date|date:"P" }}</span></h3> + <h3>{{ comment.user_name|escape }} <span class="small quiet">{{ comment.submit_date|date:"F j, Y" }} at {{ comment.submit_date|date:"P" }}</span></h3> {{ comment.comment|escape|urlizetrunc:"40"|linebreaks }} </div> {% endfor %} {% if object.comments_enabled %} <h2>Post a comment</h2> -{% free_comment_form for blog.entry object.id %} +{% render_comment_form for blog.entry object.id %} {% else %} <h2>Comments are closed</h2> <p>To prevent spam, comments are no longer allowed after sixty days.</p> Modified: djangoproject.com/django_website/templates/blog/entry_snippet.html =================================================================== --- djangoproject.com/django_website/templates/blog/entry_snippet.html 2008-09-19 19:45:54 UTC (rev 9072) +++ djangoproject.com/django_website/templates/blog/entry_snippet.html 2008-09-19 20:49:50 UTC (rev 9073) @@ -1,6 +1,6 @@ {% for e in entries %} <h3><a href="{{ e.get_absolute_url }}">{{ e.headline }}</a></h3> <p class="date">by <strong>{{ e.author }}</strong> on {{ e.pub_date|date:"M. j, Y" }}</p> - {{ e.summary }} + {{ e.summary|safe }} <p class="more"><a href="{{ e.get_absolute_url }}">Read more</a></p> {% endfor %} Added: djangoproject.com/django_website/templates/comments/base.html =================================================================== --- djangoproject.com/django_website/templates/comments/base.html (rev 0) +++ djangoproject.com/django_website/templates/comments/base.html 2008-09-19 20:49:50 UTC (rev 9073) @@ -0,0 +1 @@ +{% extends "base_weblog.html" %} \ No newline at end of file Copied: djangoproject.com/django_website/templates/comments/comment_list.html (from rev 9070, djangoproject.com/django_website/templates/comments/freecomment_list.html) =================================================================== --- djangoproject.com/django_website/templates/comments/comment_list.html (rev 0) +++ djangoproject.com/django_website/templates/comments/comment_list.html 2008-09-19 20:49:50 UTC (rev 9073) @@ -0,0 +1,48 @@ +{% extends "base_weblog.html" %} + +{% block extrahead %} + <link rel="alternate" type="application/rss+xml" title="RSS" href="/rss/comments/" /> +{% endblock %} + +{% block title %}Recent comments{% endblock %} + +{% block content %} + +<h1>Recent comments</h1> + +<p> + {% if has_previous %} + <a href="?page={{ previous }}">Previous</a> | + {% endif %} + Page {{ page }} of {{ pages }} + {% if has_next %} + | <a href="?page={{ next }}">Next</a> + {% endif %} +</p> + +{% for comment in object_list %} +<div class="comment" id="c{{ comment.id }}"> + <h3> + <a href="{{ comment.get_absolute_url }}"> + {{ comment.person_name|escape }} + <span class="small quiet"> + {{ comment.submit_date|date:"F j, Y" }} at {{ comment.submit_date|date:"P" }} + </span> + </a> + {% if perms.comments %} + <form style="display: inline" action="/admin/comments/freecomment/{{ comment.id }}/delete/" method="post"> + <input type="hidden" name="post" value="yes" /> + <input type="hidden" name="next" value="/comments/"> + <input type="submit" value="X" style="padding: 0; font-size: 9px; border-width: 1px;"> + </form> + {% endif %} + </h3> + {{ comment.comment|escape|urlizetrunc:"40"|linebreaks }} +</div> +{% endfor %} + +<p>{% if has_previous %}<a href="?page={{ previous }}">Previous</a> | {% endif %} +Page {{ page }} of {{ pages }} +{% if has_next %} | <a href="?page={{ next }}">Next</a>{% endif %}</p> + +{% endblock %} Added: djangoproject.com/django_website/templates/comments/form.html =================================================================== --- djangoproject.com/django_website/templates/comments/form.html (rev 0) +++ djangoproject.com/django_website/templates/comments/form.html 2008-09-19 20:49:50 UTC (rev 9073) @@ -0,0 +1,22 @@ +{% load comments %} +<form action="{% comment_form_target %}" method="post" class="wide"> + {% for field in form %} + {% if field.is_hidden %} + {{ field }} + {% else %} + <p + {% if field.errors %} class="error"{% endif %} + {% ifequal field.name "honeypot" %} style="display:none;"{% endifequal %}> + {{ field.label_tag }} + {% if field.errors %} + <p class="errors">{{ field.errors.as_text }}</p> + {% endif %} + {{ field }} + </p> + {% endif %} + {% endfor %} + <p class="submit"> + <input type="submit" name="submit" class="submit-post" value="Post" /> + <input type="submit" name="submit" class="submit-preview" value="Preview" /> + </p> +</form> Deleted: djangoproject.com/django_website/templates/comments/free_preview.html =================================================================== --- djangoproject.com/django_website/templates/comments/free_preview.html 2008-09-19 19:45:54 UTC (rev 9072) +++ djangoproject.com/django_website/templates/comments/free_preview.html 2008-09-19 20:49:50 UTC (rev 9073) @@ -1,45 +0,0 @@ -{% extends "base.html" %} - -{% block title %}Preview comment{% endblock %} - -{% block content %} - -<style type="text/css"> -#comments textarea { width: 380px; font: 12px verdana,sans-serif; } -</style> - -<h1>Preview your comment</h1> - -<form action="../postfree/" method="post"> - -{% if comment_form.has_errors %} - <p><strong style="color: red;">Please correct the following errors.</strong></p> -{% else %} - <div class="comment"> - {{ comment.comment|escape|urlizetrunc:"40"|linebreaks }} - <p class="date small">Posted by <strong>{{ comment.person_name|escape }}</strong></p> - </div> - - <p><input type="submit" name="post" value="Post public comment" /></p> - - <h1>Or edit it again</h1> -{% endif %} - -{% if comment_form.person_name.errors %} - {{ comment_form.person_name.html_error_list }} -{% endif %} - -<p><label for="id_person_name">Your name:</label> {{ comment_form.person_name }}</p> - -{% if comment_form.comment.errors %} -{{ comment_form.comment.html_error_list }} -{% endif %} - -<p><label for="id_person_name">Comment:</label><br />{{ comment_form.comment }}</p> -<input type="hidden" name="options" value="{{ options }}" /> -<input type="hidden" name="target" value="{{ target }}" /> -<input type="hidden" name="gonzo" value="{{ hash }}" /> -<p><input type="submit" name="preview" value="Preview revised comment" /></p> -</form> - -{% endblock %} Deleted: djangoproject.com/django_website/templates/comments/freecomment_list.html =================================================================== --- djangoproject.com/django_website/templates/comments/freecomment_list.html 2008-09-19 19:45:54 UTC (rev 9072) +++ djangoproject.com/django_website/templates/comments/freecomment_list.html 2008-09-19 20:49:50 UTC (rev 9073) @@ -1,48 +0,0 @@ -{% extends "base_weblog.html" %} - -{% block extrahead %} - <link rel="alternate" type="application/rss+xml" title="RSS" href="/rss/comments/" /> -{% endblock %} - -{% block title %}Recent comments{% endblock %} - -{% block content %} - -<h1>Recent comments</h1> - -<p> - {% if has_previous %} - <a href="?page={{ previous }}">Previous</a> | - {% endif %} - Page {{ page }} of {{ pages }} - {% if has_next %} - | <a href="?page={{ next }}">Next</a> - {% endif %} -</p> - -{% for comment in object_list %} -<div class="comment" id="c{{ comment.id }}"> - <h3> - <a href="{{ comment.get_absolute_url }}"> - {{ comment.person_name|escape }} - <span class="small quiet"> - {{ comment.submit_date|date:"F j, Y" }} at {{ comment.submit_date|date:"P" }} - </span> - </a> - {% if perms.comments %} - <form style="display: inline" action="/admin/comments/freecomment/{{ comment.id }}/delete/" method="post"> - <input type="hidden" name="post" value="yes" /> - <input type="hidden" name="next" value="/comments/"> - <input type="submit" value="X" style="padding: 0; font-size: 9px; border-width: 1px;"> - </form> - {% endif %} - </h3> - {{ comment.comment|escape|urlizetrunc:"40"|linebreaks }} -</div> -{% endfor %} - -<p>{% if has_previous %}<a href="?page={{ previous }}">Previous</a> | {% endif %} -Page {{ page }} of {{ pages }} -{% if has_next %} | <a href="?page={{ next }}">Next</a>{% endif %}</p> - -{% endblock %} Deleted: djangoproject.com/django_website/templates/comments/freeform.html =================================================================== --- djangoproject.com/django_website/templates/comments/freeform.html 2008-09-19 19:45:54 UTC (rev 9072) +++ djangoproject.com/django_website/templates/comments/freeform.html 2008-09-19 20:49:50 UTC (rev 9073) @@ -1,10 +0,0 @@ -{% if display_form %} -<form action="/comments/postfree/" method="post"> -<p>Your name: <input type="text" id="id_person_name" name="person_name" /></p> -<p>Comment:<br /><textarea name="comment" id="id_comment" rows="10" cols="60"></textarea></p> -<input type="hidden" name="options" value="{{ options }}" /> -<input type="hidden" name="target" value="{{ target }}" /> -<input type="hidden" name="gonzo" value="{{ hash }}" /> -<p><input type="submit" name="preview" value="Preview comment" /></p> -</form> -{% endif %} Added: djangoproject.com/django_website/templates/comments/preview.html =================================================================== --- djangoproject.com/django_website/templates/comments/preview.html (rev 0) +++ djangoproject.com/django_website/templates/comments/preview.html 2008-09-19 20:49:50 UTC (rev 9073) @@ -0,0 +1,7 @@ +{% extends "comments/base.html" %} + +{% block title %}Preview your comment{% endblock %} + +{% block content %} + {% include "comments/form.html" %} +{% endblock %} \ No newline at end of file Modified: djangoproject.com/django_website/templates/contact/foundation.html =================================================================== --- djangoproject.com/django_website/templates/contact/foundation.html 2008-09-19 19:45:54 UTC (rev 9072) +++ djangoproject.com/django_website/templates/contact/foundation.html 2008-09-19 20:49:50 UTC (rev 9073) @@ -2,24 +2,9 @@ {% block title %}Contact the Django Software Foundation{% endblock %} -{% block extrahead %} - {{ block.super }} - <style type="text/css" media="screen"> - form.contact label { display: block; font-weight: bold; margin-top: 1.5em; margin-bottom: 0;} - form.contact label span { font-weight: normal; color: #555; } - form.contact input, - form.contact textarea, - form.contact select { width: 99%; padding: 1px; } - form.contact p { margin: 0; } - form.contact p.submit { text-align: right; margin-top: 1em; margin-right: 0;} - form.contact p.submit input { width: 10em; font-size: 1.5em; } - form.contact p.errors { margin: 0; padding: 0; font-weight: bold; color: red; } - </style> -{% endblock %} - {% block content %} <h1>Contact the Django Software Foundation</h1> -<form action="." method="post" accept-charset="utf-8" class="contact"> +<form action="." method="post" accept-charset="utf-8" class="wide"> <p> <label for="id_name">Your name:</label> {% if form.name.errors %}<p class="errors">{{ form.name.errors.as_text }}</p>{% endif %} Deleted: djangoproject.com/django_website/templates/flatpages/homepage.html =================================================================== --- djangoproject.com/django_website/templates/flatpages/homepage.html 2008-09-19 19:45:54 UTC (rev 9072) +++ djangoproject.com/django_website/templates/flatpages/homepage.html 2008-09-19 20:49:50 UTC (rev 9073) @@ -1,72 +0,0 @@ -{% extends "base_3col.html" %} - -{% block cssid %}homepage{% endblock %} - -{% block sectionid %}homepage{% endblock %} - -{% block billboard %}<h2>The Web framework for perfectionists (with deadlines). Django makes it easier to build better Web apps more quickly and with less code.</h2>{% endblock %} - -{% block content %} -<h1>Meet Django</h1> -<h2 class="deck">Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design.</h2> -<p>Developed and used over two years by a fast-moving online-news operation, Django was designed to handle two challenges: the intensive deadlines of a newsroom and the stringent requirements of the experienced Web developers who wrote it. It lets you build high-performing, elegant Web applications quickly.</p> -<p>Django focuses on automating as much as possible and adhering to the <a href="http://c2.com/cgi/wiki?DontRepeatYourself"><abbr title="Don't Repeat Yourself">DRY</abbr> principle</a>.</p> -<p>Dive in by <a href="http://docs.djangoproject.com/en/dev/intro/overview/">reading the overview →</a></p> -<p>When you're ready to code, read the <a href="http://docs.djangoproject.com/en/dev/intro/install/">installation guide</a> and <a href="http://docs.djangoproject.com/en/dev/intro/tutorial01/">tutorial</a>.</p> -<div id="content-secondary"> - <h2>The Django framework</h2> - <h3>Object-relational mapper</h3> - <p>Define your <a href="http://docs.djangoproject.com/en/dev/topics/db/models/">data models</a> entirely in Python. You get a rich, <a href="http://docs.djangoproject.com/en/dev/topics/db/queries/">dynamic database-access API</a> for free — but you can still write SQL if needed.</p> - <h3>Automatic admin interface</h3> - <p>Save yourself the tedious work of creating interfaces for people to add and update content. <a href="http://docs.djangoproject.com/en/dev/intro/tutorial02/">Django does that automatically</a>, and it's production-ready.</p> - <h3>Elegant URL design</h3> - <p>Design pretty, <a href="http://docs.djangoproject.com/en/dev/topics/http/urls/">cruft-free URLs</a> with no framework-specific limitations. Be as flexible as you like.</p> - <h3>Template system</h3> - <p>Use Django's powerful, extensible and designer-friendly <a href="http://docs.djangoproject.com/en/dev/topics/templates/">template language</a> to separate design, content and Python code.</p> - <h3>Cache system</h3> - <p>Hook into memcached or other cache frameworks for <a href="http://docs.djangoproject.com/en/dev/topics/cache/">super performance</a> — caching is as granular as you need.</p> - <h3>Internationalization</h3> - <p>Django has full support for <a href="http://docs.djangoproject.com/en/dev/topics/i18n/">multi-language applications</a>, letting you specify translation strings and providing hooks for language-specific functionality.</p> -</div> -<!-- END #content-secondary --> -{% endblock %} - -{% block content-related %} - -<h2>Download</h2> -<ul class="linklist"> - <li class="button-download"><a href="/download/">Latest release: <strong>0.96</strong></a></li> -</ul> -<p>Open source, <a href="http://code.djangoproject.com/browser/django/trunk/LICENSE">BSD license</a></p> -<h2>Documentation</h2> -<ul class="linklist"> - <li><a href="http://docs.djangoproject.com/en/dev/intro/install/">Installation guide</a></li> - <li><a href="http://docs.djangoproject.com/en/dev/intro/tutorial01/">Tutorial</a></li> - <li><a href="http://docs.djangoproject.com/en/dev/#using-django">Using Django</a></li> - <li><a href="http://docs.djangoproject.com/en/dev/#reference">Reference</a></li> - <li><a href="http://docs.djangoproject.com/">More...</a></li> -</ul> -<h2>Sites that use Django</h2> -<dl> - <dt><a href="http://www.lawrence.com/">lawrence.com</a></dt> - <dd>An internationally renowned local-entertainment site with events, stories, bands, drink specials and more.</dd> - <dt><a href="http://projects.washingtonpost.com/congress/">washingtonpost.com</a></dt> - <dd>The Washington Post's growing selection of innovative Web database applications.</dd> - <dt><a href="http://www.everyblock.com/">EveryBlock</a></dt> - <dd>A news feed for your block.</dd> - <dt><a href="http://www.ljworld.com/">LJWorld.com</a></dt> - <dd>An industry-leading newspaper site.</dd> - <dt><a href="http://www.pownce.com/">Pownce</a></dt> - <dd>Send stuff to your friends.</dd> - <dt><a href="http://www.tabblo.com/">Tabblo</a></dt> - <dd>An innovative photo-sharing site, with a narrative twist.</dd> - <dt><a href="http://www.torontolife.com/">Toronto Life</a></dt> - <dd>Toronto's city magazine.</dd> -</dl> -<p><a href="http://code.djangoproject.com/wiki/DjangoPoweredSites">See more sites...</a></p> -{% endblock %} - -{% block content-extra %} -<h2>Weblog</h2> -{% load weblog %}{% render_latest_blog_entries 4 %} -{% endblock %} Copied: djangoproject.com/django_website/templates/homepage.html (from rev 9070, djangoproject.com/django_website/templates/flatpages/homepage.html) =================================================================== --- djangoproject.com/django_website/templates/homepage.html (rev 0) +++ djangoproject.com/django_website/templates/homepage.html 2008-09-19 20:49:50 UTC (rev 9073) @@ -0,0 +1,72 @@ +{% extends "base_3col.html" %} + +{% block cssid %}homepage{% endblock %} + +{% block sectionid %}homepage{% endblock %} + +{% block billboard %}<h2>The Web framework for perfectionists (with deadlines). Django makes it easier to build better Web apps more quickly and with less code.</h2>{% endblock %} + +{% block content %} +<h1>Meet Django</h1> +<h2 class="deck">Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design.</h2> +<p>Developed and used over two years by a fast-moving online-news operation, Django was designed to handle two challenges: the intensive deadlines of a newsroom and the stringent requirements of the experienced Web developers who wrote it. It lets you build high-performing, elegant Web applications quickly.</p> +<p>Django focuses on automating as much as possible and adhering to the <a href="http://c2.com/cgi/wiki?DontRepeatYourself"><abbr title="Don't Repeat Yourself">DRY</abbr> principle</a>.</p> +<p>Dive in by <a href="http://docs.djangoproject.com/en/dev/intro/overview/">reading the overview →</a></p> +<p>When you're ready to code, read the <a href="http://docs.djangoproject.com/en/dev/intro/install/">installation guide</a> and <a href="http://docs.djangoproject.com/en/dev/intro/tutorial01/">tutorial</a>.</p> +<div id="content-secondary"> + <h2>The Django framework</h2> + <h3>Object-relational mapper</h3> + <p>Define your <a href="http://docs.djangoproject.com/en/dev/topics/db/models/">data models</a> entirely in Python. You get a rich, <a href="http://docs.djangoproject.com/en/dev/topics/db/queries/">dynamic database-access API</a> for free — but you can still write SQL if needed.</p> + <h3>Automatic admin interface</h3> + <p>Save yourself the tedious work of creating interfaces for people to add and update content. <a href="http://docs.djangoproject.com/en/dev/intro/tutorial02/">Django does that automatically</a>, and it's production-ready.</p> + <h3>Elegant URL design</h3> + <p>Design pretty, <a href="http://docs.djangoproject.com/en/dev/topics/http/urls/">cruft-free URLs</a> with no framework-specific limitations. Be as flexible as you like.</p> + <h3>Template system</h3> + <p>Use Django's powerful, extensible and designer-friendly <a href="http://docs.djangoproject.com/en/dev/topics/templates/">template language</a> to separate design, content and Python code.</p> + <h3>Cache system</h3> + <p>Hook into memcached or other cache frameworks for <a href="http://docs.djangoproject.com/en/dev/topics/cache/">super performance</a> — caching is as granular as you need.</p> + <h3>Internationalization</h3> + <p>Django has full support for <a href="http://docs.djangoproject.com/en/dev/topics/i18n/">multi-language applications</a>, letting you specify translation strings and providing hooks for language-specific functionality.</p> +</div> +<!-- END #content-secondary --> +{% endblock %} + +{% block content-related %} + +<h2>Download</h2> +<ul class="linklist"> + <li class="button-download"><a href="/download/">Latest release: <strong>0.96</strong></a></li> +</ul> +<p>Open source, <a href="http://code.djangoproject.com/browser/django/trunk/LICENSE">BSD license</a></p> +<h2>Documentation</h2> +<ul class="linklist"> + <li><a href="http://docs.djangoproject.com/en/dev/intro/install/">Installation guide</a></li> + <li><a href="http://docs.djangoproject.com/en/dev/intro/tutorial01/">Tutorial</a></li> + <li><a href="http://docs.djangoproject.com/en/dev/#using-django">Using Django</a></li> + <li><a href="http://docs.djangoproject.com/en/dev/#reference">Reference</a></li> + <li><a href="http://docs.djangoproject.com/">More...</a></li> +</ul> +<h2>Sites that use Django</h2> +<dl> + <dt><a href="http://www.lawrence.com/">lawrence.com</a></dt> + <dd>An internationally renowned local-entertainment site with events, stories, bands, drink specials and more.</dd> + <dt><a href="http://projects.washingtonpost.com/congress/">washingtonpost.com</a></dt> + <dd>The Washington Post's growing selection of innovative Web database applications.</dd> + <dt><a href="http://www.everyblock.com/">EveryBlock</a></dt> + <dd>A news feed for your block.</dd> + <dt><a href="http://www.ljworld.com/">LJWorld.com</a></dt> + <dd>An industry-leading newspaper site.</dd> + <dt><a href="http://www.pownce.com/">Pownce</a></dt> + <dd>Send stuff to your friends.</dd> + <dt><a href="http://www.tabblo.com/">Tabblo</a></dt> + <dd>An innovative photo-sharing site, with a narrative twist.</dd> + <dt><a href="http://www.torontolife.com/">Toronto Life</a></dt> + <dd>Toronto's city magazine.</dd> +</dl> +<p><a href="http://code.djangoproject.com/wiki/DjangoPoweredSites">See more sites...</a></p> +{% endblock %} + +{% block content-extra %} +<h2>Weblog</h2> +{% load weblog %}{% render_latest_blog_entries 4 %} +{% endblock %} Modified: djangoproject.com/django_website/templates/registration/registration_form.html =================================================================== --- djangoproject.com/django_website/templates/registration/registration_form.html 2008-09-19 19:45:54 UTC (rev 9072) +++ djangoproject.com/django_website/templates/registration/registration_form.html 2008-09-19 20:49:50 UTC (rev 9073) @@ -5,55 +5,41 @@ {% block content %} {% if form.errors %} - <p class="error">Please correct the errors below: {{ form.non_field_errors }}</p> + <p class="errors">Please correct the errors below: {{ form.non_field_errors }}</p> {% endif %} <h1>Create an account</h1> - <form method="post" action=""> - <dl> - <dt> - <label for="id_username">Username:</label> - </dt> - <dd> - {{ form.username }} - {% if form.username.errors %} - <span class="error">* {{ form.username.errors|join:", " }}</span> - {% endif %} - </dd> - - <dt> - <label for="id_email">Email address:</label> - </dt> - <dd> - {{ form.email }} - {% if form.email.errors %} - <span class="error">* {{ form.email.errors|join:", " }}</span> - {% endif %} - </dd> - - <dt> - <label for="id_password1">Password:</label> - </dt> - <dd> - {{ form.password1 }} - {% if form.password1.errors %} - <span class="error">* {{ form.password2.errors|join:", " }}</span> - {% endif %} - </dd> - - <dt> - <label for="id_password2">Password (type again to catch typos):</label> - </dt> - <dd> - {{ form.password2 }} - {% if form.password2.errors %} - <span class="error">* {{ form.password2.errors|join:", " }}</span> - {% endif %} - </dd> - - <dt><input type="submit" value="Register" /></dt> - </dl> + <form method="post" action="" class="wide"> + <p> + <label for="id_username">Username:</label> + {% if form.username.errors %} + <p class="errors">{{ form.username.errors.as_text }}</p> + {% endif %} + {{ form.username }} + </p> + <p> + <label for="id_email">Email address:</label> + {% if form.email.errors %} + <p class="errors">{{ form.email.errors.as_text }}</p> + {% endif %} + {{ form.email }} + </p> + <p> + <label for="id_password1">Password:</label> + {% if form.password1.errors %} + <p class="errors">{{ form.password1.errors.as_text }}</p> + {% endif %} + {{ form.password1 }} + </p> + <p> + <label for="id_password2">Password (type again to catch typos):</label> + {% if form.password2.errors %} + <p class="errors">{{ form.password2.errors.as_text }}</p> + {% endif %} + {{ form.password2 }} + </p> + <p class="submit"><input type="submit" value="Register →"></p> </form> {% endblock %} Added: djangoproject.com/django_website/upgrade/upgrade-to-1.0.sql =================================================================== --- djangoproject.com/django_website/upgrade/upgrade-to-1.0.sql (rev 0) +++ djangoproject.com/django_website/upgrade/upgrade-to-1.0.sql 2008-09-19 20:49:50 UTC (rev 9073) @@ -0,0 +1,16 @@ +begin; +delete from django_admin_log; +delete from comments_freecomment where content_type_id = 13; + +INSERT INTO django_comments + (content_type_id, object_pk, site_id, user_name, user_email, user_url, + comment, submit_date, ip_address, is_public, is_removed) +SELECT + content_type_id, object_id, site_id, person_name, '', '', comment, + submit_date, ip_address, is_public, approved +FROM comments_freecomment; + +drop table comments_freecomment; +drop table comments_comment cascade; + +commit; \ No newline at end of file Modified: djangoproject.com/django_website/urls.py =================================================================== --- djangoproject.com/django_website/urls.py 2008-09-19 19:45:54 UTC (rev 9072) +++ djangoproject.com/django_website/urls.py 2008-09-19 20:49:50 UTC (rev 9073) @@ -1,6 +1,8 @@ +from django.conf import settings from django.conf.urls.defaults import * -from django.contrib.comments.feeds import LatestFreeCommentsFeed -from django.contrib.comments.models import FreeComment +from django.contrib import admin +from django.contrib.comments.feeds import LatestCommentFeed +from django.contrib.comments.models import Comment from django.contrib.sitemaps import views as sitemap_views from django_website.apps.aggregator.feeds import CommunityAggregatorFeed from django_website.apps.aggregator.models import FeedItem @@ -9,7 +11,7 @@ from django.views.decorators.cache import cache_page comments_info_dict = { - 'queryset': FreeComment.objects.filter(is_public=True), + 'queryset': Comment.objects.filter(is_public=True).order_by('-submit_date'), 'paginate_by': 15, } @@ -20,7 +22,7 @@ feeds = { 'weblog': WeblogEntryFeed, - 'comments': LatestFreeCommentsFeed, + 'comments': LatestCommentFeed, 'community': CommunityAggregatorFeed, } @@ -30,11 +32,11 @@ } urlpatterns = patterns('', - (r'freenode\.9xJY7YIUWtwn\.html', 'django.views.generic.simple.direct_to_template', {'template': 'freenode_tmp.html'}), + (r'^$', 'django.views.generic.simple.direct_to_template', {'template': 'homepage.html'}), (r'^accounts/', include('django_website.apps.accounts.urls')), - (r'^admin/', include('django.contrib.admin.urls')), + (r'^admin/(.*)', admin.site.root), (r'^comments/$', 'django.views.generic.list_detail.object_list', comments_info_dict), - (r'^comments/', include('django.contrib.comments.urls.comments')), + (r'^comments/', include('django.contrib.comments.urls')), (r'^community/$', 'django.views.generic.list_detail.object_list', aggregator_info_dict), (r'^contact/', include('django_website.apps.contact.urls')), (r'^documentation/', include('django_website.apps.docs.urls')), @@ -42,5 +44,8 @@ (r'^rss/(?P<url>.*)/$', 'django.contrib.syndication.views.feed', {'feed_dict': feeds}), (r'^sitemap.xml$', cache_page(sitemap_views.sitemap, 60 * 60 * 6), {'sitemaps': sitemaps}), (r'^weblog/', include('django_website.apps.blog.urls')), + (r'^freenode\.9xJY7YIUWtwn\.html$', 'django.views.generic.simple.direct_to_template', {'template': 'freenode_tmp.html'}), (r'', include('django.contrib.flatpages.urls')), ) + +admin.autodiscover() \ No newline at end of file Modified: djangoproject.com/djangodocs/forms.py =================================================================== --- djangoproject.com/djangodocs/forms.py 2008-09-19 19:45:54 UTC (rev 9072) +++ djangoproject.com/djangodocs/forms.py 2008-09-19 20:49:50 UTC (rev 9073) @@ -1,4 +1,4 @@ -from django import newforms as forms +from django import forms AS_Q_CHOICES = ( ('more:dev_docs', 'Latest'), Modified: djangoproject.com/djangodocs/templates/docs/doc.html =================================================================== --- djangoproject.com/djangodocs/templates/docs/doc.html 2008-09-19 19:45:54 UTC (rev 9072) +++ djangoproject.com/djangodocs/templates/docs/doc.html 2008-09-19 20:49:50 UTC (rev 9073) @@ -38,7 +38,7 @@ {% block content %} {% block body %} - {{ doc.body }} + {{ doc.body|safe }} {% endblock %} <div id="content-secondary"> @@ -75,7 +75,7 @@ {% block toc-wrapper %} <h2>Contents</h2> {% block toc %} - {{ doc.toc }} + {{ doc.toc|safe }} {% endblock %} {% endblock %} Modified: djangoproject.com/djangodocs/templates/docs/search_form.html =================================================================== --- djangoproject.com/djangodocs/templates/docs/search_form.html 2008-09-19 19:45:54 UTC (rev 9072) +++ djangoproject.com/djangodocs/templates/docs/search_form.html 2008-09-19 20:49:50 UTC (rev 9073) @@ -9,4 +9,4 @@ {{ form.as_q }} </div> </form> -<script type="text/javascript" src="http://www.google.com/coop/cse/brand?form={{ search_form_id|escape }}&lang={{ lang|escape }}"></script> \ No newline at end of file +<script type="text/javascript" src="http://www.google.com/coop/cse/brand?form={{ search_form_id|escape }}&lang={{ lang|escape }}"></script> \ No newline at end of file --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-updates?hl=en -~----------~----~----~----~------~----~------~--~---
