Skip to content

Commit

Permalink
Staging (#561)
Browse files Browse the repository at this point in the history
* updated django to 3.0

* replaced deprecated render_to_response with render

* removed deprecated staticfiles tempalte tag. static tempalte tag replaces functionality

* updated disaggregation query to fix invalid SQL exception

* added warning filtering to only get deprecation warnings for django 3.1

* Updated named programs list for create qa programs command.

* Added order_by to annotated MetricsIndicator querysets

* Add order_by() to annotated Organization queryset

* Added order_by to annotated Country querysets

* Upgraded Django to 3.1

* Upgrade Django to 3.2

* Add DEFAULT_AUTO_FIELD to settings and change French date format on iptt_excel_ export test

* Increase default gunicorn timeout (#547)

* Set Gunicorn default timeout to 60 to accommodate large bulk indicator upload

* Correct typo

* Correct typo

* Revert "Increase default gunicorn timeout (#547)" (#548)

This reverts commit 831c456.

* removed warning filters

* For mercycorps/TolaActivity#2737, updated the double counting text and wrapped text.

* For mercycorps/TolaActivity#2737, updated disaggregation headers and updated translations.

* Added csv endpoint for participant count fiscal year results

* Revert "Added csv endpoint for participant count fiscal year results"

* For mercycorps/TolaActivity#2663, update for disabling fields for view only state of PC Results Form..

* Revert "Revert "Added csv endpoint for participant count fiscal year results""

* Disabled save button on results framework while processing a request

* Delete duplicate pc indicator (#559) (#560)

Co-authored-by: Blake Long <blakemlong1@gmail.com>
Co-authored-by: Andre Thomas <anthomas@mercycorps.org>
Co-authored-by: André <57330117+andrethomas6@users.noreply.github.com>
Co-authored-by: blakelong <33732265+blakelong@users.noreply.github.com>
  • Loading branch information
5 people authored Apr 11, 2022
1 parent 6279b3c commit ec8a95b
Show file tree
Hide file tree
Showing 29 changed files with 1,145 additions and 543 deletions.
120 changes: 93 additions & 27 deletions dev-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,35 +1,101 @@
#
# This file is autogenerated by pip-compile
# This file is autogenerated by pip-compile with python 3.8
# To update, run:
#
# pip-compile dev-requirements.in
#
autopep8==1.5.4 # via django-silk
certifi==2020.12.5 # via -c requirements.txt, requests
chardet==4.0.0 # via -c requirements.txt, requests
click==8.0.3 # via -c requirements.txt, pip-tools
django-debug-toolbar==3.1.1 # via -r dev-requirements.in
django-extensions==3.1.0 # via -r dev-requirements.in
django-silk==4.1.0 # via -r dev-requirements.in
django==2.2.21 # via -c requirements.txt, django-debug-toolbar, django-silk
gprof2dot==2019.11.30 # via django-silk
idna==2.10 # via -c requirements.txt, requests
jinja2==2.11.2 # via django-silk
markupsafe==1.1.1 # via jinja2
pep517==0.12.0 # via -c requirements.txt, pip-tools
pip-tools==6.4.0 # via -c requirements.txt, -r dev-requirements.in
polib==1.1.1 # via -c requirements.txt, -r dev-requirements.in
pycodestyle==2.6.0 # via autopep8
pygments==2.7.2 # via django-silk
python-dateutil==2.8.1 # via -c requirements.txt, django-silk
pytz==2021.1 # via -c requirements.txt, django, django-silk
requests==2.25.1 # via -c requirements.txt, django-silk
six==1.15.0 # via -c requirements.txt, python-dateutil
sqlparse==0.4.1 # via -c requirements.txt, django, django-debug-toolbar, django-silk
toml==0.10.2 # via autopep8
tomli==1.2.2 # via -c requirements.txt, pep517
urllib3==1.26.4 # via -c requirements.txt, requests
wheel==0.37.0 # via -c requirements.txt, pip-tools
asgiref==3.5.0
# via
# -c requirements.txt
# django
autopep8==1.5.4
# via django-silk
certifi==2020.12.5
# via
# -c requirements.txt
# requests
chardet==4.0.0
# via
# -c requirements.txt
# requests
click==8.0.3
# via
# -c requirements.txt
# pip-tools
django==3.2.12
# via
# -c requirements.txt
# django-debug-toolbar
# django-silk
django-debug-toolbar==3.1.1
# via -r dev-requirements.in
django-extensions==3.1.0
# via -r dev-requirements.in
django-silk==4.1.0
# via -r dev-requirements.in
gprof2dot==2019.11.30
# via django-silk
idna==2.10
# via
# -c requirements.txt
# requests
jinja2==2.11.2
# via django-silk
markupsafe==1.1.1
# via jinja2
pep517==0.12.0
# via
# -c requirements.txt
# pip-tools
pip-tools==6.4.0
# via
# -c requirements.txt
# -r dev-requirements.in
polib==1.1.1
# via
# -c requirements.txt
# -r dev-requirements.in
pycodestyle==2.6.0
# via autopep8
pygments==2.7.2
# via django-silk
python-dateutil==2.8.1
# via
# -c requirements.txt
# django-silk
pytz==2021.1
# via
# -c requirements.txt
# django
# django-silk
requests==2.25.1
# via
# -c requirements.txt
# django-silk
six==1.15.0
# via
# -c requirements.txt
# python-dateutil
sqlparse==0.4.1
# via
# -c requirements.txt
# django
# django-debug-toolbar
# django-silk
toml==0.10.2
# via autopep8
tomli==1.2.2
# via
# -c requirements.txt
# pep517
urllib3==1.26.4
# via
# -c requirements.txt
# requests
wheel==0.37.0
# via
# -c requirements.txt
# pip-tools

# The following packages are considered to be unsafe in a requirements file:
# pip
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,7 @@ def handle(self, *args, **options):
return

if options['delete_pilot_pc_indicators']:
pcind_id_list = [12385, 12053, 12051, 12052, 12050, 12054, 12069, 12068, 12065, 12072, 12063, 12064, 12066,
12071, 12070, 12060, 12057, 12056, 12059, 12058, 12061, 12055, 12062]
pcind_id_list = [15872]
# Call indicators on an object to object basis to force cascading delete.
deleted_ind = 0
for pcid in pcind_id_list:
Expand Down
4 changes: 3 additions & 1 deletion indicators/management/commands/create_qa_programs.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,10 @@ def handle(self, *args, **options):

named_testers = {
'Alex': 'atran@mercycorps.org',
'André': 'anthomas@mercycorps.org',
'Andre': 'anthomas@mercycorps.org',
'Blake': 'blong@mercycorps.org',
'Carly': 'colenick@mercycorps.org',
'Karen': 'kbarkemeyer@mercycorps.org',
'Margaux': 'mtroiano@mercycorps.org',
'Marie': 'mbakke@mercycorps.org',
'Marco': 'mscagliusi@mercycorps.org',
Expand Down
2 changes: 1 addition & 1 deletion indicators/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,7 @@ def get_queryset(self):
qs = super().get_queryset().order_by('disaggregation_type').annotate(
_in_use=models.Exists(
Indicator.rf_aware_objects.filter(
disaggregation__in=models.OuterRef('pk')
disaggregation=models.OuterRef('pk')
)
)
).prefetch_related(
Expand Down
4 changes: 4 additions & 0 deletions indicators/queries/indicators_queries.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ def with_annotations(self, *annotations):
qs = qs.annotate(over_under=utils.indicator_over_under_annotation())
if 'table' in annotations:
qs = qs.select_related('level')

# As of Django 3.1 annotated querysets will not be ordered by the model.meta.ordering
qs = qs.order_by('create_date')

return qs


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@

DATE_FORMATS = {
ENGLISH: lambda d: d.strftime('%b %-d, %Y'),
FRENCH: lambda d: d.strftime('%-d %b. %Y').lower() if d.month not in [5, 6, 7, 8] else (
FRENCH: lambda d: d.strftime('%-d %b. %Y').lower() if d.month not in [3, 5, 6, 7, 8] else (
d.strftime('%-d juil. %Y') if d.month == 7 else d.strftime('%-d %B %Y').lower()),
SPANISH: lambda d: d.strftime('%-d %b. %Y').title() if d.month not in [5, 9] else (
d.strftime('%-d Sept. %Y') if d.month == 9 else d.strftime('%-d %B %Y').title()),
Expand Down
1 change: 1 addition & 0 deletions indicators/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@
'indicator_detail_active_export_csv/',
views.indicator_detail_export_csv,
name='indicator_detail_active_export_csv'),
path('participant_count_fiscal_export', views.views_indicators.ParticipantCountFiscalExport.as_view(), name='participant_count_fiscal_export'),

path('pinned_report/delete/', views.delete_pinned_report, name='delete_pinned_report'),

Expand Down
Loading

0 comments on commit ec8a95b

Please sign in to comment.