Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

[djangoproject.com] updated website to use Django 1.0.

git-svn-id: http://code.djangoproject.com/svn/djangoproject.com@9073 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 640482a883e95b346af6157c8f27a5f21d354c89 1 parent 5ab5acd
authored September 19, 2008

Showing 26 changed files with 165 additions and 171 deletions. Show diff stats Hide diff stats

  1. 17  django_website/apps/aggregator/admin.py
  2. 19  django_website/apps/aggregator/models.py
  3. 6  django_website/apps/blog/admin.py
  4. 35  django_website/apps/blog/models.py
  5. 2  django_website/apps/contact/forms.py
  6. 4  django_website/apps/docs/models.py
  7. 4  django_website/settings.py
  8. 6  django_website/templates/blog/entry_archive.html
  9. 4  django_website/templates/blog/entry_archive_day.html
  10. 4  django_website/templates/blog/entry_archive_month.html
  11. 12  django_website/templates/blog/entry_detail.html
  12. 2  django_website/templates/blog/entry_snippet.html
  13. 1  django_website/templates/comments/base.html
  14. 0  django_website/templates/comments/{freecomment_list.html → comment_list.html}
  15. 22  django_website/templates/comments/form.html
  16. 45  django_website/templates/comments/free_preview.html
  17. 10  django_website/templates/comments/freeform.html
  18. 7  django_website/templates/comments/preview.html
  19. 17  django_website/templates/contact/foundation.html
  20. 0  django_website/templates/{flatpages → }/homepage.html
  21. 76  django_website/templates/registration/registration_form.html
  22. 16  django_website/upgrade/upgrade-to-1.0.sql
  23. 19  django_website/urls.py
  24. 2  djangodocs/forms.py
  25. 4  djangodocs/templates/docs/doc.html
  26. 2  djangodocs/templates/docs/search_form.html
17  django_website/apps/aggregator/admin.py
... ...
@@ -0,0 +1,17 @@
  1
+from django.contrib import admin
  2
+from django_website.apps.aggregator.models import Feed, FeedItem
  3
+
  4
+admin.site.register(Feed, 
  5
+    list_display  = ["title", "public_url", "is_defunct"],
  6
+    list_filter   = ["is_defunct"],
  7
+    ordering      = ["title"],
  8
+    search_fields = ["title", "public_url"],
  9
+    list_per_page = 500,
  10
+)
  11
+
  12
+admin.site.register(FeedItem, 
  13
+    list_display   = ['title', 'feed', 'date_modified'],
  14
+    list_filter    = ['feed'],
  15
+    search_fields  = ['feed__title', 'feed__public_url', 'title'],
  16
+    date_heirarchy = ['date_modified'],
  17
+)
19  django_website/apps/aggregator/models.py
... ...
@@ -1,31 +1,24 @@
1 1
 from django.db import models
2 2
 
3 3
 class Feed(models.Model):
4  
-    title = models.CharField(maxlength=500)
5  
-    feed_url = models.URLField(unique=True, maxlength=500)
6  
-    public_url = models.URLField(maxlength=500)
  4
+    title = models.CharField(max_length=500)
  5
+    feed_url = models.URLField(unique=True, max_length=500)
  6
+    public_url = models.URLField(max_length=500)
7 7
     is_defunct = models.BooleanField()
8 8
 
9 9
     class Meta:
10 10
         db_table = 'aggregator_feeds'
11 11
 
12  
-    class Admin:
13  
-        list_display = ["title", "public_url", "is_defunct"]
14  
-        list_filter = ["is_defunct"]
15  
-        ordering = ["title"]
16  
-        search_fields = ["title", "public_url"]
17  
-        list_per_page = 500
18  
-
19 12
     def __unicode__(self):
20 13
         return self.title
21 14
 
22 15
 class FeedItem(models.Model):
23 16
     feed = models.ForeignKey(Feed)
24  
-    title = models.CharField(maxlength=500)
25  
-    link = models.URLField(maxlength=500)
  17
+    title = models.CharField(max_length=500)
  18
+    link = models.URLField(max_length=500)
26 19
     summary = models.TextField(blank=True)
27 20
     date_modified = models.DateTimeField()
28  
-    guid = models.CharField(maxlength=500, unique=True, db_index=True)
  21
