From b7dcfa4a9b2b886a986358de36fbee314902f3b5 Mon Sep 17 00:00:00 2001 From: Ben Sturmfels Date: Fri, 22 Mar 2024 11:19:05 +1100 Subject: [PATCH] Remove summit_registration Django app Has some typos suggesting that the code was never completed or used. --- conservancy/settings/base.py | 1 - conservancy/summit_registration/__init__.py | 0 conservancy/summit_registration/admin.py | 10 -------- conservancy/summit_registration/models.py | 17 ------------- conservancy/summit_registration/urls.py | 7 ------ conservancy/summit_registration/views.py | 27 --------------------- 6 files changed, 62 deletions(-) delete mode 100644 conservancy/summit_registration/__init__.py delete mode 100644 conservancy/summit_registration/admin.py delete mode 100644 conservancy/summit_registration/models.py delete mode 100644 conservancy/summit_registration/urls.py delete mode 100644 conservancy/summit_registration/views.py diff --git a/conservancy/settings/base.py b/conservancy/settings/base.py index 2253b046..1d5c3132 100644 --- a/conservancy/settings/base.py +++ b/conservancy/settings/base.py @@ -81,7 +81,6 @@ INSTALLED_APPS = [ 'conservancy.events', 'conservancy.news', 'conservancy.staff', - # 'conservancy.summit_registration', 'conservancy.worldmap', 'conservancy.supporters', 'conservancy.fundgoal', diff --git a/conservancy/summit_registration/__init__.py b/conservancy/summit_registration/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/conservancy/summit_registration/admin.py b/conservancy/summit_registration/admin.py deleted file mode 100644 index 09c90313..00000000 --- a/conservancy/summit_registration/admin.py +++ /dev/null @@ -1,10 +0,0 @@ -from django.contrib import admin - -from .models import SummitRegistration - - -@admin.register(SummitRegistration) -class SummitRegistrationAdmin(admin.ModelAdmin): - list_display = ('name', 'email', 'affiliation', 'cle_credit') - - diff --git a/conservancy/summit_registration/models.py b/conservancy/summit_registration/models.py deleted file mode 100644 index ae2e8b3a..00000000 --- a/conservancy/summit_registration/models.py +++ /dev/null @@ -1,17 +0,0 @@ -from django.db import models - - -class SummitRegistration(models.Model): - """Form fields for summit registrants""" - - name = models.CharField(max_length=300) - affiliation = models.CharField(max_length=700, blank=True) - address = models.TextField(blank=True) - email = models.EmailField(blank=True) - phone = models.CharField(max_length=100, blank=True) - date_created = models.DateField(auto_now_add=True) - cle_credit = models.BooleanField(default=True) - - class Meta: - ordering = ('name',) - diff --git a/conservancy/summit_registration/urls.py b/conservancy/summit_registration/urls.py deleted file mode 100644 index 7457d87e..00000000 --- a/conservancy/summit_registration/urls.py +++ /dev/null @@ -1,7 +0,0 @@ -from django.urls import path - -from .views import register - -urlpatterns = [ - path('', register), -] diff --git a/conservancy/summit_registration/views.py b/conservancy/summit_registration/views.py deleted file mode 100644 index 35763060..00000000 --- a/conservancy/summit_registration/views.py +++ /dev/null @@ -1,27 +0,0 @@ -from www.summit_registration.models import SummitRegistration -from django import forms -from django.shortcuts import render - - -def register(request): - """Summit registration form view - """ - - class SummitForm(ModelForm): - class Meta: - model = SummitRegistration - - SummitForm.base_fields['email'].label = 'Email address' - SummitForm.base_fields['phone'].label = 'Phone number' - SummitForm.base_fields['address'].label = 'Mailing address' - SummitForm.base_fields['cle_credit'].label = 'Attending for CLE credit?' - - if request.method == 'POST': - form = SummitForm(request.POST) - if form.is_valid(): - form.save() - return render(reqeust, 'summit_registration/register_success.html', {'form': form.cleaned_data}) - else: - form = SummitForm() - - return render(request, 'summit_registration/register.html', {'form': form})