Skip to content

Commit

Permalink
Merge pull request #776 from freedomofpress/separate-incident-targets
Browse files Browse the repository at this point in the history
Separate incident targets into journalists and institutions
  • Loading branch information
harrislapiroff authored Feb 18, 2020
2 parents 517e0ee + 7b06c47 commit a5a51fb
Show file tree
Hide file tree
Showing 38 changed files with 1,233 additions and 98 deletions.
2 changes: 1 addition & 1 deletion client/common/js/filtering/FiltersList.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class FiltersList extends PureComponent {
</ul>
)
} else {
renderedValue = filterValues[filter.name].label
renderedValue = filterValues[filter.name].title
}
}

Expand Down
2 changes: 1 addition & 1 deletion common/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def __init__(self, *args, **kwargs):
widget=type(
'_Autocomplete',
(Autocomplete,),
dict(page_type=self.merge_model_type, can_create=False, is_single=False)
dict(target_model=self.merge_model_type, can_create=False, is_single=False)
),
label='{} to merge'.format(capfirst(self.merge_model_name))
)
Expand Down
28 changes: 28 additions & 0 deletions common/migrations/0056_auto_20190528_1539.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Generated by Django 2.1.7 on 2019-05-28 15:39

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('common', '0055_auto_20190318_2031'),
]

