aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbnewbold <bnewbold@robocracy.org>2011-05-07 14:21:23 -0400
committerbnewbold <bnewbold@robocracy.org>2011-05-07 14:22:07 -0400
commit6687120a3e0f0b7bfa148e93eb65bb2d2aa383d0 (patch)
tree2915a538b5078ec50544b53367d60e69f58ed4cc
parent324a778b95f3c91e98e3610500ac04ac2ea07905 (diff)
downloadpiccast-6687120a3e0f0b7bfa148e93eb65bb2d2aa383d0.tar.gz
piccast-6687120a3e0f0b7bfa148e93eb65bb2d2aa383d0.zip
updated url schema, frontpage template
-rw-r--r--piccast/settings.py.example1
-rw-r--r--piccast/urls.py26
-rw-r--r--www/frontpage.html9
3 files changed, 30 insertions, 6 deletions
diff --git a/piccast/settings.py.example b/piccast/settings.py.example
index 23118be..71ef664 100644
--- a/piccast/settings.py.example
+++ b/piccast/settings.py.example
@@ -70,6 +70,7 @@ TEMPLATE_DIRS = (
# Always use forward slashes, even on Windows.
# Don't forget to use absolute paths, not relative paths.
'./templates',
+ '../www',
)
INSTALLED_APPS = (
diff --git a/piccast/urls.py b/piccast/urls.py
index 51ba2d6..aa2361f 100644
--- a/piccast/urls.py
+++ b/piccast/urls.py
@@ -1,6 +1,7 @@
from django.conf.urls.defaults import *
from django.contrib import databrowse
from piccast.feeds.models import *
+from django.views.generic.simple import redirect_to, direct_to_template
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
@@ -16,14 +17,27 @@ urlpatterns = patterns('',
(r'^admin/', include(admin.site.urls)),
(r'^browse/(.*)', databrowse.site.root),
- # not using this subdirectory scheme; I like to have it all at the toplevel
+ # Not using the subdirectory scheme; I like to have it all at the toplevel
# (r'^piccast/', include('piccast.foo.urls')),
- (r'^json/feeds/', 'feeds.views.newest_feeds'),
- (r'^json/pics_by_set/(\d+)/', 'feeds.views.pics_by_set'),
- (r'^json/sets_by_feed/(\d+)/', 'feeds.views.sets_by_feed'),
- (r'^json/sets_by_feed/([-\w]+)/', 'feeds.views.sets_by_feedslug'),
+ (r'^json/v0/feeds/', 'feeds.views.newest_feeds'),
+ (r'^json/v0/pics_by_set/(\d+)/', 'feeds.views.pics_by_set'),
+ (r'^json/v0/sets_by_feed/(\d+)/', 'feeds.views.sets_by_feed'),
+ (r'^json/v0/sets_by_feed/([-\w]+)/', 'feeds.views.sets_by_feedslug'),
+ (r'^json/v0/search', 'feeds.views.json_search'),
+ (r'^basic$', 'feeds.views.basic_frontpage'),
+ (r'^$', direct_to_template, {'template': 'frontpage.html'}),
+
+ # for backwards compatability
+ (r'^json/feeds/',
+ redirect_to, {'url':'/json/v0/feeds/', 'permanent': False}),
+ (r'^json/pics_by_set/(?P<id>\d+)/',
+ redirect_to, {'url':'/json/v0/pics_by_set/%(id)s/', 'permanent': False}),
+ (r'^json/sets_by_feed/(?P<id>\d+)/',
+ redirect_to, {'url':'/json/v0/sets_by_feed/%(id)s/', 'permanent': False}),
+ (r'^json/sets_by_feed/(?P<slug>[-\w]+)/',
+ redirect_to, {'url':'/json/v0/sets_by_feed/%(slug)s/', 'permanent': False}),
+ # BUG: this doesn't redirect correctly with the query info, so just serving it
(r'^json/search', 'feeds.views.json_search'),
- (r'^$', 'feeds.views.basic_frontpage'),
)
diff --git a/www/frontpage.html b/www/frontpage.html
new file mode 100644
index 0000000..4e56801
--- /dev/null
+++ b/www/frontpage.html
@@ -0,0 +1,9 @@
+<html>
+<head><title>piccastapp.com</title></head>
+<body style="padding: 0xp; margin: 0px;">
+<div style="width: 190px; height: 420px; position: absolute; top: 50%;
+ left: 50%; margin-left:-160px;margin-top:-100px;">
+<pre style="font-weight: bold; font-size: 36px;">
+ <span style="color:orange;">Pic</span><span style="color:#008800">Cast</span>
+</pre></div></body></html>
+