Better example project home. Close #241.

This commit is contained in:
Audrey Roy 2013-07-06 10:57:00 +02:00
parent a5d03899a9
commit 807b3776fb
5 changed files with 78 additions and 6 deletions

View file

@ -0,0 +1,30 @@
{% load i18n %}<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Example.com</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Bootstrap -->
{% block css %}
<link href="{{ STATIC_URL }}themes/bootstrap/css/bootstrap.min.css" rel="stylesheet" media="screen">
<link href="{{ STATIC_URL }}themes/bootstrap/css/bootstrap-custom.css" rel="stylesheet" media="screen">
{% endblock css %}
</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>
{% block javascript %}
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="{{ STATIC_URL }}themes/bootstrap/js/jquery.min.js">\x3C/script>')</script>
<script src="{{ STATIC_URL }}themes/bootstrap/js/bootstrap.min.js"></script>
{% endblock javascript %}
</body>
</html>

View file

@ -1,10 +1,48 @@
{% extends "admin2/bootstrap/base.html" %}
{% extends "base.html" %}
{% load staticfiles %}
{% block content %}
<h1>Example Home</h1>
<div class="row-fluid">
<div class="span10">
<h1>Example.com</h1>
<ul>
<li><a href="/admin2/">django-admin2</a></li>
<li><a href="/admin/">django.contrib.admin</a> (for reference)</li>
</ul>
<h3>Imagine that this is a real site</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>
</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

@ -1,4 +1,7 @@
# Django settings for example project.
import os
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
DEBUG = True
TEMPLATE_DEBUG = DEBUG
@ -67,6 +70,7 @@ STATICFILES_DIRS = (
# Put strings here, like "/home/html/static" or "C:/www/django/static".
# Always use forward slashes, even on Windows.
# Don't forget to use absolute paths, not relative paths.
os.path.join(BASE_DIR, "static"),
)
# List of finder classes that know how to find static files in

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB