Added order to charter members
This commit is contained in:
parent
3346a3a6ec
commit
3c5b64db0b
@ -12,5 +12,5 @@ class MemberAdmin(admin.ModelAdmin):
|
|||||||
list_display = ['name', 'position', 'chapter', 'phone_formatted', 'email', 'front_page', 'joined', 'thumbnail']
|
list_display = ['name', 'position', 'chapter', 'phone_formatted', 'email', 'front_page', 'joined', 'thumbnail']
|
||||||
list_filter = ['chapter', 'position', 'front_page', 'joined']
|
list_filter = ['chapter', 'position', 'front_page', 'joined']
|
||||||
search_fields = ['email', 'joined', 'name', 'chapter', 'position', 'website', 'phone', 'phone_formatted']
|
search_fields = ['email', 'joined', 'name', 'chapter', 'position', 'website', 'phone', 'phone_formatted']
|
||||||
fields = ['image_preview', 'image', 'name', 'position', 'chapter', 'biography', 'phone', 'email', 'website', 'front_page', 'joined']
|
fields = ['image_preview', 'image', 'name', 'position', 'chapter', 'biography', 'phone', 'email', 'website', 'front_page', 'order', 'joined']
|
||||||
readonly_fields = ['image_preview']
|
readonly_fields = ['image_preview']
|
||||||
|
20
charter_members/migrations/0004_attorney_order.py
Normal file
20
charter_members/migrations/0004_attorney_order.py
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# Generated by Django 1.11.5 on 2018-01-15 02:08
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('charter_members', '0003_auto_20180114_1722'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='attorney',
|
||||||
|
name='order',
|
||||||
|
field=models.IntegerField(blank=True, null=True, verbose_name='Order On Front Page'),
|
||||||
|
),
|
||||||
|
]
|
@ -26,6 +26,7 @@ class Attorney(models.Model):
|
|||||||
image = models.ImageField(upload_to='portraits', default='portraits/silhouette.png')
|
image = models.ImageField(upload_to='portraits', default='portraits/silhouette.png')
|
||||||
joined = models.DateField(blank=True, null=True)
|
joined = models.DateField(blank=True, null=True)
|
||||||
name = models.CharField(max_length=100)
|
name = models.CharField(max_length=100)
|
||||||
|
order = models.IntegerField(blank=True, null=True, verbose_name='Order On Front Page')
|
||||||
phone = models.CharField(max_length=10, blank=True, null=True)
|
phone = models.CharField(max_length=10, blank=True, null=True)
|
||||||
position = models.ForeignKey(Position)
|
position = models.ForeignKey(Position)
|
||||||
website = models.CharField(max_length=255, blank=True, null=True)
|
website = models.CharField(max_length=255, blank=True, null=True)
|
||||||
|
@ -13,7 +13,7 @@ from OACPL import settings
|
|||||||
|
|
||||||
|
|
||||||
def index(request):
|
def index(request):
|
||||||
attorneys = Attorney.objects.filter(front_page=True)
|
attorneys = Attorney.objects.filter(front_page=True).order_by('order')
|
||||||
return render(request, 'index.html', {'attorneys': attorneys, 'contact': settings.EMAIL_CONTACT})
|
return render(request, 'index.html', {'attorneys': attorneys, 'contact': settings.EMAIL_CONTACT})
|
||||||
|
|
||||||
|
|
||||||
|
BIN
media/portraits/download.jpg
Normal file
BIN
media/portraits/download.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.0 KiB |
20
newsletters/migrations/0004_auto_20180114_2108.py
Normal file
20
newsletters/migrations/0004_auto_20180114_2108.py
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# Generated by Django 1.11.5 on 2018-01-15 02:08
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('newsletters', '0003_subscriber_date'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='subscriber',
|
||||||
|
name='date',
|
||||||
|
field=models.DateField(auto_now_add=True),
|
||||||
|
),
|
||||||
|
]
|
Loading…
Reference in New Issue
Block a user