operations = [
migrations.AlterField(
model_name='categoryincidentfilter',
name='incident_filter',
field=models.CharField(choices=[('actor', 'Actor'), ('affiliation', 'Affiliation'), ('arrest_status', 'Arrest status'), ('assailant', 'Assailant'), ('border_point', 'Border point'), ('charged_under_espionage_act', 'Charged under espionage act?'), ('charges', 'Charges'), ('circuits', 'Circuits'), ('city', 'City'), ('current_charges', 'Current Charges'), ('denial_of_entry', 'Denied entry?'), ('detention_date', 'Detention date between'), ('detention_status', 'Detention status'), ('did_authorities_ask_for_device_access', 'Did authorities ask for device access?'), ('did_authorities_ask_for_social_media_pass', 'Did authorities ask for social media password?'), ('did_authorities_ask_for_social_media_user', 'Did authorities ask for social media username?'), ('did_authorities_ask_about_work', "Did authorities ask intrusive questions about journalist's work?"), ('dropped_charges', 'Dropped Charges'), ('equipment_broken', 'Equipment Broken'), ('equipment_seized', 'Equipment Seized'), ('tags', 'Has any of these tags'), ('held_in_contempt', 'If subject refused to cooperate, were they held in contempt?'), ('links', 'Incident page links'), ('targets_whose_communications_were_obtained', 'Journalists/Organizations whose communications were obtained in leak investigation'), ('lawsuit_name', 'Lawsuit name'), ('legal_order_type', 'Legal order type'), ('politicians_or_public_figures_involved', 'Politicians or public officials involved'), ('release_date', 'Release date between'), ('is_search_warrant_obtained', 'Search warrant obtained?'), ('pending_cases', 'Show only pending cases'), ('state', 'State'), ('status_of_charges', 'Status of charges'), ('status_of_prior_restraint', 'Status of prior restraint'), ('status_of_seized_equipment', 'Status of seized equipment'), ('stopped_at_border', 'Stopped at border?'), ('stopped_previously', 'Stopped previously?'), ('subpoena_status', 'Subpoena status'), ('subpoena_type', 'Subpoena type'), ('target_nationality', 'Target Nationality'), ('targeted_institutions', 'Targeted Institutions'), ('targeted_journalists', 'Targeted any of these journalists'), ('targets', 'Targets (Journalists/Organizations)'), ('third_party_business', 'Third party business'), ('third_party_in_possession_of_communications', 'Third party in possession of communications'), ('date', 'Took place between'), ('target_us_citizenship_status', 'US Citizenship Status'), ('unnecessary_use_of_force', 'Unnecessary use of force?'), ('venue', 'Venue'), ('was_journalist_targeted', 'Was journalist targeted?'), ('were_devices_searched_or_seized', 'Were devices searched or seized?')], max_length=255, unique=True),
),
migrations.AlterField(
model_name='generalincidentfilter',
name='incident_filter',
field=models.CharField(choices=[('actor', 'Actor'), ('affiliation', 'Affiliation'), ('arrest_status', 'Arrest status'), ('assailant', 'Assailant'), ('border_point', 'Border point'), ('charged_under_espionage_act', 'Charged under espionage act?'), ('charges', 'Charges'), ('circuits', 'Circuits'), ('city', 'City'), ('current_charges', 'Current Charges'), ('denial_of_entry', 'Denied entry?'), ('detention_date', 'Detention date between'), ('detention_status', 'Detention status'), ('did_authorities_ask_for_device_access', 'Did authorities ask for device access?'), ('did_authorities_ask_for_social_media_pass', 'Did authorities ask for social media password?'), ('did_authorities_ask_for_social_media_user', 'Did authorities ask for social media username?'), ('did_authorities_ask_about_work', "Did authorities ask intrusive questions about journalist's work?"), ('dropped_charges', 'Dropped Charges'), ('equipment_broken', 'Equipment Broken'), ('equipment_seized', 'Equipment Seized'), ('tags', 'Has any of these tags'), ('held_in_contempt', 'If subject refused to cooperate, were they held in contempt?'), ('links', 'Incident page links'), ('targets_whose_communications_were_obtained', 'Journalists/Organizations whose communications were obtained in leak investigation'), ('lawsuit_name', 'Lawsuit name'), ('legal_order_type', 'Legal order type'), ('politicians_or_public_figures_involved', 'Politicians or public officials involved'), ('release_date', 'Release date between'), ('is_search_warrant_obtained', 'Search warrant obtained?'), ('pending_cases', 'Show only pending cases'), ('state', 'State'), ('status_of_charges', 'Status of charges'), ('status_of_prior_restraint', 'Status of prior restraint'), ('status_of_seized_equipment', 'Status of seized equipment'), ('stopped_at_border', 'Stopped at border?'), ('stopped_previously', 'Stopped previously?'), ('subpoena_status', 'Subpoena status'), ('subpoena_type', 'Subpoena type'), ('target_nationality', 'Target Nationality'), ('targeted_institutions', 'Targeted Institutions'), ('targeted_journalists', 'Targeted any of these journalists'), ('targets', 'Targets (Journalists/Organizations)'), ('third_party_business', 'Third party business'), ('third_party_in_possession_of_communications', 'Third party in possession of communications'), ('date', 'Took place between'), ('target_us_citizenship_status', 'US Citizenship Status'), ('unnecessary_use_of_force', 'Unnecessary use of force?'), ('venue', 'Venue'), ('was_journalist_targeted', 'Was journalist targeted?'), ('were_devices_searched_or_seized', 'Were devices searched or seized?')], max_length=255, unique=True),
),
migrations.AlterField(
model_name='statisticsitem',
name='dataset',
field=models.CharField(choices=[('num_incidents', 'num_incidents'), ('num_institution_targets', 'num_institution_targets'), ('num_journalist_targets', 'num_journalist_targets'), ('num_targets', 'num_targets')], max_length=255),
),
]
14 changes: 14 additions & 0 deletions common/migrations/0058_merge_20190723_1834.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Generated by Django 2.1.10 on 2019-07-23 18:34

from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
('common', '0057_auto_20190723_0332'),
('common', '0056_auto_20190528_1539'),
]

operations = [
]
23 changes: 23 additions & 0 deletions common/migrations/0059_auto_20190723_1851.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Generated by Django 2.1.10 on 2019-07-23 18:51

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('common', '0058_merge_20190723_1834'),
]

