Skip to content

Commit

Permalink
Another big bunch of upgrades.
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobian committed Oct 11, 2010
1 parent 5baf2ba commit 2e9d9af
Show file tree
Hide file tree
Showing 11 changed files with 83 additions and 27 deletions.
27 changes: 27 additions & 0 deletions django_website/aggregator/urls.py
@@ -0,0 +1,27 @@
from __future__ import absolute_import

from django.conf.urls.defaults import *
from . import views

urlpatterns = patterns('',
url(r'^$',
views.index,
name = 'community-index'
),
url(
r'^(?P<feed_type_slug>[-\w]+)/$',
views.feed_list,
name = "community-feed-list"
),
url(
r'^add/$',
views.feed_type_list,
name = "community-add-feed-list"
),
url(
r'^add/(?P<feed_type_slug>[-\w]+)/$',
views.add_feed,
name = 'community-add-feed'
),
)

2 changes: 1 addition & 1 deletion django_website/blog/templatetags/weblog.py
Expand Up @@ -2,7 +2,7 @@

import datetime
from django import template
from .models import Entry
from ..models import Entry

register = template.Library()

Expand Down
File renamed without changes.
18 changes: 0 additions & 18 deletions django_website/legacy/docurls.py

This file was deleted.

18 changes: 18 additions & 0 deletions django_website/legacy/urls.py
@@ -0,0 +1,18 @@
"""
Legacy URLs for documentation pages.
"""

from __future__ import absolute_import

from django.conf.urls.defaults import *
from .views import gone

urlpatterns = patterns('',
(r'^documentation/$', gone),
(r'^documentation/(?P<version>[\d.]+)/$', gone),
(r'^documentation/models/$', gone),
(r'^documentation/models/(?P<slug>\w+)/$', gone),
(r'^documentation/(?P<version>[\d.]+)/models/$', gone),
(r'^documentation/(?P<version>[\d.]+)/models/(?P<slug>\w+)/$', gone),
(r'^documentation/(?P<version>[\d.]+)/(?P<slug>[\w\.-]+)/$', gone),
)
1 change: 0 additions & 1 deletion django_website/settings.py
Expand Up @@ -46,7 +46,6 @@
'django.contrib.sessions',
'django.contrib.sitemaps',
'django_website.blog',
'django_website.docs',
'django_website.aggregator',
'registration',
)
Expand Down
16 changes: 16 additions & 0 deletions django_website/upgrade/upgrade-aggregator-app.sql
@@ -0,0 +1,16 @@
BEGIN;
INSERT INTO aggregator_feedtype (name, slug, can_self_add)
VALUES ('Blog feed', 'feed', true);
ALTER TABLE aggregator_feeds
ADD COLUMN feed_type_id INTEGER NULL
REFERENCES aggregator_feedtype (id) DEFERRABLE INITIALLY DEFERRED;
UPDATE aggregator_feeds
SET feed_type_id = (SELECT id FROM aggregator_feedtype WHERE slug = 'feed');
COMMIT;

-- Can't alter the column in the same transaction as inserting data pointing to it.

BEGIN;
ALTER TABLE aggregator_feeds ALTER COLUMN feed_type_id SET NOT NULL;
COMMIT;

7 changes: 1 addition & 6 deletions django_website/urls.py
Expand Up @@ -17,11 +17,6 @@
'paginate_by': 15,
}

aggregator_info_dict = {
'queryset': FeedItem.objects.select_related(),
'paginate_by': 15,
}

feeds = {
'weblog': WeblogEntryFeed,
'comments': LatestCommentFeed,
Expand Down Expand Up @@ -51,7 +46,7 @@
(r'^r/', include('django.conf.urls.shortcut')),
(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'^weblog/', include('django_website.blog.urls')),
(r'^freenode\.9xJY7YIUWtwn\.html$', 'django.views.generic.simple.direct_to_template', {'template': 'freenode_tmp.html'}),
url(r'^download$', 'django.contrib.flatpages.views.flatpage', {'url': 'download'}, name="download"),
)
Expand Down
9 changes: 9 additions & 0 deletions manage-docs.py
@@ -0,0 +1,9 @@
#!/usr/bin/env python

import os
import sys
sys.path.append(os.path.abspath(os.path.dirname(__file__)))

import djangodocs.settings
from django.core.management import execute_manager
execute_manager(djangodocs.settings)
9 changes: 9 additions & 0 deletions manage-www.py
@@ -0,0 +1,9 @@
#!/usr/bin/env python

import os
import sys
sys.path.append(os.path.abspath(os.path.dirname(__file__)))

import django_website.settings
from django.core.management import execute_manager
execute_manager(django_website.settings)
3 changes: 2 additions & 1 deletion requirements.txt
@@ -1,4 +1,5 @@
Django >= 1.2, < 1.3
django-registration == 0.7
akismet == 0.2.0
FeedParser == 4.1
FeedParser >= 4.1, < 5.0
psycopg2 >= 2.2, < 2.3

0 comments on commit 2e9d9af

Please sign in to comment.