Skip to content

Commit

Permalink
Merge pull request #125 from rice-crc/develop
Browse files Browse the repository at this point in the history
Merge develop into main
  • Loading branch information
derekjkeller authored Jul 12, 2023
2 parents 9616199 + a65be40 commit 0160e2f
Show file tree
Hide file tree
Showing 3 changed files with 80 additions and 67 deletions.
8 changes: 4 additions & 4 deletions api/document/templates/single_doc.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<h2>{{ zs.zotero_title }}</h2>
<h3>{{ zs.zotero_date }} --> <a href="http://127.0.0.1:8000/admin/document/zoterosource/{{ zs.id }}/change/" target="_blank">Edit</a></h3>
<h3>{{ zs.zotero_date }} --> <a href="/admin/document/zoterosource/{{ zs.id }}/change/" target="_blank">Edit</a></h3>
<p>Zotero link: <a href="{{ zs.zotero_web_page_url }}">{{ zs.zotero_web_page_url }}</a></p>
<p>Library collection item listing: <a href="{{ zs.item_url }}">{{ zs.item_url }}</a></p>
<hr/>
Expand Down Expand Up @@ -27,7 +27,7 @@ <h4>Pages</h4>
</td>
<td>
{% if spc.source_page.transcription %}
<p><b><a href="http://127.0.0.1:8000/admin/document/sourcepage/{{ spc.source_page.id }}/change/" target="_blank">Edit Transcript Here</a></b></p>
<p><b><a href="/admin/document/sourcepage/{{ spc.source_page.id }}/change/" target="_blank">Edit Transcript Here</a></b></p>
<p>
{{ spc.source_page.transcription }}
</p>
Expand All @@ -45,12 +45,12 @@ <h4>Linked entities</h4>

<ol>
{% for v in zs.voyages.all %}
<li>Voyage #{{ v.id }} : {{ v.ship.ship_name}} --> <a href="http://127.0.0.1:8000/admin/voyage/voyage/{{ v.id }}/change/" target="_blank">Edit</a></li>
<li>Voyage #{{ v.id }} : {{ v.ship.ship_name}} --> <a href="/admin/voyage/voyage/{{ v.id }}/change/" target="_blank">Edit</a></li>
{% endfor %}
</ol>

<ol>
{% for ep in zs.enslaved_people.all %}
<li>Person: {{ ep.id }} : {{ ep.documented_name }} --> <a href="http://127.0.0.1:8000/admin/past/enslaved/{{ ep.id }}/change/" target="_blank">Edit</a></li>
<li>Person: {{ ep.id }} : {{ ep.documented_name }} --> <a href="/admin/past/enslaved/{{ ep.id }}/change/" target="_blank">Edit</a></li>
{% endfor %}
</ol>
2 changes: 1 addition & 1 deletion api/past/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ class EnslavedInRelationInline(admin.StackedInline):
# admin.site.register(EnslavementRelation,EnslavementRelationAdmin)
# admin.site.register(EnslaverRole,EnslaverRoleAdmin)
admin.site.register(EnslaverIdentity,EnslaverIdentityAdmin)
# admin.site.register(EnslaverAlias,EnslaverAliasAdmin)
admin.site.register(EnslaverAlias,EnslaverAliasAdmin)
# admin.site.register(LanguageGroup,LanguageGroupAdmin)
# admin.site.register(ModernCountry,ModernCountryAdmin)
# admin.site.register(AltLanguageGroupName)
Expand Down
137 changes: 75 additions & 62 deletions api/voyage/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ class VoyageCrewInline(admin.StackedInline):
model=VoyageCrew
max_num=1
classes = ['collapse']
fields = [
'crew_voyage_outset',
'crew_died_complete_voyage'
]

#

Expand All @@ -27,21 +31,26 @@ class VoyageDatesInline(admin.StackedInline):
'voyage_completed_sparsedate',
'imp_voyage_began_sparsedate',
'imp_departed_africa_sparsedate',
'imp_arrival_at_port_of_dis_sparsedate'
'imp_arrival_at_port_of_dis_sparsedate',
'date_departed_africa',
'voyage_completed',
'imp_departed_africa',
'imp_length_home_to_disembark',
'imp_length_leaving_africa_to_disembark'
]
verbose_name_plural="Voyage Dates"

# class PlaceAdmin(admin.ModelAdmin):
# model=Place
# search_fields=['place']
#
# class RegionAdmin(admin.ModelAdmin):
# model=Region
# search_fields=['region']
#
# class BroadRegionAdmin(admin.ModelAdmin):
# model=BroadRegion
# search_fields=['broad_region']
class PlaceAdmin(admin.ModelAdmin):
model=Place
search_fields=['place']

class RegionAdmin(admin.ModelAdmin):
model=Region
search_fields=['region']

class BroadRegionAdmin(admin.ModelAdmin):
model=BroadRegion
search_fields=['broad_region']



