Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Another big bunch of upgrades.

  • Loading branch information...
commit 2e9d9af1f033c2cd0b36dabcfae792e83d818a32 1 parent 5baf2ba
@jacobian jacobian authored
View
27 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'
+ ),
+)
+
View
2  django_website/blog/templatetags/weblog.py
@@ -2,7 +2,7 @@
import datetime
from django import template
-from .models import Entry
+from ..models import Entry
register = template.Library()
View
0  django_website/legacy/__init_.py → django_website/legacy/__init__.py
File renamed without changes
View
18 django_website/legacy/docurls.py
@@ -1,18 +0,0 @@
-"""
-Legacy URLs for documentation pages.
-"""
-
-from __future__ import absolute_import
-
-from django.conf.urls.defaults import *
-from .views import gone
-
-urlpatterns = patterns('',
- (r'^$', gone),
- (r'^(?P<version>[\d.]+)/$', gone),
- (r'^models/$', gone),
- (r'^models/(?P<slug>\w+)/$', gone),
- (r'^(?P<version>[\d.]+)/models/$', gone),
- (r'^(?P<version>[\d.]+)/models/(?P<slug>\w+)/$', gone),
- (r'^(?P<version>[\d.]+)/(?P<slug>[\w\.-]+)/$', gone),
-)
View
18 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),
+)
View
1  django_website/settings.py
@@ -46,7 +46,6 @@
'django.contrib.sessions',
'django.contrib.sitemaps',
'django_website.blog',
- 'django_website.docs',
'django_website.aggregator',
'registration',
)
View
16 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;
+
View
7 django_website/urls.py
@@ -17,11 +17,6 @@
'paginate_by': 15,
}
-aggregator_info_dict = {
- 'queryset': FeedItem.objects.select_related(),
- 'paginate_by': 15,
-}
-
feeds = {
'weblog': WeblogEntryFeed,
'comments': LatestCommentFeed,
@@ -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"),
)
View
9 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)
View
9 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)
View
3  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
Please sign in to comment.
Something went wrong with that request. Please try again.