+    guid = models.CharField(max_length=500, unique=True, db_index=True)
29 22
 
30 23
     class Meta:
31 24
         db_table = 'aggregator_feeditems'
6  django_website/apps/blog/admin.py
... ...
@@ -0,0 +1,6 @@
  1
+from django.contrib import admin
  2
+from django_website.apps.blog.models import Entry
  3
+
  4
+admin.site.register(Entry,
  5
+    list_display = ('pub_date', 'headline', 'author'),
  6
+)
35  django_website/apps/blog/models.py
... ...
@@ -1,14 +1,18 @@
  1
+import akismet
1 2
 import datetime
  3
+from django.conf import settings
2 4
 from django.db import models
3  
-from comment_utils.moderation import CommentModerator, moderator
  5
+from django.contrib.sites.models import Site
  6
+from django.contrib.comments.signals import comment_was_posted
  7
+from django.utils.encoding import smart_str
4 8
 
5 9
 class Entry(models.Model):
6 10
     pub_date = models.DateTimeField()
7 11
     slug = models.SlugField(unique_for_date='pub_date')
8  
-    headline = models.CharField(maxlength=200)
  12
+    headline = models.CharField(max_length=200)
9 13
     summary = models.TextField(help_text="Use raw HTML.")
10 14
     body = models.TextField(help_text="Use raw HTML.")
11  
-    author = models.CharField(maxlength=100)
  15
+    author = models.CharField(max_length=100)
12 16
 
13 17
     class Meta:
14 18
         db_table = 'blog_entries'
@@ -16,9 +20,6 @@ class Meta:
16 20
         ordering = ('-pub_date',)
17 21
         get_latest_by = 'pub_date'
18 22
 
19  
-    class Admin:
20  
-        list_display = ('pub_date', 'headline', 'author')
21  
-
22 23
     def __unicode__(self):
23 24
         return self.headline
24 25
 
@@ -30,8 +31,20 @@ def comments_enabled(self):
30 31
         delta = datetime.datetime.now() - self.pub_date
31 32
         return delta.days < 60
32 33
 
33  
-class EntryModerator(CommentModerator):
34  
-    akismet = True
35  
-    enable_field = "comments_enabled"
36  
-
37  
-moderator.register(Entry, EntryModerator)
  34
+def moderate_comment(sender, comment, request, **kwargs):
  35
+    ak = akismet.Akismet(
  36
+        key = settings.AKISMET_API_KEY,
  37
+        blog_url = 'http://%s/' % Site.objects.get_current().domain
  38
+    )
  39
+    data = {
  40
+        'user_ip': request.META.get('REMOTE_ADDR', '127.0.0.1'),
  41
+        'user_agent': request.META.get('HTTP_USER_AGENT', ''),
  42
+        'referrer': request.META.get('HTTP_REFERRER', ''),
  43
+        'comment_type': 'comment',
  44
+        'comment_author': smart_str(comment.user_name),
  45
+    }
  46
+    if ak.comment_check(smart_str(comment.comment), data=data, build_data=True):
  47
+        comment.is_public = False
  48
+        comment.save()
  49
+    
  50
+comment_was_posted.connect(moderate_comment)
2  django_website/apps/contact/forms.py
... ...
@@ -1,5 +1,5 @@
1 1
 import textwrap
2  
-from django import newforms as forms
  2
+from django import forms
3 3
 from contact_form.forms import AkismetContactForm
4 4
 
5 5
 attrs = {'class': 'required'}
4  django_website/apps/docs/models.py
... ...
@@ -1,8 +1,8 @@
1 1
 from django.db import models
2 2
 
3 3
 class DocumentRelease(models.Model):
4  
-    version = models.CharField(maxlength=20, unique=True)
5  
-    repository_path = models.CharField(maxlength=50, help_text="(i.e. 'tags/releases/0.95' or 'branches/0.95-bugfixes')")
  4
+    version = models.CharField(max_length=20, unique=True)
  5
+    repository_path = models.CharField(max_length=50, help_text="(i.e. 'tags/releases/0.95' or 'branches/0.95-bugfixes')")
6 6
     release_date = models.DateField()
7 7
     
8 8
     class Meta:
