Mercurial > public > sg101
changeset 42:48b221d304c6
Removed old legal application urls from main urls file. (Forgot to do this in last commit.) Added flatpages support. Added some links on the base template.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Fri, 12 Jun 2009 02:37:28 +0000 |
parents | f21771118fb2 |
children | 2763977301c2 |
files | gpp/core/admin.py gpp/settings.py gpp/templates/accounts/register.html gpp/templates/base.html gpp/templates/flatpages/default.html gpp/urls.py media/css/base.css |
diffstat | 7 files changed, 39 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gpp/core/admin.py Fri Jun 12 02:37:28 2009 +0000 @@ -0,0 +1,12 @@ +from django.contrib import admin +from django.contrib.flatpages.models import FlatPage +from django.contrib.flatpages.admin import FlatPageAdmin as FlatPageAdminOld +from django.conf import settings + +class FlatPageAdmin(FlatPageAdminOld): + class Media: + js = settings.GPP_THIRD_PARTY_JS['tiny_mce'] + +# We have to unregister it, and then reregister +admin.site.unregister(FlatPage) +admin.site.register(FlatPage, FlatPageAdmin)
--- a/gpp/settings.py Fri Jun 12 01:35:13 2009 +0000 +++ b/gpp/settings.py Fri Jun 12 02:37:28 2009 +0000 @@ -74,6 +74,7 @@ 'django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', + 'django.contrib.flatpages.middleware.FlatpageFallbackMiddleware', ) ROOT_URLCONF = 'gpp.urls' @@ -102,6 +103,7 @@ 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.markup', + 'django.contrib.flatpages', 'elsewhere', 'tagging', 'accounts',
--- a/gpp/templates/accounts/register.html Fri Jun 12 01:35:13 2009 +0000 +++ b/gpp/templates/accounts/register.html Fri Jun 12 02:37:28 2009 +0000 @@ -9,8 +9,8 @@ only (no spaces).</li> <li>An email address is required to use this site. A confirmation email will be sent to the address you supply, and it is necessary to complete the registration process.</li> - <li>You must agree to our <a href="#" target="_blank">Terms of Service</a>.</li> - <li>You must agree to our <a href="#" target="_blank">Privacy Policy</a>.</li> + <li>You must agree to our <a href="/policy/tos/" target="_blank">Terms of Service</a>.</li> + <li>You must agree to our <a href="/policy/privacy/" target="_blank">Privacy Policy</a>.</li> </ul> <form action="." method="post"> <table>
--- a/gpp/templates/base.html Fri Jun 12 01:35:13 2009 +0000 +++ b/gpp/templates/base.html Fri Jun 12 02:37:28 2009 +0000 @@ -52,6 +52,7 @@ <li><a href="{% url news-index_page page=1 %}">News</a></li> <li><a href="{% url gcalendar-index %}">Calendar</a></li> <li><a href="{% url contact-form %}">Contact</a></li> + <li><a href="{% url donations-index %}">Donations</a></li> <li><a href="{% url irc-main %}">IRC</a></li> <li><a href="{% url bio-members %}">Member List</a></li> <li><a href="{% url membermap-index %}">Member Map</a></li> @@ -78,7 +79,19 @@ TODO: Should put links to various policies down here. Additional navigation could go here. Add a colophon. </p> - <p>SurfGuitar101.com © 2009 by Brian Neal</p> + <p> + <a href="{% url contact-form %}">Contact Us</a> • + <a href="/about/">About Us</a> • + <a href="/policy/tos/">Terms of Service</a> • + <a href="/policy/privacy/">Privacy Policy</a> • + <a href="/colophon/">Colophon</a> + </p> + <p> + SurfGuitar101.com © 2009 by Brian Neal. + All comments and user contributed articles are property of the posters. + </p> + <p>Thanks to all the surf bands, past and present. And thanks to all the fans who care about and keep surf + music alive.</p> </div> {% if debug %}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gpp/templates/flatpages/default.html Fri Jun 12 02:37:28 2009 +0000 @@ -0,0 +1,6 @@ +{% extends 'base.html' %} +{% block title %}{{ flatpage.title }}{% endblock %} +{% block content %} +<h2>{{ flatpage.title }}</h2> +{{ flatpage.content }} +{% endblock %}
--- a/gpp/urls.py Fri Jun 12 01:35:13 2009 +0000 +++ b/gpp/urls.py Fri Jun 12 02:37:28 2009 +0000 @@ -24,7 +24,6 @@ {'feed_dict': feeds }, 'feeds-news'), (r'^irc/', include('irc.urls')), - (r'^legal/', include('legal.urls')), (r'^links/', include('weblinks.urls')), (r'^member_map/', include('membermap.urls')), (r'^messages/', include('messages.urls')),