Skip to content

Commit

Permalink
[#945] Moved IATI activity ID to the Project model
Browse files Browse the repository at this point in the history
- Added field 'Project.iati_activity_id'
- Moved data from Partnership to Project
  - If the project has a 'sync_owner', use the IATI activity ID of the sync owner
  - Else, use the IATI activity ID of one of the support partners
  - Leave empty if all of these do not exist
- Added IATI activity ID field to Project admin
- Removed IATI activity ID field from Partnership inline
- Added IATI activity to the project main page, if available
  • Loading branch information
KasperBrandt committed Dec 8, 2014
1 parent b00a34c commit de3af88
Show file tree
Hide file tree
Showing 5 changed files with 1,223 additions and 3 deletions.
5 changes: 3 additions & 2 deletions akvo/rsr/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,7 @@ def clean_partner_type(self):

class PartnershipInline(admin.TabularInline):
model = get_model('rsr', 'Partnership')
exclude = ('iati_activity_id',)
extra = 1
form = RSR_PartnershipInlineForm
formset = RSR_PartnershipInlineFormFormSet
Expand Down Expand Up @@ -484,8 +485,8 @@ class ProjectAdmin(TimestampsAdminDisplayMixin, ObjectPermissionsModelAdmin):
'description': u'<p style="margin-left:0; padding-left:0; margin-top:1em; width:75%%;">%s</p>' % _(
u'This section should contain the top-level information about your project which will be publicly available and used within searches. Try to keep your Title and Subtitle short and snappy.'
),
'fields': ('title', 'subtitle', 'status', 'language', 'date_start_planned', 'date_start_actual',
'date_end_planned', 'date_end_actual', 'donate_button', 'hierarchy'),
'fields': ('title', 'subtitle', 'iati_activity_id', 'status', 'language', 'date_start_planned',
'date_start_actual', 'date_end_planned', 'date_end_actual', 'donate_button', 'hierarchy'),
}),
(_(u'Description'), {
'description': u'<p style="margin-left:0; padding-left:0; margin-top:1em; width:75%%;">%s</p>' % _(
Expand Down
Loading

0 comments on commit de3af88

Please sign in to comment.