4  django_website/settings.py
@@ -18,6 +18,7 @@
18 18
     PREPEND_WWW = False
19 19
     CACHE_BACKEND = "dummy:///"
20 20
     DJANGO_SVN_ROOT = "http://code.djangoproject.com/svn/django/"
  21
+    ADMIN_MEDIA_PREFIX = '/media/'
21 22
 else:
22 23
     DEBUG = False
23 24
     PREPEND_WWW = True
@@ -25,6 +26,7 @@
25 26
     CACHE_BACKEND = 'memcached://127.0.0.1:11211/'
26 27
     TEMPLATE_DIRS = ['/home/djangoproject.com/django_website/templates']
27 28
     DJANGO_SVN_ROOT = "file:///home/svn/django/django/"
  29
+    ADMIN_MEDIA_PREFIX = 'http://media.djangoproject.com/admin/'
28 30
 
29 31
 SITE_ID = 1
30 32
 ROOT_URLCONF = 'django_website.urls'
@@ -43,9 +45,7 @@
43 45
     'django_website.apps.docs',
44 46
     'django_website.apps.aggregator',
45 47
     'registration',
46  
-    'comment_utils',
47 48
 )
48  
-ADMIN_MEDIA_PREFIX = 'http://media.djangoproject.com/admin/'
49 49
 MEDIA_ROOT = "/home/html/djangoproject.com/m/"
50 50
 MEDIA_URL = "http://www.djangoproject.com.com/m/"
51 51
 
6  django_website/templates/blog/entry_archive.html
@@ -2,13 +2,11 @@
2 2
 
3 3
 {% block content %}
4 4
 
5  
-{% load comments comment_utils %}
6  
-
7 5
 <h1>Latest entries</h1>
8 6
 
9 7
 {% for object in latest %}
10  
-    <h2><a href="{{ object.get_absolute_url }}">{{ object.headline }}</a></h2>
11  
-    {{ object.body }}
  8
+    <h2><a href="{{ object.get_absolute_url }}">{{ object.headline|safe }}</a></h2>
  9
+    {{ object.body|safe }}
12 10
     <p class="date small">Posted by <strong>{{ object.author }}</strong> on {{ object.pub_date|date:"F j, Y" }}</p>
13 11
 {% endfor %}
14 12
 
4  django_website/templates/blog/entry_archive_day.html
@@ -7,9 +7,9 @@
7 7
 <h1>{{ day|date:"F j" }} archive</h1>
8 8
 
9 9
 {% for object in object_list %}
10  
-<h2><a href="{{ object.get_absolute_url }}">{{ object.headline }}</a></h2>
  10
+<h2><a href="{{ object.get_absolute_url }}">{{ object.headline|safe }}</a></h2>
11 11
 <p class="small date">{{ object.pub_date|date:"F j, Y" }}</p>
12  
-{{ object.body }}
  12
+{{ object.body|safe }}
13 13
 
14 14
 {% endfor %}
15 15
 
4  django_website/templates/blog/entry_archive_month.html
@@ -7,9 +7,9 @@
7 7
 <h1>{{ month|date:"F" }} archive</h1>
8 8
 
9 9
 {% for object in object_list %}
10  
-<h2><a href="{{ object.get_absolute_url }}">{{ object.headline }}</a></h2>
  10
+<h2><a href="{{ object.get_absolute_url }}">{{ object.headline|safe }}</a></h2>
11 11
 <p class="small date">{{ object.pub_date|date:"F j, Y" }}</p>
12  
-{{ object.body }}
  12
+{{ object.body|safe }}
13 13
 
14 14
 {% endfor %}
15 15
 
12  django_website/templates/blog/entry_detail.html
@@ -4,26 +4,26 @@
4 4
 
5 5
 {% block content %}
6 6
 
7  
-<h1>{{ object.headline }}</h1>
8  
-{{ object.body }}
  7
+<h1>{{ object.headline|safe }}</h1>
  8
+{{ object.body|safe }}
9 9
 <p class="date small">Posted by <strong>{{ object.author }}</strong> on {{ object.pub_date|date:"F j, Y" }}</p>
10 10
 
11  
-{% load comments comment_utils %}
12  
-{% get_public_free_comment_list for blog.entry object.id as comment_list %}
  11
