Skip to content

Commit

Permalink
Add plugin for rapid generation of staff pages - require only certain…
Browse files Browse the repository at this point in the history
… fields (#295)
  • Loading branch information
wesleyboar authored Aug 11, 2023
1 parent d7e0252 commit 2c8c766
Show file tree
Hide file tree
Showing 2 changed files with 75 additions and 13 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# Generated by Django 3.2.18 on 2023-08-11 15:44

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import filer.fields.image


class Migration(migrations.Migration):

dependencies = [
migrations.swappable_dependency(settings.FILER_IMAGE_MODEL),
('staff_profile', '0003_reduce_first_last_name_length'),
]

operations = [
migrations.AlterField(
model_name='staffprofileplugin',
name='department',
field=models.CharField(blank=True, max_length=100),
),
migrations.AlterField(
model_name='staffprofileplugin',
name='education',
field=models.TextField(blank=True, null=True),
),
migrations.AlterField(
model_name='staffprofileplugin',
name='experience',
field=models.TextField(blank=True, null=True),
),
migrations.AlterField(
model_name='staffprofileplugin',
name='memberships',
field=models.TextField(blank=True, null=True),
),
migrations.AlterField(
model_name='staffprofileplugin',
name='phone',
field=models.CharField(blank=True, max_length=50, null=True),
),
migrations.AlterField(
model_name='staffprofileplugin',
name='photo',
field=filer.fields.image.FilerImageField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.FILER_IMAGE_MODEL),
),
migrations.AlterField(
model_name='staffprofileplugin',
name='projects',
field=models.TextField(blank=True, null=True),
),
migrations.AlterField(
model_name='staffprofileplugin',
name='publications',
field=models.TextField(blank=True, null=True),
),
migrations.AlterField(
model_name='staffprofileplugin',
name='research_areas',
field=models.TextField(blank=True, null=True),
),
]
26 changes: 13 additions & 13 deletions apps/tup-cms/src/apps/staff_profile/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,20 @@ class StaffProfilePlugin(CMSPlugin):
"""
Model for CMS staff profile pages.
"""
first_name = models.CharField(max_length=100)
last_name = models.CharField(max_length=100)
title = models.CharField(max_length=100)
email = models.CharField(max_length=100)
department = models.CharField(max_length=100)
phone = models.CharField(max_length=50, null=True)
first_name = models.CharField(max_length=100, blank=False)
last_name = models.CharField(max_length=100, blank=False)
title = models.CharField(max_length=100, blank=False)
email = models.CharField(max_length=100, blank=False)
department = models.CharField(max_length=100, blank=True)
phone = models.CharField(max_length=50, null=True, blank=True)

description = models.TextField()

photo = FilerImageField(on_delete=models.CASCADE, null=True)
photo = FilerImageField(on_delete=models.CASCADE, null=True, blank=True)

publications = models.TextField(null=True)
projects = models.TextField(null=True)
education = models.TextField(null=True)
research_areas = models.TextField(null=True)
memberships = models.TextField(null=True)
experience = models.TextField(null=True)
publications = models.TextField(null=True, blank=True)
projects = models.TextField(null=True, blank=True)
education = models.TextField(null=True, blank=True)
research_areas = models.TextField(null=True, blank=True)
memberships = models.TextField(null=True, blank=True)
experience = models.TextField(null=True, blank=True)

0 comments on commit 2c8c766

Please sign in to comment.