summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--equations/models.py6
-rw-r--r--equations/templates/equations/equation_detail.html2
-rw-r--r--equations/templates/equations/equation_list.html2
-rw-r--r--equations/templates/equations/symbol_detail.html2
-rw-r--r--equations/templates/equations/symbol_list.html2
-rw-r--r--equations/templates/equations/variable_detail.html2
-rw-r--r--equations/templates/equations/variable_list.html2
-rw-r--r--urls.py6
8 files changed, 17 insertions, 7 deletions
diff --git a/equations/models.py b/equations/models.py
index 7a5f8fe..b34a93c 100644
--- a/equations/models.py
+++ b/equations/models.py
@@ -122,3 +122,9 @@ class Equation(models.Model):
signals.post_save.connect(update_render, sender=Equation)
#dispatcher.connect(update_render, signal=signals.post_save, sender=Equation)
+from django.contrib import admin
+
+admin.site.register(Symbol)
+admin.site.register(Variable)
+admin.site.register(Equation)
+
diff --git a/equations/templates/equations/equation_detail.html b/equations/templates/equations/equation_detail.html
index 978b2e1..968e5ef 100644
--- a/equations/templates/equations/equation_detail.html
+++ b/equations/templates/equations/equation_detail.html
@@ -4,7 +4,7 @@
{% block content %}
<div style="width: 100%; text-align:center;">
-<img src="{{ object.get_render_url }}" style="border: none;" /></div>
+<img src="{{ object.render.url }}" style="border: none;" /></div>
<br />
<table width="100%">
{% if object.description %}
diff --git a/equations/templates/equations/equation_list.html b/equations/templates/equations/equation_list.html
index 549c38f..9712182 100644
--- a/equations/templates/equations/equation_list.html
+++ b/equations/templates/equations/equation_list.html
@@ -8,7 +8,7 @@
{% for item in object_list %}
<tr style="height:60px;"><td style="width:50%;">
<a href="{{ item.get_absolute_url }}" class="imglink">
- <img style="border: none;" src="{{ item.get_render_url }}" /></a>
+ <img style="border: none;" src="{{ item.render.url }}" /></a>
</td><td style="width: 50%"><a href="{{ item.get_absolute_url }}">
{{ item.name }}</a></td></tr>
{% endfor %}
diff --git a/equations/templates/equations/symbol_detail.html b/equations/templates/equations/symbol_detail.html
index 85f59d8..b53b1d6 100644
--- a/equations/templates/equations/symbol_detail.html
+++ b/equations/templates/equations/symbol_detail.html
@@ -4,7 +4,7 @@
{% block content %}
<div style="width: 100%; text-align:center;">
-<img src="{{ object.get_render_url }}" style="border: none;" /></div>
+<img src="{{ object.render.url }}" style="border: none;" /></div>
<br />
<table width="100%">
<tr><td width="25%"><b>Raw LaTeX:</b></td><td><pre>{{ object.latex }}</pre></td></tr>
diff --git a/equations/templates/equations/symbol_list.html b/equations/templates/equations/symbol_list.html
index 1983b3f..99c4f55 100644
--- a/equations/templates/equations/symbol_list.html
+++ b/equations/templates/equations/symbol_list.html
@@ -8,7 +8,7 @@
{% for item in object_list %}
<tr style="height:60px;"><td style="width:10%;padding-left:10%;">
<a href="{{ item.get_absolute_url }}" class="imglink">
- <img style="border: none;" src="{{ item.get_render_url }}" /></a>
+ <img style="border: none;" src="{{ item.render.url }}" /></a>
</td><td style="width: 70%"><a href="{{ item.get_absolute_url }}">
{{ item.name }}</a></td></tr>
{% endfor %}
diff --git a/equations/templates/equations/variable_detail.html b/equations/templates/equations/variable_detail.html
index 6488de2..ceec48c 100644
--- a/equations/templates/equations/variable_detail.html
+++ b/equations/templates/equations/variable_detail.html
@@ -4,7 +4,7 @@
{% block content %}
<div style="width: 100%; text-align:center;">
-<img src="{{ object.get_render_url }}" style="border: none;" /></div>
+<img src="{{ object.render.url }}" style="border: none;" /></div>
<br />
<table width="100%">
{% if object.description %}
diff --git a/equations/templates/equations/variable_list.html b/equations/templates/equations/variable_list.html
index 9ff7a64..dbd6e41 100644
--- a/equations/templates/equations/variable_list.html
+++ b/equations/templates/equations/variable_list.html
@@ -8,7 +8,7 @@
{% for item in object_list %}
<tr style="height:60px;"><td style="width:10%;padding-left:10%;">
<a href="{{ item.get_absolute_url }}" class="imglink">
- <img style="border: none;" src="{{ item.get_render_url }}" /></a>
+ <img style="border: none;" src="{{ item.render.url }}" /></a>
</td><td style="width: 70%"><a href="{{ item.get_absolute_url }}">
{{ item.name }}</a></td></tr>
{% endfor %}
diff --git a/urls.py b/urls.py
index 1e2f0de..5b0f494 100644
--- a/urls.py
+++ b/urls.py
@@ -1,11 +1,15 @@
from django.conf.urls.defaults import *
from django.conf import settings
+from django.contrib import admin
from equations.models import Equation, Symbol, Variable
+admin.autodiscover()
+
urlpatterns = patterns('',
(r'^go/', 'django.views.generic.simple.direct_to_template',
{'template': 'go.html'}),
- (r'^admin/', include('django.contrib.admin.urls')),
+ (r'^admin/doc/', include('django.contrib.admindocs.urls')),
+ (r'^admin/(.*)', admin.site.root),
(r'^static/(?P<path>.*)$', 'django.views.static.serve',
{'document_root': settings.MEDIA_ROOT}),
)