Compare commits
2 commits
a6f7cea8cc
...
b2e57836c1
| Author | SHA1 | Date | |
|---|---|---|---|
| b2e57836c1 | |||
| 5338e43e60 |
8 changed files with 18 additions and 2 deletions
1
TODO.md
1
TODO.md
|
|
@ -1,5 +1,6 @@
|
|||
# To-do
|
||||
|
||||
* rate limiting to prevent abuse - especially on POST requests
|
||||
* consider removing `events` and `worldmap` modules
|
||||
* ask Denver about why so many license files
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,12 @@
|
|||
from captcha.fields import CaptchaField
|
||||
from django import forms
|
||||
|
||||
from .models import CommunityTrackProposal
|
||||
|
||||
|
||||
class CommunityTrackProposalForm(forms.ModelForm):
|
||||
captcha = CaptchaField()
|
||||
|
||||
class Meta:
|
||||
model = CommunityTrackProposal
|
||||
exclude = []
|
||||
|
|
|
|||
|
|
@ -93,6 +93,7 @@ INSTALLED_APPS = [
|
|||
'conservancy.fossy',
|
||||
'conservancy.podjango',
|
||||
'conservancy.usethesource.apps.UseTheSourceConfig',
|
||||
'captcha',
|
||||
]
|
||||
|
||||
DEFAULT_AUTO_FIELD = 'django.db.models.AutoField'
|
||||
|
|
|
|||
|
|
@ -40,3 +40,6 @@ SESSION_COOKIE_SECURE = True
|
|||
|
||||
STRIPE_API_KEY = get_secret(secrets, 'STRIPE_API_KEY')
|
||||
STRIPE_ENDPOINT_SECRET = get_secret(secrets, 'STRIPE_ENDPOINT_SECRET')
|
||||
|
||||
CAPTCHA_FLITE_PATH = '/usr/bin/flite'
|
||||
CAPTCHA_SOX_PATH = '/usr/bin/sox'
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ class SustainerOrderAdmin(admin.ModelAdmin):
|
|||
'paid_time',
|
||||
'payment_method',
|
||||
'payment_id',
|
||||
'recurring',
|
||||
'name',
|
||||
'email',
|
||||
'amount',
|
||||
|
|
@ -28,6 +29,6 @@ class SustainerOrderAdmin(admin.ModelAdmin):
|
|||
'country',
|
||||
]
|
||||
|
||||
readonly_fields = ['created_time', 'paid_time', 'payment_method', 'payment_id']
|
||||
list_display = ['created_time', 'name', 'email', 'amount', 'paid']
|
||||
readonly_fields = ['created_time', 'paid_time', 'payment_method', 'payment_id', 'recurring']
|
||||
list_display = ['created_time', 'name', 'email', 'amount', 'recurring', 'paid_time']
|
||||
list_filter = ['paid_time']
|
||||
|
|
|
|||
|
|
@ -61,6 +61,8 @@ urlpatterns = [
|
|||
re_path(r'^privacy-policy/', views.content),
|
||||
re_path(r'^projects/', views.content),
|
||||
re_path(r'^sustainer/', views.content),
|
||||
|
||||
path('captcha/', include('captcha.urls')),
|
||||
]
|
||||
|
||||
# Serve uploaded media. Works only when DEBUG == True. Using '/media/'
|
||||
|
|
|
|||
|
|
@ -130,6 +130,10 @@
|
|||
apt:
|
||||
name: build-essential,python3-dev,libffi-dev
|
||||
|
||||
- name: Install flite and sox for CAPTCHA text-to-speech
|
||||
apt:
|
||||
name: flite, sox
|
||||
|
||||
- name: Security settings
|
||||
apt:
|
||||
name: fail2ban
|
||||
|
|
|
|||
|
|
@ -6,3 +6,4 @@ stripe
|
|||
beautifulsoup4==4.11.2
|
||||
html5lib==1.1
|
||||
Pillow==9.4.0
|
||||
django-simple-captcha==0.6.0
|
||||
Loading…
Add table
Reference in a new issue