Remove summit_registration Django app
Has some typos suggesting that the code was never completed or used.
This commit is contained in:
		
							parent
							
								
									374ec19b77
								
							
						
					
					
						commit
						b7dcfa4a9b
					
				
					 6 changed files with 0 additions and 62 deletions
				
			
		|  | @ -81,7 +81,6 @@ INSTALLED_APPS = [ | |||
|     'conservancy.events', | ||||
|     'conservancy.news', | ||||
|     'conservancy.staff', | ||||
|     # 'conservancy.summit_registration', | ||||
|     'conservancy.worldmap', | ||||
|     'conservancy.supporters', | ||||
|     'conservancy.fundgoal', | ||||
|  |  | |||
|  | @ -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') | ||||
| 
 | ||||
| 
 | ||||
|  | @ -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',) | ||||
| 
 | ||||
|  | @ -1,7 +0,0 @@ | |||
| from django.urls import path | ||||
| 
 | ||||
| from .views import register | ||||
| 
 | ||||
| urlpatterns = [ | ||||
|     path('', register), | ||||
| ] | ||||
|  | @ -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}) | ||||
		Loading…
	
	Add table
		
		Reference in a new issue