changeset 41:f21771118fb2

Deleting the legal application. Will use Flatpages for this.
author Brian Neal <bgneal@gmail.com>
date Fri, 12 Jun 2009 01:35:13 +0000
parents 53b7c681d80b
children 48b221d304c6
files gpp/legal/__init__.py gpp/legal/admin.py gpp/legal/models.py gpp/legal/urls.py gpp/legal/views.py gpp/settings.py gpp/templates/accounts/register.html gpp/templates/legal/view.html
diffstat 7 files changed, 2 insertions(+), 55 deletions(-) [+]
line wrap: on
line diff
--- a/gpp/legal/admin.py	Fri Jun 12 01:15:49 2009 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,9 +0,0 @@
-"""This file contains the automatic admin site definitions for the legal models"""
-
-from django.contrib import admin
-from legal.models import Policy
-
-class PolicyAdmin(admin.ModelAdmin):
-   list_display = ('title', 'policy_type')
-
-admin.site.register(Policy, PolicyAdmin)
--- a/gpp/legal/models.py	Fri Jun 12 01:15:49 2009 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,15 +0,0 @@
-"""models for the legal module"""
-
-from django.db import models
-
-class Policy(models.Model):
-   policy_type = models.SlugField(help_text = 'A slug for database lookups')
-   title = models.CharField(max_length = 64)
-   text = models.TextField()
-   revised_date = models.DateField()
-
-   def __unicode__(self):
-      return self.title
-
-   class Meta:
-      verbose_name_plural = 'Policies'
--- a/gpp/legal/urls.py	Fri Jun 12 01:15:49 2009 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,6 +0,0 @@
-"""urls for the legal application"""
-from django.conf.urls.defaults import *
-
-urlpatterns = patterns('legal.views',
-   (r'^policy/(\w+)/$', 'view'),
-)
--- a/gpp/legal/views.py	Fri Jun 12 01:15:49 2009 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,13 +0,0 @@
-"""views for the legal application"""
-
-from django.shortcuts import render_to_response
-from django.shortcuts import get_object_or_404
-from django.template import RequestContext
-
-from legal.models import Policy
-
-def view(request, policy_name):
-   policy = get_object_or_404(Policy, policy_type = policy_name)
-   return render_to_response('legal/view.html',
-         {'policy' : policy},
-         context_instance = RequestContext(request))
--- a/gpp/settings.py	Fri Jun 12 01:15:49 2009 +0000
+++ b/gpp/settings.py	Fri Jun 12 01:35:13 2009 +0000
@@ -114,7 +114,6 @@
     'downloads',
     'gcalendar',
     'irc',
-    'legal',
     'membermap',
     'messages',
     'news',
--- a/gpp/templates/accounts/register.html	Fri Jun 12 01:15:49 2009 +0000
+++ b/gpp/templates/accounts/register.html	Fri Jun 12 01:35:13 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="{% url legal.views.view "tos" %}" target="_blank">Terms of Service</a>.</li>
-   <li>You must agree to our <a href="{% url legal.views.view "privacy" %}" target="_blank">Privacy Policy</a>.</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>
 </ul>
 <form action="." method="post">
 <table>
--- a/gpp/templates/legal/view.html	Fri Jun 12 01:15:49 2009 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,9 +0,0 @@
-{% extends 'base.html' %}
-{% block title %}{{ policy.title }}{% endblock %}
-{% block content %}
-<h2>{{ policy.title }}</h2>
-<div class="legal">
-   {{ policy.text|linebreaks }}
-</div>
-<p><em>Last Revised: {{ policy.revised_date }}</em></p>
-{% endblock %}