+{% load comments %}
  12
+{% get_comment_list for blog.entry object.id as comment_list %}
13 13
 
14 14
 <div id="content-secondary">
15 15
 <h2 id="comments">Comments</h2>
16 16
 
17 17
 {% for comment in comment_list %}
18 18
 <div class="comment" id="c{{ comment.id }}">
19  
-    <h3>{{ comment.person_name|escape }} <span class="small quiet">{{ comment.submit_date|date:"F j, Y" }} at {{ comment.submit_date|date:"P" }}</span></h3>
  19
+    <h3>{{ comment.user_name|escape }} <span class="small quiet">{{ comment.submit_date|date:"F j, Y" }} at {{ comment.submit_date|date:"P" }}</span></h3>
20 20
     {{ comment.comment|escape|urlizetrunc:"40"|linebreaks }}
21 21
 </div>
22 22
 {% endfor %}
23 23
 
24 24
 {% if object.comments_enabled %}
25 25
 <h2>Post a comment</h2>
26  
-{% free_comment_form for blog.entry object.id %}
  26
+{% render_comment_form for blog.entry object.id %}
27 27
 {% else %}
28 28
 <h2>Comments are closed</h2>
29 29
 <p>To prevent spam, comments are no longer allowed after sixty days.</p>
2  django_website/templates/blog/entry_snippet.html
... ...
@@ -1,6 +1,6 @@
1 1
 {% for e in entries %}
2 2
     <h3><a href="{{ e.get_absolute_url }}">{{ e.headline }}</a></h3>
3 3
     <p class="date">by <strong>{{ e.author }}</strong> on {{ e.pub_date|date:"M. j, Y" }}</p>
4  
-    {{ e.summary }}
  4
+    {{ e.summary|safe }}
5 5
     <p class="more"><a href="{{ e.get_absolute_url }}">Read more</a></p>
6 6
 {% endfor %}
1  django_website/templates/comments/base.html
... ...
@@ -0,0 +1 @@
  1
+{% extends "base_weblog.html" %}
0  ..._website/templates/comments/freecomment_list.html → django_website/templates/comments/comment_list.html
File renamed without changes
22  django_website/templates/comments/form.html
... ...
@@ -0,0 +1,22 @@
  1
+{% load comments %}
  2
+<form action="{% comment_form_target %}" method="post" class="wide">
  3
+  {% for field in form %}
  4
+    {% if field.is_hidden %}
  5
+      {{ field }}
  6
+    {% else %}
  7
+      <p
  8
+        {% if field.errors %} class="error"{% endif %}
  9
+        {% ifequal field.name "honeypot" %} style="display:none;"{% endifequal %}>
  10
+        {{ field.label_tag }}
  11
+        {% if field.errors %}
  12
+          <p class="errors">{{ field.errors.as_text }}</p>
  13
+        {% endif %}
  14
+        {{ field }}
  15
+      </p>
  16
+    {% endif %}
  17
+  {% endfor %}
  18
+  <p class="submit">
  19
+    <input type="submit" name="submit" class="submit-post" value="Post" />
  20
+    <input type="submit" name="submit" class="submit-preview" value="Preview" />
  21
+  </p>
  22
