# HG changeset patch
# User Jordi GutiƩrrez Hermoso
# Date 1277535893 18000
# Node ID 6c2d400091fd051fbdf37c1d7b678728638f8300
# Parent c8346099263750ef3e5f8e611c24c1d071b570e9
Decouple bundle urlconfs; improve the skeleton layout to more than a few bones
diff -r c83460992637 -r 6c2d400091fd apps/bundle/urls.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/apps/bundle/urls.py Sat Jun 26 02:04:53 2010 -0500
@@ -0,0 +1,8 @@
+from django.conf.urls.defaults import *
+
+urlpatterns = patterns('agora.apps.bundle.views',
+ (r'^(?P.*)/(?P.*)/$', 'detail'),
+ (r'^(?P.*)/$', 'index'),
+
+)
+
diff -r c83460992637 -r 6c2d400091fd media/icon.png
Binary file media/icon.png has changed
diff -r c83460992637 -r 6c2d400091fd templates/base.djhtml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/templates/base.djhtml Sat Jun 26 02:04:53 2010 -0500
@@ -0,0 +1,61 @@
+
+
+
+
+
+
+ Agora Octave — {% block title %}Free your math!{% endblock %}
+
+
+
+
+
+
+
+
+
+ {% block extrahead %}{% endblock %}
+
+
+
+
+
+
+
+
{% block billboard %}{% endblock %}
+
+ {% block columnwrap %}
+
+ {% block content %}{% endblock %}
+
+
+ {% endblock %}
+
+
+
+
+
+
+
+
+
diff -r c83460992637 -r 6c2d400091fd templates/bundle/index.djhtml
--- a/templates/bundle/index.djhtml Fri Jun 25 18:32:15 2010 -0500
+++ b/templates/bundle/index.djhtml Sat Jun 26 02:04:53 2010 -0500
@@ -1,3 +1,6 @@
+{% extends "base.djhtml" %}
+
+{% block content %}
{% if bundle %}
Sup, this is {{ bundle.uploader }}'s {{ bundle.name }} bundle.
@@ -6,7 +9,7 @@
{% if files %}
@@ -20,3 +23,4 @@
Bundle not found!
{% endif %}
+{% endblock %}
diff -r c83460992637 -r 6c2d400091fd templates/index.djhtml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/templates/index.djhtml Sat Jun 26 02:04:53 2010 -0500
@@ -0,0 +1,6 @@
+{% extends "base.djhtml" %}
+{% block content %}
+
+Main screen turn on!
+
+{% endblock %}
diff -r c83460992637 -r 6c2d400091fd templates/index.html
--- a/templates/index.html Fri Jun 25 18:32:15 2010 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,10 +0,0 @@
-
-
-Agora Octave
-
-
-
-Main screen turn on!
-
-
-
diff -r c83460992637 -r 6c2d400091fd urls.py
--- a/urls.py Fri Jun 25 18:32:15 2010 -0500
+++ b/urls.py Sat Jun 26 02:04:53 2010 -0500
@@ -8,20 +8,22 @@
(r'^$',
'django.views.generic.simple.direct_to_template',
- {'template': 'index.html'}),
+ {'template': 'index.djhtml'}),
- # Uncomment the admin/doc line below and add 'django.contrib.admindocs'
- # to INSTALLED_APPS to enable admin documentation:
+
(r'^admin/doc/', include('django.contrib.admindocs.urls')),
- # Uncomment the next line to enable the admin:
(r'^admin/', include(admin.site.urls)),
-
-
- # Example:
- # (r'^agora/', include('agora.foo.urls')),
-
- (r'^(?P.*)/(?P.*)/$', 'agora.apps.bundle.views.detail'),
+ (r'^', include('agora.apps.bundle.urls'))
)
+
+#Let Django itself serve static data during debugging
+from django.conf import settings
+
+if settings.DEBUG:
+ urlpatterns.insert (1,
+ (r'^site_media/(?P.*)$', 'django.views.static.serve',
+ {'document_root': 'media/', 'show_indexes': True}),
+ )