Compare commits

..

10 commits

Author SHA1 Message Date
Bradley M. Kuhn
d317f733cd Fixed location again. 2010-10-05 17:17:32 -04:00
Bradley M. Kuhn
c3128da4aa misplaced app location. 2010-10-05 17:16:06 -04:00
Bradley M. Kuhn
d1bf73af67 Added changes to remove conservancy hard codes. 2010-10-05 17:12:08 -04:00
Bradley M. Kuhn
fcb41fb09f Added __init__ files in missing dirs. 2010-10-05 17:07:31 -04:00
Bradley M. Kuhn
31d3294509 Fixed directory selection. 2010-10-05 16:44:22 -04:00
Bradley M. Kuhn
6543fcd0bd Added admin URL. 2010-10-05 16:25:00 -04:00
Bradley M. Kuhn
49ba51cf32 Added manage.py 2010-10-05 16:16:20 -04:00
Bradley M. Kuhn
e63e8412d5 overzealous replace in last commit. No group .-data, should be www-data. 2010-10-05 16:05:49 -04:00
Bradley M. Kuhn
bf19e51e09 modified to work with podjango. 2010-10-05 16:04:50 -04:00
Bradley M. Kuhn
1c151e2792 Added compile all script that I wrote for Conservancy. 2010-10-05 16:03:47 -04:00
6 changed files with 36 additions and 7 deletions

20
compile-all.py Executable file
View file

@ -0,0 +1,20 @@
#!/usr/bin/python
import compileall
import os
#compileall.compile_dir(".", force=1)
#
def compileDir(arg, directory, names):
compileall.compile_dir(directory, force=1)
os.path.walk("podjango", compileDir, "")
compileall.compile_dir(".", force=1)
os.system("find . -type d -exec chmod gu+rx {} \;")
os.system("find . -type f -exec chmod gu+r {} \;")
os.system("find . -type d -exec chmod o+x {} \;")
os.system("find ./podjango/static -type d -exec chmod o+rx {} \;")
os.system("find ./podjango/static -exec chmod o+r {} \;")
os.system("find . -exec chgrp www-data {} \;")
os.system("find . -exec chmod go-w {} \;")

0
podjango/__init__.py Normal file
View file

View file

View file

@ -265,14 +265,8 @@ class OggCastFeed(CastFeed):
return item.ogg_length return item.ogg_length
feed_dict = { feed_dict = {
'blog': BlogFeed,
'podcast-ogg': OggCastFeed, 'podcast-ogg': OggCastFeed,
'podcast-mp3': Mp3CastFeed, 'podcast-mp3': Mp3CastFeed,
'techblog': TechBlogFeed,
'news': PressReleaseFeed,
'future-events': UpcomingEventFeed,
'omnibus': OmnibusFeed,
# 'event-media': RecentEventMediaFeed,
} }
# make each feed know its canonical url # make each feed know its canonical url

14
podjango/manage.py Executable file
View file

@ -0,0 +1,14 @@
#!/usr/bin/env python
import sys
sys.path += ('/var/www',)
from django.core.management import execute_manager
try:
import settings
except ImportError:
sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\nYou'll have to run django-admin.py, passing it your settings module.\n(If the file settings.py does indeed exist, it's causing an ImportError somehow.)\n" % __file__)
sys.exit(1)
if __name__ == "__main__":
execute_manager(settings)

View file

@ -18,7 +18,7 @@
# "AGPLv3". If not, see <http://www.gnu.org/licenses/>. # "AGPLv3". If not, see <http://www.gnu.org/licenses/>.
from django.conf.urls.defaults import * from django.conf.urls.defaults import *
from conservancy.feeds import feed_dict from podjango.feeds import feed_dict
#handler404 = 'modpythoncustom.view404' #handler404 = 'modpythoncustom.view404'
@ -27,4 +27,5 @@ urlpatterns = patterns('',
(r'^feeds/(?P<url>.*)/?$', 'django.contrib.syndication.views.feed', (r'^feeds/(?P<url>.*)/?$', 'django.contrib.syndication.views.feed',
{'feed_dict': feed_dict}), {'feed_dict': feed_dict}),
(r'^feeds/$', 'podjango.feeds.view'), (r'^feeds/$', 'podjango.feeds.view'),
(r'^admin/(.*)', admin.site.root),)
) )