-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/country page #1972
Feature/country page #1972
Conversation
72f8af6
to
89b9b99
Compare
641c3af
to
ca20ec3
Compare
b7bba5d
to
b791084
Compare
e5ceacc
to
c926bf7
Compare
c294883
to
6e68821
Compare
1aaf5ed
to
916eaf4
Compare
4d6bac5
to
aabeaac
Compare
5d74d8e
to
78f2a20
Compare
queryset = CountryKeyDocument.objects.select_related('country') | ||
serializer_class = CountryKeyDocumentSerializer | ||
search_fields = ("name",) | ||
# permission_classes = (IsAuthenticated,) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you check this?
|
||
class GDACSEventViewSet(viewsets.ReadOnlyModelViewSet): | ||
serializer_class = GDACSEventSerializer | ||
filterset_class = GDACSEventFileterSet |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's add a queryset = ..
as well for api document support.
|
||
class CountrySupportingPartnerViewSet(viewsets.ModelViewSet): | ||
serializer_class = CountrySupportingPartnerSerializer | ||
filterset_class = CountrySupportingPartnerFilter |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's add a queryset = ..
as well for api document support.
fields = () | ||
|
||
def filter_countries(self, queryset, name, country): | ||
if len(country): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's check for None as well.
api/admin.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's make sure all M2M and foreign keys have autocomplete enabled
#'middlewares.cache.UpdateCacheForUserMiddleware', | ||
'django.middleware.common.CommonMiddleware', | ||
'middlewares.cache.FetchFromCacheForUserMiddleware', | ||
#'middlewares.cache.FetchFromCacheForUserMiddleware', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this intentional?
if page >= rs[0]['pages']: | ||
break | ||
page += 1 | ||
print(data) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
print(data) |
while True: | ||
for country_name in Country.objects.values_list('iso3', flat=True): | ||
for indicator in WORLD_BANK_INDICATORS: | ||
print(indicator) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
print(indicator) |
'per_page': 5000 - 1, # WD throws error on 5000 | ||
'page': page, | ||
}) | ||
rs.raise_for_status() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should check the status instead of raise?
|
||
WORLD_BANK_INDICATORS = [indicator for indicator, _ in WORLD_BANK_INDICATOR_MAP] | ||
|
||
WORLD_BANK_API = "" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not used
2e8b22b
to
3ece1e3
Compare
Addresses
supported by organization type
andSupported by NS
#1997per
export type in the server and generate the PER Country page preparedness tab PDF export #1998Make sure also we have loaded local-units in staging.
Commands to run
databank
Env variable required
Per
python manage.py loaddata question_group_description
Checklist
Things that should succeed before merging.
Release
If there is a version update, make sure to tag the repository with the latest version.