From 3c5b64db0b1fb3aba50cb9be30c7d749f2995cb9 Mon Sep 17 00:00:00 2001 From: Zak Timson Date: Sun, 14 Jan 2018 21:10:47 -0500 Subject: [PATCH] Added order to charter members --- charter_members/admin.py | 2 +- .../migrations/0004_attorney_order.py | 20 ++++++++++++++++++ charter_members/models.py | 1 + main/views.py | 2 +- media/portraits/download.jpg | Bin 0 -> 4107 bytes .../migrations/0004_auto_20180114_2108.py | 20 ++++++++++++++++++ 6 files changed, 43 insertions(+), 2 deletions(-) create mode 100644 charter_members/migrations/0004_attorney_order.py create mode 100644 media/portraits/download.jpg create mode 100644 newsletters/migrations/0004_auto_20180114_2108.py diff --git a/charter_members/admin.py b/charter_members/admin.py index d89f125..55300b0 100644 --- a/charter_members/admin.py +++ b/charter_members/admin.py @@ -12,5 +12,5 @@ class MemberAdmin(admin.ModelAdmin): list_display = ['name', 'position', 'chapter', 'phone_formatted', 'email', 'front_page', 'joined', 'thumbnail'] list_filter = ['chapter', 'position', 'front_page', 'joined'] 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'] diff --git a/charter_members/migrations/0004_attorney_order.py b/charter_members/migrations/0004_attorney_order.py new file mode 100644 index 0000000..613c78e --- /dev/null +++ b/charter_members/migrations/0004_attorney_order.py @@ -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'), + ), + ] diff --git a/charter_members/models.py b/charter_members/models.py index a599d33..b8a898b 100644 --- a/charter_members/models.py +++ b/charter_members/models.py @@ -26,6 +26,7 @@ class Attorney(models.Model): image = models.ImageField(upload_to='portraits', default='portraits/silhouette.png') joined = models.DateField(blank=True, null=True) 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) position = models.ForeignKey(Position) website = models.CharField(max_length=255, blank=True, null=True) diff --git a/main/views.py b/main/views.py index 2245def..88def91 100644 --- a/main/views.py +++ b/main/views.py @@ -13,7 +13,7 @@ from OACPL import settings 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}) diff --git a/media/portraits/download.jpg b/media/portraits/download.jpg new file mode 100644 index 0000000000000000000000000000000000000000..e69358d94a9c21f19d6061d4532f96e7c79ad973 GIT binary patch literal 4107 zcmYjP2RIw**N?4eB}#-=QL!51ir5;XwyM2HO2oXV(VBJXpG#wv+Lfx&YK$TjHR5Wm z$VKguQi7UMdldE8``z#PzVklsIp=rId4A_T&wI`%&*uO@BRxYs0396wKzDHf=M+F3 z;1V+n7Z(=~kPFE3OE~}0Jivb(F!&dO2uKJ)_(iYr@CeHZi%P;|WMp^+<(1{7l_aEP zV03J3Y*#K{;ROPDqy=~cU@&QE>3`IP{pJ3T`Pcr7l>P}S!K9U7O48?l0YI#D^ngwV zx|;xc5FG=E?z|Il9RQ$bpt}&j|H?%P10xeN3+qKz8wjAMqi0}bp=W1dWca7%0)iNY z<(Rn41DS7XxyGi~UM*tb7JZ3(}*R#6d2q#fqi%rEx6IDC`ig)!bB^}NN;Cr40DV{gF{Pmvpt*v5aCP_!s z!-r=ChN>?E9%tD*bMM-(RwUpiid1!J)+dpV;8G?he6Kq|y3*{!;yy)GDWWg$LgB-F z3UA<*T->^9mr|+S(A%TPez1<26U*IuWA{#*WaWzAoPfOiRZUlD)|;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YG^#J5j$MaX+^7(a0%3 z>XSVY$x9)(@28jXnj1N;E=ic@;FQ0iGf&O|PNsTD<*&|{U)WYSD2-?4JG~ps9L-u* z>JI+n%V5b|Eg0{yA9tp)ar_=RF?)7T<;Uy|5s^FW)0o;jms%mjIav5$hV-o`{luL) zg^`NOqpw@1iN;!O%^Poy>uyVGd5TRyooV>958)tfi|73v0GW_;z+%ob)~G-;61(fG zzJx@>`!y2yw?LmY)>urpF1jmb#Us9HHPe8gZ|-vUJ~Fm8aCSHjxrjFTx~czA1DZ5) z7QT!g46z|vCTx-i#aGg_BE`$rmZPG3uD1o(HsPk$_hE<81E}#xj3e)NK5eNadQxS4()DtCcxsP+h5vZktVLS$`saP?*O)T& zmO2vrZX>e^ahkX8J4$ZuaZ%eIRKigR?fLK?O`7DacUVlf%louMZ6-c1K0V=m;}>x1 zQn3(1UQtAmU(r_DqJ<#QV9@84*=pqD!)5`D=?uof47HpF3wWgEtzp^>O(P(H{9>Rg;FOwy;It zYj1*HSS__F9=SVA>2hR|ufm6(FlsXW9hNh$ko)aNC%l~ zw`&%2&=+%NuY_5X#|^w1Cu1LMzWa=C|Kc2%wR~f}9r|_7%4>=wuAbZ9uO(J)k!+PQrs7ji_p3jhEB literal 0 HcmV?d00001 diff --git a/newsletters/migrations/0004_auto_20180114_2108.py b/newsletters/migrations/0004_auto_20180114_2108.py new file mode 100644 index 0000000..cb7d632 --- /dev/null +++ b/newsletters/migrations/0004_auto_20180114_2108.py @@ -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), + ), + ]