Cleanup of example templates

This commit is contained in:
Daniel Greenfeld 2013-07-14 12:36:56 +02:00
parent ff8a0a5c27
commit 944baf62db
6 changed files with 18 additions and 77 deletions

View file

@ -1,4 +1,4 @@
{% load i18n %}<!DOCTYPE html>
{% load i18n static %}<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
@ -13,11 +13,7 @@
</head>
<body>
<div class="container-fluid">
<div class="row-fluid">
<div class="{% block class_page_title %}span10{% endblock class_page_title %}">
<h3></h3>
</div>
</div>
{% block content %}{% endblock content %}
</div>

View file

@ -24,31 +24,8 @@
</ul>
{% else %}
<p> Unpublished - publish it in <a href="/admin2/">admin2</a> </p>
<p> Unpublished - Choose an <a href="{% url 'home' %}">admin</a> tool and publish it.</p>
{% endif %}
</div>
</div>
<hr />
<div class="row-fluid">
<div class="span5">
<h4>The original <a href="/admin/">Django Admin</a></h4>
<a href="/admin/">
<img class="img-polaroid" src="{% static 'img/admin.png' %}" />
</a>
<p>Powered by django.contrib.admin. This is just here for reference.</p>
</div>
<div class="offset1 span5">
<h4>The new <a href="/admin2/">Admin2</a></h4>
<a href="/admin2/">
<img class="img-polaroid" src="{% static 'img/admin2.png' %}" />
</a>
<p>Powered by django-admin2.</p>
</div>
</div>
{% endblock %}

View file

@ -17,48 +17,15 @@
{{ post.body }}
</p>
{% else %}
<p> Unpublished - publish it in <a href="/admin2/">admin2</a> </p>
<p> Unpublished - Choose an <a href="{% url 'home' %}">admin</a> tool and publish it.</p>
{% endif %}
{% empty %}
<h3>Imagine that this is a real site</h3>
<h3>No Content Yet!</h3>
<p>Pretend that this is the homepage of a big Django site.</p>
<p>Imagine lots of things are here:</p>
<ul>
<li>A blog</li>
<li>Comments</li>
<li>And so on...</li>
</ul>
<p>In other words, these are items that we can introspect through the Django admin.</p>
<h3>Under the hood</h3>
<p>Now, explore the Django admin for example.com. Click on either of the following:</p>
<p>Choose an <a href="{% url 'home' %}">admin</a> tool and add content.</p>
{% endfor %}
</div>
</div>
<div class="row-fluid">
<div class="span5">
<h4>The original <a href="/admin/">Django Admin</a></h4>
<a href="/admin/">
<img class="img-polaroid" src="{% static 'img/admin.png' %}" />
</a>
<p>Powered by django.contrib.admin. This is just here for reference.</p>
</div>
<div class="offset1 span5">
<h4>The new <a href="/admin2/">Admin2</a></h4>
<a href="/admin2/">
<img class="img-polaroid" src="{% static 'img/admin2.png' %}" />
</a>
<p>Powered by django-admin2.</p>
</div>
</div>
{% endblock %}

View file

@ -24,25 +24,26 @@
<p>{% trans "Now, explore the Django admin for example.com. Click on either of the following:" %}</p>
</div>
</div>
<div class="row-fluid">
<div class="span5">
<h4>{% blocktrans with admin_url="/admin/" %}The original <a href="{{admin_url}}">Django Admin</a>{% endblocktrans %}</h4>
<h4>The original <a href="{% url "admin:index" %}">Django Admin</a></h4>
<a href="/admin/">
<a href="{% url "admin:index" %}">
<img class="img-polaroid" src="{% static 'img/admin.png' %}" />
</a>
<p>{% trans "Powered by django.contrib.admin. This is just here for reference." %}</p>
<p>Powered by django.contrib.admin. This is just here for reference.</p>
</div>
<div class="offset1 span5">
<h4>{% blocktrans with admin2_url="/admin2/" %}The new <a href="{{admin2_url}}">Admin2</a>{% endblocktrans %}</h4>
<h4>The new <a href="{% url "admin2:dashboard" %}">Admin2</a></h4>
<a href="/admin2/">
<a href="{% url "admin2:dashboard" %}">
<img class="img-polaroid" src="{% static 'img/admin2.png' %}" />
</a>
<p>{% trans "Powered by django-admin2." %}</p>
<p>Powered by django-admin2.</p>
</div>
</div>
<hr />
<h2>See the <a href="{% url 'blog_list' %}">Blog</a> in Action</h2>
{% endblock %}

View file

@ -13,6 +13,6 @@ urlpatterns = patterns('',
url(r'^admin2/', include(djadmin2.default.urls)),
url(r'^admin/', include(admin.site.urls)),
url(r'^blog/', BlogListView.as_view(template_name="blog/blog_list.html"), name='blog_list'),
url(r'^blog_detail(?P<pk>\d+)/$', BlogDetailView.as_view(template_name="blog/blog_detail.html"), name='blog_detail'),
url(r'^$', BlogListView.as_view(template_name="blog/blog_list.html"), name='blog_list'),
url(r'^blog/detail(?P<pk>\d+)/$', BlogDetailView.as_view(template_name="blog/blog_detail.html"), name='blog_detail'),
url(r'^$', BlogListView.as_view(template_name="blog/home.html"), name='home'),
)

View file

@ -4,7 +4,7 @@
<h1>{% trans "Example Home" %}</h1>
<ul>
<li><a href="/admin2/">django-admin2</a></li>
<li><a href="/admin/">django.contrib.admin</a> {% trans "(for reference)" %}</li>
<li><a href="{% url "admin2:dashboard" %}">django-admin2</a></li>
<li><a href="{% url "admin:index" %}">django.contrib.admin</a> {% trans "(for reference)" %}</li>
</ul>
{% endblock %}