summaryrefslogtreecommitdiffstats
path: root/urls.py
diff options
context:
space:
mode:
authorbnewbold <bnewbold@manus.(none)>2007-07-12 00:59:01 -0400
committerbnewbold <bnewbold@manus.(none)>2007-07-12 00:59:01 -0400
commit39d2613b75160a47a93df560d51b30854249ce9d (patch)
tree49af0dc237016f068b764a5623e2d31836c2bc6e /urls.py
parente152d2f2d1e257b1ec51adb3640e350207fda77d (diff)
downloadequator-39d2613b75160a47a93df560d51b30854249ce9d.tar.gz
equator-39d2613b75160a47a93df560d51b30854249ce9d.zip
almost working again
Diffstat (limited to 'urls.py')
-rw-r--r--urls.py31
1 files changed, 26 insertions, 5 deletions
diff --git a/urls.py b/urls.py
index 70012dd..1e2f0de 100644
--- a/urls.py
+++ b/urls.py
@@ -1,9 +1,30 @@
from django.conf.urls.defaults import *
+from django.conf import settings
+from equations.models import Equation, Symbol, Variable
urlpatterns = patterns('',
- # Example:
- # (r'^equator/', include('equator.foo.urls')),
-
- # Uncomment this for admin:
-# (r'^admin/', include('django.contrib.admin.urls')),
+ (r'^go/', 'django.views.generic.simple.direct_to_template',
+ {'template': 'go.html'}),
+ (r'^admin/', include('django.contrib.admin.urls')),
+ (r'^static/(?P<path>.*)$', 'django.views.static.serve',
+ {'document_root': settings.MEDIA_ROOT}),
+)
+urlpatterns += patterns('django.views.generic.list_detail',
+ (r'^equation/$', 'object_list', dict(queryset=Equation.objects.all(),
+ paginate_by=20, allow_empty=True)),
+ (r'^equation/(?P<object_id>\d+)/$', 'object_detail',
+ dict(queryset=Equation.objects.all() )),
+ (r'^symbol/$', 'object_list', dict(queryset=Symbol.objects.all(),
+ paginate_by=20, allow_empty=True)),
+ (r'^symbol/(?P<object_id>\d+)/$', 'object_detail',
+ dict(queryset=Symbol.objects.all() )),
+ (r'^variable/$', 'object_list', dict(queryset=Variable.objects.all(),
+ paginate_by=20, allow_empty=True)),
+ (r'^variable/(?P<object_id>\d+)/$', 'object_detail',
+ dict(queryset=Variable.objects.all() )),
+)
+urlpatterns += patterns('equator.equations.views',
+ (r'^json/equs_by_vars/(?P<whichvars>[\d\,]*)/?$', 'equs_by_vars'),
+ (r'^json/all_vars/$', 'all_vars'),
+ (r'^json/all_symbs/$', 'all_symbs'),
)