GitHub Sale: sign up for any paid plan this week and pay nothing until January 1, 2009!  [ hide ]

public
Description: stuff for my site
Homepage: http://www.thescoop.org/docs
Clone URL: git://github.com/dwillis/thescoop.git
Derek Willis (author)
Thu Jul 10 17:32:57 -0700 2008
thescoop / urls.py
100644 76 lines (64 sloc) 3.596 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
from django.conf.urls.defaults import *
from django.views.generic import list_detail, date_based, create_update
from thescoop.car.models import Byline, Datatype, Nation, Source, State, Story, Topic, Type, Database, Application
from thescoop.projects.models import Language, Project, Update, Presentation, Topic
from thescoop.feeds import LatestEntries, LatestBylines, LatestSources, TopicFeed, SourceFeed, BylineFeed
from django.contrib import admin
 
info_dict = {
    'queryset': Story.objects.all().order_by('-pubdate'),
    'date_field':'pubdate',
}
 
byline_list_info = {
  'queryset': Byline.objects.all().order_by('lastname'),
  'allow_empty': True,
  'paginate_by': 50,
  'template_name': 'byline_list.html',
}
 
feeds = {
    'latest': LatestEntries,
    'bylines': LatestBylines,
    'sources': LatestSources,
    'topic': TopicFeed,
    'source': SourceFeed,
    'byline': BylineFeed,
}
 
 
urlpatterns = patterns('',
    # Redirects to deal with blog.thescoop.org subdomain:
    (r'^feed/$', 'thescoop.car.views.blog_feed'),
    (r'^$', 'thescoop.car.views.blog_main'),
 
    (r'^docs/$', 'thescoop.car.views.main'),
    (r'^docs/story/(.*)/$', 'thescoop.car.views.story_detail'),
    (r'^docs/withdb/$', 'thescoop.car.views.with_db'),
    (r'^docs/type/$', 'thescoop.car.views.type_all'),
    (r'^docs/type/(.*)/$', 'thescoop.car.views.type_detail'),
    (r'^docs/datatype/$', 'thescoop.car.views.datatype_all'),
    (r'^docs/datatype/(.*)/$', 'thescoop.car.views.datatype_detail'),
    (r'^docs/topic/$', 'thescoop.car.views.topic_all'),
    (r'^docs/topic/(.*)/$', 'thescoop.car.views.topic_detail'),
    (r'^docs/byline/$', list_detail.object_list, byline_list_info),
    (r'^docs/search/$', 'thescoop.car.views.search'),
    (r'^docs/search/byline/$', 'thescoop.car.views.byline_search'),
    (r'^docs/search/source/$', 'thescoop.car.views.source_search'),
    (r'^docs/byline/(.*)/$', 'thescoop.car.views.byline_detail'),
    (r'^docs/state/$', 'thescoop.car.views.state'),
    (r'^docs/state/(.*)/$', 'thescoop.car.views.state_detail'),
    (r'^docs/nation/$', 'thescoop.car.views.nation'),
    (r'^docs/nation/(.*)/$', 'thescoop.car.views.nation_detail'),
    (r'^docs/source/$', 'thescoop.car.views.source_main'),
    (r'^docs/source/(.*)/(\d+)/$', 'thescoop.car.views.source_by_year'),
    (r'^docs/source/(.*)/$', 'thescoop.car.views.source'),
    (r'^dbs/$', 'thescoop.car.views.db_index'),
    (r'^dbs/app/(?P<appslug>.*)/$', 'thescoop.car.views.db_app'),
    (r'^dbs/(.*)/$', 'thescoop.car.views.db_detail'),
    (r'^code/$', 'thescoop.projects.views.index'),
    (r'^code/language/(?P<lang>[-a-z]+)/$', 'thescoop.projects.views.language_list'),
    (r'^code/(?P<project>[-a-z]+)/$', 'thescoop.projects.views.project_detail'),
    (r'^presentations/$', 'thescoop.projects.views.presentations'),
 
 
 
    (r'^docs/date/$', 'django.views.generic.date_based.archive_index', dict(info_dict, template_name='story_archive_index.html')),
    (r'^docs/(?P<year>\d{4})/$', 'django.views.generic.date_based.archive_year', dict(info_dict, template_name='story_archive_year.html')),
    (r'^docs/(?P<year>\d{4})/(?P<month>[a-z]{3})/$', 'django.views.generic.date_based.archive_month', dict(info_dict, template_name='story_archive_month.html')),
    (r'^docs/(?P<year>\d{4})/(?P<month>[a-z]{3})/(?P<day>\w{1,2})/$', 'django.views.generic.date_based.archive_day', dict(info_dict, template_name='story_archive_day.html')),
 
    (r'^docs/feeds/(?P<url>.*)/$', 'django.contrib.syndication.views.feed', {'feed_dict': feeds}),
 
    # Uncomment this for admin:
    (r'^admin/(.*)', admin.site.root),
)