Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add plugin for rapid generation of staff pages - require only certain fields #295

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)