Expand Down Expand Up @@ -134,49 +143,53 @@ class VoyageShipInline(admin.StackedInline):
class VoyageItineraryInline(admin.StackedInline):
model = VoyageItinerary
max_num = 1
# autocomplete_fields=[
# 'imp_broad_region_voyage_begin',
# 'port_of_departure',
# 'int_first_port_emb',
# 'int_third_port_dis',
# 'int_fourth_port_dis',
# 'int_third_place_region_slave_landing',
# 'int_fourth_place_region_slave_landing',
# 'int_second_port_emb',
# 'int_first_region_purchase_slaves',
# 'int_second_region_purchase_slaves',
# 'int_first_port_dis',
# 'int_second_port_dis',
# 'int_first_region_slave_landing',
# 'imp_principal_region_slave_dis',
# 'int_second_place_region_slave_landing',
# 'first_place_slave_purchase',
# 'second_place_slave_purchase',
# 'third_place_slave_purchase',
# 'first_region_slave_emb',
# 'second_region_slave_emb',
# 'third_region_slave_emb',
# 'port_of_call_before_atl_crossing',
# 'first_landing_place',
# 'second_landing_place',
# 'third_landing_place',
# 'first_landing_region',
# 'second_landing_region',
# 'third_landing_region',
# 'place_voyage_ended',
# 'region_of_return',
# 'broad_region_of_return',
# 'imp_port_voyage_begin',
# 'imp_region_voyage_begin',
# 'imp_broad_region_voyage_begin',
# 'principal_place_of_slave_purchase',
# 'imp_principal_place_of_slave_purchase',
# 'imp_principal_region_of_slave_purchase',
# 'imp_broad_region_of_slave_purchase',
# 'principal_port_of_slave_dis',
# 'imp_principal_port_slave_dis',
# 'imp_broad_region_slave_dis'
# ]
autocomplete_fields=[
'imp_broad_region_voyage_begin',
'port_of_departure',
'int_first_port_emb',
'int_third_port_dis',
'int_fourth_port_dis',
'int_third_place_region_slave_landing',
'int_fourth_place_region_slave_landing',
'int_second_port_emb',
'int_first_region_purchase_slaves',
'int_second_region_purchase_slaves',
'int_first_port_dis',
'int_second_port_dis',
'int_first_region_slave_landing',
'imp_principal_region_slave_dis',
'int_second_place_region_slave_landing',
'first_place_slave_purchase',
'second_place_slave_purchase',
'third_place_slave_purchase',
'first_region_slave_emb',
'second_region_slave_emb',
'third_region_slave_emb',
'first_landing_place',
'second_landing_place',
'third_landing_place',
'first_landing_region',
'second_landing_region',
'third_landing_region',
'place_voyage_ended',
'imp_port_voyage_begin',
'principal_place_of_slave_purchase',
'imp_principal_place_of_slave_purchase',
'imp_principal_region_of_slave_purchase',
'imp_broad_region_of_slave_purchase',
'principal_port_of_slave_dis',
'imp_principal_port_slave_dis',
'imp_broad_region_slave_dis'
]
exclude= [
'port_of_call_before_atl_crossing',
'number_of_ports_of_call',
'region_of_return',
'broad_region_of_return',
'imp_region_voyage_begin',
'imp_broad_region_voyage_begin'

]
classes = ['collapse']
#

Expand Down Expand Up @@ -209,8 +222,8 @@ class VoyageOutcomeInline(admin.StackedInline):

class EnslaverAliasConnectionInline(admin.StackedInline):
model = EnslaverVoyageConnection
readonly_fields=['enslaver_alias','role','order']
# autocomplete_fields=['enslaver_alias',]
# readonly_fields=['enslaver_alias','role','order']
autocomplete_fields=['enslaver_alias',]
classes = ['collapse']
extra=0

Expand All @@ -225,17 +238,17 @@ class VoyageAdmin(admin.ModelAdmin):
VoyageShipInline,
VoyageSlavesNumbersInline
)
fields=['voyage_id','dataset','voyage_groupings','voyage_in_cd_rom']
fields=['voyage_id','dataset','voyage_in_cd_rom']
list_display=('voyage_id',)
search_fields=('voyage_id',)
model=Voyage
#
#
admin.site.register(Voyage, VoyageAdmin)
# admin.site.register(VoyageDates)
# admin.site.register(Place,PlaceAdmin)
# admin.site.register(Region,RegionAdmin)
# admin.site.register(BroadRegion,BroadRegionAdmin)
admin.site.register(Place,PlaceAdmin)
admin.site.register(Region,RegionAdmin)
admin.site.register(BroadRegion,BroadRegionAdmin)
# admin.site.register(VoyageSources, VoyageSourcesAdmin)
# admin.site.register(ParticularOutcome, ParticularOutcomeAdmin)
# admin.site.register(SlavesOutcome, SlavesOutcomeAdmin)
Expand All @@ -244,4 +257,4 @@ class VoyageAdmin(admin.ModelAdmin):
# admin.site.register(Resistance, ResistanceAdmin)
# admin.site.register(Nationality, NationalityAdmin)
# admin.site.register(TonType, TonTypeAdmin)
# admin.site.register(RigOfVessel, RigOfVesselAdmin)
admin.site.register(RigOfVessel)

0 comments on commit 0160e2f

Please sign in to comment.