Skip to content

Commit

Permalink
[#1025] Added document upload
Browse files Browse the repository at this point in the history
- Removed ProjectDocument model
- Changed Link model
  - Added IATI fields
  - Added document upload
  - Changed 'caption' to 'title'
- WIP because this migration will conflict with new migrations in other branches
  • Loading branch information
KasperBrandt committed Feb 2, 2015
1 parent 9030fe9 commit ea28a27
Show file tree
Hide file tree
Showing 6 changed files with 687 additions and 55 deletions.
6 changes: 5 additions & 1 deletion akvo/rsr/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,11 @@ class LinkInline(admin.StackedInline):
list_display = ('url', 'caption', 'show_link')
fieldsets = (
(None, {
'fields': ('kind', 'url', 'caption')
'fields': ('kind', 'url', 'document', 'language', 'title', 'title_language')
}),
('IATI fields (advanced)', {
'classes': ('collapse',),
'fields': ('format', 'category')
}),
)

Expand Down
4 changes: 2 additions & 2 deletions akvo/rsr/iati/iati_file_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,8 @@ def iati_links(activity, links):
website = schema.activity_website()
website.set_valueOf_(xml_enc(link.url))

if check_value(link.caption):
website.set_anyAttributes_({"akvo:url-caption": xml_enc(link.caption)})
if check_value(link.title):
website.set_anyAttributes_({"akvo:url-caption": xml_enc(link.title)})

activity.add_activity_website(website)

Expand Down
Loading

0 comments on commit ea28a27

Please sign in to comment.