operations = [
migrations.AlterField(
model_name='categoryincidentfilter',
name='incident_filter',
field=models.CharField(choices=[('actor', 'Actor'), ('affiliation', 'Affiliation'), ('arrest_status', 'Arrest status'), ('assailant', 'Assailant'), ('border_point', 'Border point'), ('charged_under_espionage_act', 'Charged under espionage act?'), ('charges', 'Charges'), ('circuits', 'Circuits'), ('city', 'City'), ('current_charges', 'Current Charges'), ('denial_of_entry', 'Denied entry?'), ('detention_date', 'Detention date between'), ('detention_status', 'Detention status'), ('did_authorities_ask_for_device_access', 'Did authorities ask for device access?'), ('did_authorities_ask_for_social_media_pass', 'Did authorities ask for social media password?'), ('did_authorities_ask_for_social_media_user', 'Did authorities ask for social media username?'), ('did_authorities_ask_about_work', "Did authorities ask intrusive questions about journalist's work?"), ('dropped_charges', 'Dropped Charges'), ('equipment_broken', 'Equipment Broken'), ('equipment_seized', 'Equipment Seized'), ('tags', 'Has any of these tags'), ('held_in_contempt', 'If subject refused to cooperate, were they held in contempt?'), ('authors', 'Incident author'), ('links', 'Incident page links'), ('targets_whose_communications_were_obtained', 'Journalists/Organizations whose communications were obtained in leak investigation'), ('lawsuit_name', 'Lawsuit name'), ('legal_order_type', 'Legal order type'), ('politicians_or_public_figures_involved', 'Politicians or public officials involved'), ('release_date', 'Release date between'), ('is_search_warrant_obtained', 'Search warrant obtained?'), ('pending_cases', 'Show only pending cases'), ('state', 'State'), ('status_of_charges', 'Status of charges'), ('status_of_prior_restraint', 'Status of prior restraint'), ('status_of_seized_equipment', 'Status of seized equipment'), ('stopped_at_border', 'Stopped at border?'), ('stopped_previously', 'Stopped previously?'), ('subpoena_status', 'Subpoena status'), ('subpoena_type', 'Subpoena type'), ('target_nationality', 'Target Nationality'), ('targeted_institutions', 'Targeted Institutions'), ('targeted_journalists', 'Targeted any of these journalists'), ('targets', 'Targets (Journalists/Organizations)'), ('third_party_business', 'Third party business'), ('third_party_in_possession_of_communications', 'Third party in possession of communications'), ('date', 'Took place between'), ('target_us_citizenship_status', 'US Citizenship Status'), ('unnecessary_use_of_force', 'Unnecessary use of force?'), ('venue', 'Venue'), ('was_journalist_targeted', 'Was journalist targeted?'), ('were_devices_searched_or_seized', 'Were devices searched or seized?')], max_length=255, unique=True),
),
migrations.AlterField(
model_name='generalincidentfilter',
name='incident_filter',
field=models.CharField(choices=[('actor', 'Actor'), ('affiliation', 'Affiliation'), ('arrest_status', 'Arrest status'), ('assailant', 'Assailant'), ('border_point', 'Border point'), ('charged_under_espionage_act', 'Charged under espionage act?'), ('charges', 'Charges'), ('circuits', 'Circuits'), ('city', 'City'), ('current_charges', 'Current Charges'), ('denial_of_entry', 'Denied entry?'), ('detention_date', 'Detention date between'), ('detention_status', 'Detention status'), ('did_authorities_ask_for_device_access', 'Did authorities ask for device access?'), ('did_authorities_ask_for_social_media_pass', 'Did authorities ask for social media password?'), ('did_authorities_ask_for_social_media_user', 'Did authorities ask for social media username?'), ('did_authorities_ask_about_work', "Did authorities ask intrusive questions about journalist's work?"), ('dropped_charges', 'Dropped Charges'), ('equipment_broken', 'Equipment Broken'), ('equipment_seized', 'Equipment Seized'), ('tags', 'Has any of these tags'), ('held_in_contempt', 'If subject refused to cooperate, were they held in contempt?'), ('authors', 'Incident author'), ('links', 'Incident page links'), ('targets_whose_communications_were_obtained', 'Journalists/Organizations whose communications were obtained in leak investigation'), ('lawsuit_name', 'Lawsuit name'), ('legal_order_type', 'Legal order type'), ('politicians_or_public_figures_involved', 'Politicians or public officials involved'), ('release_date', 'Release date between'), ('is_search_warrant_obtained', 'Search warrant obtained?'), ('pending_cases', 'Show only pending cases'), ('state', 'State'), ('status_of_charges', 'Status of charges'), ('status_of_prior_restraint', 'Status of prior restraint'), ('status_of_seized_equipment', 'Status of seized equipment'), ('stopped_at_border', 'Stopped at border?'), ('stopped_previously', 'Stopped previously?'), ('subpoena_status', 'Subpoena status'), ('subpoena_type', 'Subpoena type'), ('target_nationality', 'Target Nationality'), ('targeted_institutions', 'Targeted Institutions'), ('targeted_journalists', 'Targeted any of these journalists'), ('targets', 'Targets (Journalists/Organizations)'), ('third_party_business', 'Third party business'), ('third_party_in_possession_of_communications', 'Third party in possession of communications'), ('date', 'Took place between'), ('target_us_citizenship_status', 'US Citizenship Status'), ('unnecessary_use_of_force', 'Unnecessary use of force?'), ('venue', 'Venue'), ('was_journalist_targeted', 'Was journalist targeted?'), ('were_devices_searched_or_seized', 'Were devices searched or seized?')], max_length=255, unique=True),
),
]
14 changes: 14 additions & 0 deletions common/migrations/0060_merge_20190909_2024.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Generated by Django 2.1.11 on 2019-09-09 20:24

