Skip to content

Commit

Permalink
Changed message fields to TextField
Browse files Browse the repository at this point in the history
for easier editing in admin console
  • Loading branch information
Dominik Szopa authored and Dominik Szopa committed Mar 8, 2020
1 parent 516c9e5 commit 6a57ef6
Show file tree
Hide file tree
Showing 6 changed files with 85 additions and 7 deletions.
9 changes: 6 additions & 3 deletions TODO
Original file line number Diff line number Diff line change
Expand Up @@ -129,15 +129,18 @@
[x] Fix bug when clicking 'Edit' in campaign you are not part of yet
[x] Create better homepage
[x] Make non-specific campaign go to latest
[ ] Test with one campaign
[ ] Create email signup invite, including to add to campaign
[x] Test with one campaign
[x] Add filters for campaign to admin page
[ ] Update and add tests
[x] Optimize home page queries
[x] Remove special characters from spreadsheet export
[ ] Store campaign image in database
[ ] Automatically sign up for fundraising when registering on Squarespace
[ ] Research Squarespace API
[ ] Plan out implementation
[ ] Create email signup invite, including to add to campaign
[ ] Auto login after password change
[ ] Add Javascript warning about low security password [UT1 2.3]
[x] Optimize home page queries
[ ] Make default fundraiser amount configurable
[ ] Add name to tax receipt information
[ ] Change email links to HTTPS
Expand Down
1 change: 0 additions & 1 deletion team_fundraising/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ class CampaignAdmin(admin.ModelAdmin):


# Register your models here.

admin.site.register(Campaign)
admin.site.register(Fundraiser)

Expand Down
35 changes: 35 additions & 0 deletions team_fundraising/migrations/0020_auto_20200308_1152.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Generated by Django 2.2.10 on 2020-03-08 18:52

import django.contrib.auth.models
from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('auth', '0011_update_proxy_permissions'),
('team_fundraising', '0019_auto_20191221_0101'),
]

operations = [
migrations.CreateModel(
name='ProxyUser',
fields=[
],
options={
'verbose_name': 'UserProxy',
'proxy': True,
'indexes': [],
'constraints': [],
},
bases=('auth.user',),
managers=[
('objects', django.contrib.auth.models.UserManager()),
],
),
migrations.AlterField(
model_name='campaign',
name='campaign_message',
field=models.TextField(max_length=5000),
),
]
18 changes: 18 additions & 0 deletions team_fundraising/migrations/0021_auto_20200308_1156.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 2.2.10 on 2020-03-08 18:56

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('team_fundraising', '0020_auto_20200308_1152'),
]

operations = [
migrations.AlterField(
model_name='campaign',
name='campaign_message',
field=models.TextField(),
),
]
23 changes: 23 additions & 0 deletions team_fundraising/migrations/0022_auto_20200308_1207.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Generated by Django 2.2.10 on 2020-03-08 19:07

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('team_fundraising', '0021_auto_20200308_1156'),
]

operations = [
migrations.AlterField(
model_name='campaign',
name='default_fundraiser_message',
field=models.TextField(),
),
migrations.AlterField(
model_name='fundraiser',
name='message',
field=models.TextField(blank=True),
),
]
6 changes: 3 additions & 3 deletions team_fundraising/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ class Campaign(models.Model):
name = models.CharField(max_length=50)
goal = models.IntegerField(default=0)
active = models.BooleanField(default=True)
campaign_message = models.CharField(max_length=5000)
default_fundraiser_message = models.CharField(max_length=5000)
campaign_message = models.TextField()
default_fundraiser_message = models.TextField()

def __str__(self):
return self.name
Expand Down Expand Up @@ -116,7 +116,7 @@ class Fundraiser(models.Model):
name = models.CharField(max_length=50)
goal = models.IntegerField(default=0, blank=True)
photo = models.ImageField(upload_to='photos/', blank=True)
message = models.CharField(max_length=5000, blank=True)
message = models.TextField(blank=True)

def __str__(self):
return self.name
Expand Down

0 comments on commit 6a57ef6

Please sign in to comment.