# HG changeset patch # User Brian Neal # Date 1244770513 0 # Node ID f21771118fb22ec2e510c652941f57a5b846ef2b # Parent 53b7c681d80bd3149e1675b5d0dc151933884a06 Deleting the legal application. Will use Flatpages for this. diff -r 53b7c681d80b -r f21771118fb2 gpp/legal/admin.py --- 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) diff -r 53b7c681d80b -r f21771118fb2 gpp/legal/models.py --- 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' diff -r 53b7c681d80b -r f21771118fb2 gpp/legal/urls.py --- 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'), -) diff -r 53b7c681d80b -r f21771118fb2 gpp/legal/views.py --- 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)) diff -r 53b7c681d80b -r f21771118fb2 gpp/settings.py --- 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', diff -r 53b7c681d80b -r f21771118fb2 gpp/templates/accounts/register.html --- 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).
  • 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.
  • -
  • You must agree to our Terms of Service.
  • -
  • You must agree to our Privacy Policy.
  • +
  • You must agree to our Terms of Service.
  • +
  • You must agree to our Privacy Policy.
  • diff -r 53b7c681d80b -r f21771118fb2 gpp/templates/legal/view.html --- 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 %} -

    {{ policy.title }}

    - -

    Last Revised: {{ policy.revised_date }}

    -{% endblock %}