+</form>
45  django_website/templates/comments/free_preview.html
... ...
@@ -1,45 +0,0 @@
1  
-{% extends "base.html" %}
2  
-
3  
-{% block title %}Preview comment{% endblock %}
4  
-
5  
-{% block content %}
6  
-
7  
-<style type="text/css">
8  
-#comments textarea { width: 380px; font: 12px verdana,sans-serif; }
9  
-</style>
10  
-
11  
-<h1>Preview your comment</h1>
12  
-
13  
-<form action="../postfree/" method="post">
14  
-
15  
-{% if comment_form.has_errors %}
16  
-    <p><strong style="color: red;">Please correct the following errors.</strong></p>
17  
-{% else %}
18  
-    <div class="comment">
19  
-    {{ comment.comment|escape|urlizetrunc:"40"|linebreaks }}
20  
-    <p class="date small">Posted by <strong>{{ comment.person_name|escape }}</strong></p>
21  
-    </div>
22  
-
23  
-    <p><input type="submit" name="post" value="Post public comment" /></p>
24  
-
25  
-    <h1>Or edit it again</h1>
26  
-{% endif %}
27  
-
28  
-{% if comment_form.person_name.errors %}
29  
-    {{ comment_form.person_name.html_error_list }}
30  
-{% endif %}
31  
-
32  
-<p><label for="id_person_name">Your name:</label> {{ comment_form.person_name }}</p>
33  
-
34  
-{% if comment_form.comment.errors %}
35  
-{{ comment_form.comment.html_error_list }}
36  
-{% endif %}
37  
-
38  
-<p><label for="id_person_name">Comment:</label><br />{{ comment_form.comment }}</p>
39  
-<input type="hidden" name="options" value="{{ options }}" />
40  
-<input type="hidden" name="target" value="{{ target }}" />
41  
-<input type="hidden" name="gonzo" value="{{ hash }}" />
42  
-<p><input type="submit" name="preview" value="Preview revised comment" /></p>
43  
-</form>
44  
-
45  
-{% endblock %}
10  django_website/templates/comments/freeform.html
... ...
@@ -1,10 +0,0 @@
1  
-{% if display_form %}
2  
-<form action="/comments/postfree/" method="post">
3  
-<p>Your name: <input type="text" id="id_person_name" name="person_name" /></p>
4  
-<p>Comment:<br /><textarea name="comment" id="id_comment" rows="10" cols="60"></textarea></p>
5  
-<input type="hidden" name="options" value="{{ options }}" />
6  
-<input type="hidden" name="target" value="{{ target }}" />
7  
-<input type="hidden" name="gonzo" value="{{ hash }}" />
8  
-<p><input type="submit" name="preview" value="Preview comment" /></p>
9  
-</form>
10  
-{% endif %}
7  django_website/templates/comments/preview.html
... ...
@@ -0,0 +1,7 @@
  1
+{% extends "comments/base.html" %}
  2
+
  3
+{% block title %}Preview your comment{% endblock %}
  4
+
  5
+{% block content %}
  6
+  {% include "comments/form.html" %}
  7
+{% endblock %}
17  django_website/templates/contact/foundation.html
@@ -2,24 +2,9 @@
2 2
 
3 3
 {% block title %}Contact the Django Software Foundation{% endblock %}
4 4
 
