Skip to content

Commit a67c829

Browse files
committed
make this work with django 1.4
1 parent e9e9aaa commit a67c829

File tree

98 files changed

+14667
-16
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

98 files changed

+14667
-16
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
*.pyc
22
settings.py
3+
dotdorset.sqlite3

aggregator/feed.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
from django.contrib.syndication.feeds import Feed as DjangoFeed
2-
from django.contrib.syndication.feeds import FeedDoesNotExist
1+
from django.contrib.syndication.views import Feed as DjangoFeed
2+
from django.contrib.syndication.views import FeedDoesNotExist
33
from dotdorset.aggregator.models import FeedItem, Feed, Category
44

55
class CategoryFeed(DjangoFeed):
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

aggregator/templates/aggregator_index.html

+6-6
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<h2>Putting Dorset on the digital map. <a href="/join/"><strong>Join us.</strong></a></h2>
77
</div>
88
<div id="blogs">
9-
<h2>Blogs <a href="/feeds/categories/Blogs"><img src="/images/feed.png" alt="RSS Feed" /></a></h2>
9+
<h2>Blogs <a href="/feeds/categories/Blogs"><img src="{{ STATIC_URL }}images/feed.png" alt="RSS Feed" /></a></h2>
1010
<p>To have your blog listed here, email <a href="mailto:[email protected]">[email protected]</a></p>
1111
{% for item in blogitems %}
1212
<h3><a href="{{ item.link }}">{{ item.title }}</a></h3>
@@ -16,7 +16,7 @@ <h4><a href="{{ item.feed.link }}">{{ item.feed }}</a></h4>
1616
</div>
1717

1818
<div id="events">
19-
<h2>Events <a href="/feeds/categories/Events"><img src="/images/feed.png" alt="RSS Feed" /></a></h2>
19+
<h2>Events <a href="/feeds/categories/Events"><img src="{{ STATIC_URL }}images/feed.png" alt="RSS Feed" /></a></h2>
2020
<p>To get your Dorset events listed here, add them to the <a href="http://upcoming.yahoo.com/group/4604/">Dorset Web Group</a> on upcoming.</p>
2121
{% for item in eventitems %}
2222
<h3><a href="{{ item.link }}">{{ item.title }}</a></h3>
@@ -28,7 +28,7 @@ <h3><a href="{{ item.link }}">{{ item.title }}</a></h3>
2828

2929

3030
<div id="jobs">
31-
<h2>Jobs <a href="/feeds/categories/Jobs"><img src="/images/feed.png" alt="RSS Feed" /></a></h2>
31+
<h2>Jobs <a href="/feeds/categories/Jobs"><img src="{{ STATIC_URL }}images/feed.png" alt="RSS Feed" /></a></h2>
3232
<p>If you're a web company based in Dorset, and have have an RSS feed for your jobs, email <a href="mailto:[email protected]">[email protected]</a> to get listed here for <strong>free !</strong></p>
3333
{% for item in jobitems %}
3434
<h3><a href="{{ item.link }}">{{ item.title }}</a></h3>
@@ -47,7 +47,7 @@ <h3><a href="{{ item.link }}">{{ item.title }}</a></h3>
4747
</div>
4848

4949
<div id="twitter">
50-
<h2><a href="http://twitter.com/dotdorset">Twitter</a> <a href="/feeds/categories/Twitter"><img src="/images/feed.png" alt="RSS Feed" /></a></h2>
50+
<h2><a href="http://twitter.com/dotdorset">Twitter</a> <a href="/feeds/categories/Twitter"><img src="{{ STATIC_URL }}images/feed.png" alt="RSS Feed" /></a></h2>
5151
<p>Follow <a href="http://twitter.com/dotdorset"><strong>@dotdorset</strong></a> if you want to appear here !</p>
5252
{% for item in twitteritems %}
5353
<div class="content{% cycle '' ' even' %}">
@@ -61,7 +61,7 @@ <h2><a href="http://twitter.com/dotdorset">Twitter</a> <a href="/feeds/categorie
6161
</div>
6262

6363
<div id="mailinglist">
64-
<h2><a href="http://groups.google.com/group/dotdorset">Mailing List</a> <a href="http://groups.google.com/group/dotdorset/feed/rss_v2_0_msgs.xml"><img src="/images/feed.png" alt="RSS Feed" /></a></h2>
64+
<h2><a href="http://groups.google.com/group/dotdorset">Mailing List</a> <a href="http://groups.google.com/group/dotdorset/feed/rss_v2_0_msgs.xml"><img src="{{ STATIC_URL }}images/feed.png" alt="RSS Feed" /></a></h2>
6565
<p>To subscribe to the mailing list, either <a href="http://groups.google.com/group/dotdorset"><strong>join the google group</strong></a> or email <a href="mailto:[email protected]"><strong>[email protected]</strong></a>.</p>
6666
{% for item in mlitems %}
6767
<h3><a href="{{ item.link }}">{{ item.title }}</a></h3>
@@ -75,7 +75,7 @@ <h3><a href="{{ item.link }}">{{ item.title }}</a></h3>
7575
{% endfor %}
7676
</div>
7777
<div id="bookmarks">
78-
<h2>Bookmarks <a href="/feeds/categories/Bookmarks"><img src="/images/feed.png" alt="RSS Feed" /></a></h2>
78+
<h2>Bookmarks <a href="/feeds/categories/Bookmarks"><img src="{{ STATIC_URL }}images/feed.png" alt="RSS Feed" /></a></h2>
7979
<p>To have your bookmarks listed here, email <a href="mailto:[email protected]">[email protected]</a></p>
8080
{% for item in bookmarkitems %}
8181
<div class="content{% cycle '' ' even' %}">

aggregator/templatetags/__init__.pyc

-17 Bytes
Binary file not shown.
-51 Bytes
Binary file not shown.

aggregator/views.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
from dotdorset.settings import GOOGLE_MAPS_API_KEYS
44
from django.template import Template
55
from django.template.loader import render_to_string
6+
from django.template import RequestContext
67
import pprint
78

89
def index(request):
@@ -14,5 +15,6 @@ def index(request):
1415
totemplate['jobitems'] = FeedItem.objects.filter(feed__category__name='Jobs').order_by('-pub_date')[0:3]
1516
totemplate['bookmarkitems'] = FeedItem.objects.filter(feed__category__name='Bookmarks').order_by('-pub_date')[0:20]
1617
totemplate['eventitems'] = FeedItem.objects.filter(feed__category__name='Events').order_by('-pub_date')[0:3]
17-
rendered = render_to_string('aggregator_index.html', totemplate)
18+
context = RequestContext(request, totemplate)
19+
rendered = render_to_string('aggregator_index.html', context)
1820
return HttpResponse(rendered)

0 commit comments

Comments
 (0)