@@ -28,51 +28,46 @@ from conservancy.feeds import BlogFeed, PressReleaseFeed, OmnibusFeed
# from django.conf.urls.static import static
# from django.contrib.staticfiles.urls import staticfiles_urlpatterns
# import conservancy.static.overview.views
# handler404 = 'modpythoncustom.view404'
# handler401 = 'conservancy.static.views.handler401'
# handler403 = 'conservancy.static.views.handler403'
handler404 = 'conservancy.static.views.handler404'
# handler500 = 'conservancy.static.views.handler500'
admin.autodiscover()
def fundgoal_lookup(fundraiser_sought):
try:
return FundraisingGoal.objects.get(fundraiser_code_name=fundraiser_sought)
except FundraisingGoal.DoesNotExist:
# we have no object! do something
return None
urlpatterns = patterns('',
(r'^$', 'conservancy.frontpage.view'),
(r'^sponsors$', 'conservancy.frontpage.view'),
(r'^sponsors/$', 'conservancy.sponsors.view'),
(r'^sponsors/index.html$', 'conservancy.sponsors.view'),
(r'^admin/doc/', include('django.contrib.admindocs.urls')),
(r'^admin/', admin.site.urls),
(r'^feeds/blog/?$', BlogFeed()),
(r'^feeds/news/?$', PressReleaseFeed()),
(r'^feeds/omnibus/?$', OmnibusFeed()),
(r'^feeds/?$', 'conservancy.feeds.view'),
(r'^news(/|$)', include('conservancy.apps.news.urls')),
(r'^blog(/|$)', include('conservancy.apps.blog.urls')),
# formerly static templated things... (dirs with templates)
(r'^error', 'conservancy.static.views.index'),
(r'^about', 'conservancy.static.views.index'),
(r'^donate', 'conservancy.static.views.index'),
(r'^linux-compliance', 'conservancy.static.views.index', {'fundgoal' : fundgoal_lookup('vmware-match-0')}),
(r'^linux-compliance', 'conservancy.static.views.index_with_fundraiser_data',
{'fundraiser_sought' : 'vmware-match-0'}),
(r'^members', 'conservancy.static.views.index'),
(r'^npoacct', 'conservancy.static.views.index', {'fundgoal' : fundgoal_lookup('npoacct')}),
(r'^npoacct', 'conservancy.static.views.index_with_fundraiser_data',
{'fundraiser_sought' : 'npoacct'}),
(r'^overview', 'conservancy.static.views.index'),
(r'^privacy-policy', 'conservancy.static.views.index'),
(r'^supporter', 'conservancy.static.views.index'),
)
# urlpatterns += url(regex = r'^%s(?P<path>.*)$' % conservancy.settings.STATIC_URL[1:],
# urlpatterns += url(regex = r'^/overview',
# view = 'django.views.static.serve',
# kwargs = {'document_root': conservancy.settings.STATIC_ROOT,
# 'show_indexes' : True})
# urlpatterns += (r'^(?P<path>.*)$', 'django.views.static.serve',
# urlpatterns += (r'^overview/$', 'django.views.static.serve',