5  
-{% block extrahead %}
6  
-  {{ block.super }}
7  
-  <style type="text/css" media="screen">
8  
-    form.contact label { display: block; font-weight: bold; margin-top: 1.5em; margin-bottom: 0;}
9  
-    form.contact label span { font-weight: normal; color: #555; }
10  
-    form.contact input, 
11  
-    form.contact textarea, 
12  
-    form.contact select { width: 99%; padding: 1px; }
13  
-    form.contact p { margin: 0; }
14  
-    form.contact p.submit { text-align: right; margin-top: 1em; margin-right: 0;}
15  
-    form.contact p.submit input { width: 10em; font-size: 1.5em; }
16  
-    form.contact p.errors { margin: 0; padding: 0; font-weight: bold; color: red; }
17  
-  </style>
18  
-{% endblock %}
19  
-
20 5
 {% block content %}
21 6
 <h1>Contact the Django Software Foundation</h1>
22  
-<form action="." method="post" accept-charset="utf-8" class="contact">
  7
+<form action="." method="post" accept-charset="utf-8" class="wide">
23 8
   <p>
24 9
     <label for="id_name">Your name:</label>
25 10
     {% if form.name.errors %}<p class="errors">{{ form.name.errors.as_text }}</p>{% endif %}
0  django_website/templates/flatpages/homepage.html → django_website/templates/homepage.html
File renamed without changes
76  django_website/templates/registration/registration_form.html
@@ -5,55 +5,41 @@
5 5
 {% block content %}
6 6
 
7 7
   {% if form.errors %}
8  
-  <p class="error">Please correct the errors below: {{ form.non_field_errors }}</p>
  8
+  <p class="errors">Please correct the errors below: {{ form.non_field_errors }}</p>
9 9
   {% endif %}
10 10
 
11 11
   <h1>Create an account</h1>
12 12
   
13  
-  <form method="post" action="">
14  
-    <dl>
15  
-      <dt>
16  
-        <label for="id_username">Username:</label>
17  
-      </dt>
18  
-      <dd>
19  
-        {{ form.username }}
20  
-        {% if form.username.errors %}
21  
-          <span class="error">* {{ form.username.errors|join:", " }}</span>
22  
-        {% endif %}
23  
-      </dd>
24  
-  
25  
-      <dt>
26  
-        <label for="id_email">Email address:</label>
27  
-      </dt>
28  
-      <dd>
29  
-        {{ form.email }}
30  
-        {% if form.email.errors %}
31  
-          <span class="error">* {{ form.email.errors|join:", " }}</span>
32  
-        {% endif %}
33  
-      </dd>
34  
-  
35  
-      <dt>
36  
-        <label for="id_password1">Password:</label>
37  
-      </dt>
38  
-      <dd>
39  
-        {{ form.password1 }}
40  
-        {% if form.password1.errors %}
41  
-          <span class="error">* {{ form.password2.errors|join:", " }}</span>
42  
-        {% endif %}
43  
-      </dd>
44  
-  
45  
-      <dt>
46  
-        <label for="id_password2">Password (type again to catch typos):</label>
47  
-      </dt>
48  
-      <dd>
49  
-        {{ form.password2 }}
50  
-        {% if form.password2.errors %}
51  
-          <span class="error">* {{ form.password2.errors|join:", " }}</span>
52  
-        {% endif %}
53  
-      </dd>
54  
-
55  
-      <dt><input type="submit" value="Register" /></dt>
56  
-    </dl>
  13
+  <form method="post" action="" class="wide">
  14
+    <p>
  15
+      <label for="id_username">Username:</label>
  16
+      {% if form.username.errors %}
  17
+        <p class="errors">{{ form.username.errors.as_text }}</p>
  18
+      {% endif %}
  19
+      {{ form.username }}
  20
+    </p>
  21
+    <p>
  22
+      <label for="id_email">Email address:</label>
  23
+      {% if form.email.errors %}
  24
+        <p class="errors">{{ form.email.errors.as_text }}</p>
  25
+      {% endif %}
  26
+      {{ form.email }}
  27
+    </p>
  28
+    <p>
  29
+      <label for="id_password1">Password:</label>
  30
+      {% if form.password1.errors %}
  31
+        <p class="errors">{{ form.password1.errors.as_text }}</p>
  32
+      {% endif %}
  33
+      {{ form.password1 }}
  34
+    </p>
  35
+    <p>
  36
+      <label for="id_password2">Password (type again to catch typos):</label>
  37
+      {% if form.password2.errors %}
  38
+        <p class="errors">{{ form.password2.errors.as_text }}</p>
  39
+      {% endif %}
  40
+      {{ form.password2 }}
  41
+    </p>
  42
+    <p class="submit"><input type="submit" value="Register &rarr;"></p>
57 43
   </form>
58 44
   
59 45
 {% endblock %}
16  django_website/upgrade/upgrade-to-1.0.sql
... ...
@@ -0,0 +1,16 @@
  1
+begin;
  2
+delete from django_admin_log;
  3
+delete from comments_freecomment where content_type_id = 13;
  4
+
  5
+INSERT INTO django_comments
  6
+    (content_type_id, object_pk, site_id, user_name, user_email, user_url,
  7
+    comment, submit_date, ip_address, is_public, is_removed)
  8
+SELECT
  9
+    content_type_id, object_id, site_id, person_name, '', '', comment,
  10
+    submit_date, ip_address, is_public, approved
  11
+FROM comments_freecomment;
  12
+
  13
+drop table comments_freecomment;
  14
+drop table comments_comment cascade;
  15
+
  16
+commit;
19  django_website/urls.py
... ...
@@ -1,6 +1,8 @@
  1
+from django.conf import settings
1 2
 from django.conf.urls.defaults import *
2  
-from django.contrib.comments.feeds import LatestFreeCommentsFeed
3  
-from django.contrib.comments.models import FreeComment
  3
+from django.contrib import admin
  4
+from django.contrib.comments.feeds import LatestCommentFeed
  5
+from django.contrib.comments.models import Comment
4 6
 from django.contrib.sitemaps import views as sitemap_views
5 7
 from django_website.apps.aggregator.feeds import CommunityAggregatorFeed
6 8
 from django_website.apps.aggregator.models import FeedItem
@@ -9,7 +11,7 @@
9 11
 from django.views.decorators.cache import cache_page
10 12
 
11 13
 comments_info_dict = {
12  
-    'queryset': FreeComment.objects.filter(is_public=True),
  14
+    'queryset': Comment.objects.filter(is_public=True).order_by('-submit_date'),
13 15
     'paginate_by': 15,
14 16
 }
15 17
 
@@ -20,7 +22,7 @@
20 22
 
21 23
 feeds = {
22 24
     'weblog': WeblogEntryFeed,
23  
-    'comments': LatestFreeCommentsFeed,
  25
+    'comments': LatestCommentFeed,
24 26
     'community': CommunityAggregatorFeed,
25 27
 }
26 28
 
@@ -30,11 +32,11 @@
30 32
 }