from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
('common', '0059_auto_20190723_1851'),
('common', '0059_auto_20190806_2055'),
]

operations = [
]
23 changes: 23 additions & 0 deletions common/migrations/0061_auto_20190909_2046.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Generated by Django 2.1.11 on 2019-09-09 20:46

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('common', '0060_merge_20190909_2024'),
]

operations = [
migrations.AlterField(
model_name='categoryincidentfilter',
name='incident_filter',
field=models.CharField(choices=[('actor', 'Actor'), ('affiliation', 'Affiliation'), ('arrest_status', 'Arrest status'), ('assailant', 'Assailant'), ('border_point', 'Border point'), ('charged_under_espionage_act', 'Charged under espionage act?'), ('charges', 'Charges'), ('circuits', 'Circuits'), ('city', 'City'), ('current_charges', 'Current Charges'), ('denial_of_entry', 'Denied entry?'), ('detention_date', 'Detention date between'), ('detention_status', 'Detention status'), ('did_authorities_ask_for_device_access', 'Did authorities ask for device access?'), ('did_authorities_ask_for_social_media_pass', 'Did authorities ask for social media password?'), ('did_authorities_ask_for_social_media_user', 'Did authorities ask for social media username?'), ('did_authorities_ask_about_work', "Did authorities ask intrusive questions about journalist's work?"), ('dropped_charges', 'Dropped Charges'), ('equipment_broken', 'Equipment Broken'), ('equipment_seized', 'Equipment Seized'), ('tags', 'Has any of these tags'), ('held_in_contempt', 'If subject refused to cooperate, were they held in contempt?'), ('authors', 'Incident author'), ('links', 'Incident page links'), ('targets_whose_communications_were_obtained', 'Journalists/Organizations whose communications were obtained in leak investigation'), ('lawsuit_name', 'Lawsuit name'), ('legal_order_type', 'Legal order type'), ('politicians_or_public_figures_involved', 'Politicians or public officials involved'), ('primary_video', 'Primary video'), ('release_date', 'Release date between'), ('is_search_warrant_obtained', 'Search warrant obtained?'), ('pending_cases', 'Show only pending cases'), ('state', 'State'), ('status_of_charges', 'Status of charges'), ('status_of_prior_restraint', 'Status of prior restraint'), ('status_of_seized_equipment', 'Status of seized equipment'), ('stopped_at_border', 'Stopped at border?'), ('stopped_previously', 'Stopped previously?'), ('subpoena_status', 'Subpoena status'), ('subpoena_type', 'Subpoena type'), ('suppress_footer', 'Suppress Footer Call to Action'), ('target_nationality', 'Target Nationality'), ('targeted_institutions', 'Targeted Institutions'), ('targeted_journalists', 'Targeted any of these journalists'), ('targets', 'Targets (Journalists/Organizations)'), ('third_party_business', 'Third party business'), ('third_party_in_possession_of_communications', 'Third party in possession of communications'), ('date', 'Took place between'), ('target_us_citizenship_status', 'US Citizenship Status'), ('unnecessary_use_of_force', 'Unnecessary use of force?'), ('venue', 'Venue'), ('was_journalist_targeted', 'Was journalist targeted?'), ('were_devices_searched_or_seized', 'Were devices searched or seized?')], max_length=255, unique=True),
),
migrations.AlterField(
model_name='generalincidentfilter',
name='incident_filter',
field=models.CharField(choices=[('actor', 'Actor'), ('affiliation', 'Affiliation'), ('arrest_status', 'Arrest status'), ('assailant', 'Assailant'), ('border_point', 'Border point'), ('charged_under_espionage_act', 'Charged under espionage act?'), ('charges', 'Charges'), ('circuits', 'Circuits'), ('city', 'City'), ('current_charges', 'Current Charges'), ('denial_of_entry', 'Denied entry?'), ('detention_date', 'Detention date between'), ('detention_status', 'Detention status'), ('did_authorities_ask_for_device_access', 'Did authorities ask for device access?'), ('did_authorities_ask_for_social_media_pass', 'Did authorities ask for social media password?'), ('did_authorities_ask_for_social_media_user', 'Did authorities ask for social media username?'), ('did_authorities_ask_about_work', "Did authorities ask intrusive questions about journalist's work?"), ('dropped_charges', 'Dropped Charges'), ('equipment_broken', 'Equipment Broken'), ('equipment_seized', 'Equipment Seized'), ('tags', 'Has any of these tags'), ('held_in_contempt', 'If subject refused to cooperate, were they held in contempt?'), ('authors', 'Incident author'), ('links', 'Incident page links'), ('targets_whose_communications_were_obtained', 'Journalists/Organizations whose communications were obtained in leak investigation'), ('lawsuit_name', 'Lawsuit name'), ('legal_order_type', 'Legal order type'), ('politicians_or_public_figures_involved', 'Politicians or public officials involved'), ('primary_video', 'Primary video'), ('release_date', 'Release date between'), ('is_search_warrant_obtained', 'Search warrant obtained?'), ('pending_cases', 'Show only pending cases'), ('state', 'State'), ('status_of_charges', 'Status of charges'), ('status_of_prior_restraint', 'Status of prior restraint'), ('status_of_seized_equipment', 'Status of seized equipment'), ('stopped_at_border', 'Stopped at border?'), ('stopped_previously', 'Stopped previously?'), ('subpoena_status', 'Subpoena status'), ('subpoena_type', 'Subpoena type'), ('suppress_footer', 'Suppress Footer Call to Action'), ('target_nationality', 'Target Nationality'), ('targeted_institutions', 'Targeted Institutions'), ('targeted_journalists', 'Targeted any of these journalists'), ('targets', 'Targets (Journalists/Organizations)'), ('third_party_business', 'Third party business'), ('third_party_in_possession_of_communications', 'Third party in possession of communications'), ('date', 'Took place between'), ('target_us_citizenship_status', 'US Citizenship Status'), ('unnecessary_use_of_force', 'Unnecessary use of force?'), ('venue', 'Venue'), ('was_journalist_targeted', 'Was journalist targeted?'), ('were_devices_searched_or_seized', 'Were devices searched or seized?')], max_length=255, unique=True),
),
]
14 changes: 14 additions & 0 deletions common/migrations/0063_merge_20200127_1819.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Generated by Django 2.2.9 on 2020-01-27 18:19

from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
('common', '0062_auto_20191023_1738'),
('common', '0061_auto_20190909_2046'),
]

operations = [
]
Loading

0 comments on commit a5a51fb

Please sign in to comment.