31 33
 
32 34
 urlpatterns = patterns('',
33  
-    (r'freenode\.9xJY7YIUWtwn\.html', 'django.views.generic.simple.direct_to_template', {'template': 'freenode_tmp.html'}),
  35
+    (r'^$', 'django.views.generic.simple.direct_to_template', {'template': 'homepage.html'}),
34 36
     (r'^accounts/', include('django_website.apps.accounts.urls')),
35  
-    (r'^admin/', include('django.contrib.admin.urls')),
  37
+    (r'^admin/(.*)', admin.site.root),
36 38
     (r'^comments/$', 'django.views.generic.list_detail.object_list', comments_info_dict),
37  
-    (r'^comments/', include('django.contrib.comments.urls.comments')),
  39
+    (r'^comments/', include('django.contrib.comments.urls')),
38 40
     (r'^community/$', 'django.views.generic.list_detail.object_list', aggregator_info_dict),
39 41
     (r'^contact/', include('django_website.apps.contact.urls')),
40 42
     (r'^documentation/', include('django_website.apps.docs.urls')),
@@ -42,5 +44,8 @@
42 44
     (r'^rss/(?P<url>.*)/$', 'django.contrib.syndication.views.feed', {'feed_dict': feeds}),
43 45
     (r'^sitemap.xml$', cache_page(sitemap_views.sitemap, 60 * 60 * 6), {'sitemaps': sitemaps}),
44 46
     (r'^weblog/', include('django_website.apps.blog.urls')),
  47
+    (r'^freenode\.9xJY7YIUWtwn\.html$', 'django.views.generic.simple.direct_to_template', {'template': 'freenode_tmp.html'}),
45 48
     (r'', include('django.contrib.flatpages.urls')),
46 49
 )
  50
+
  51
+admin.autodiscover()
2  djangodocs/forms.py
... ...
@@ -1,4 +1,4 @@
1  
-from django import newforms as forms
  1
+from django import forms
2 2
 
3 3
 AS_Q_CHOICES = (
4 4
     ('more:dev_docs', 'Latest'),
4  djangodocs/templates/docs/doc.html
@@ -38,7 +38,7 @@
38 38
 {% block content %}
39 39
 
40 40
 {% block body %}
41  
-  {{ doc.body }}
  41
+  {{ doc.body|safe }}
42 42
 {% endblock %}
43 43
 
44 44
 <div id="content-secondary">
@@ -75,7 +75,7 @@ <h2 id="comments">Questions/Feedback</h2>
75 75
   {% block toc-wrapper %}
76 76
     <h2>Contents</h2>
77 77
     {% block toc %}
78  
-      {{ doc.toc }}
  78
+      {{ doc.toc|safe }}
79 79
     {% endblock %}
80 80
   {% endblock %}
81 81
   
2  djangodocs/templates/docs/search_form.html
@@ -9,4 +9,4 @@
9 9
     {{ form.as_q }}
10 10
   </div>
11 11
 </form>
12  
-<script type="text/javascript" src="http://www.google.com/coop/cse/brand?form={{ search_form_id|escape }}&lang={{ lang|escape }}"></script>
  12
+<script type="text/javascript" src="http://www.google.com/coop/cse/brand?form={{ search_form_id|escape }}&amp;lang={{ lang|escape }}"></script>

0 notes on commit 640482a

Please sign in to comment.
Something went wrong with that request. Please try again.