Open
Conversation
aaxelb
requested changes
Aug 11, 2017
api/serializers.py
Outdated
| from share.models import ProviderRegistration, SiteBanner, CeleryTaskResult, HarvestLog, SourceConfig | ||
|
|
||
|
|
||
| from share.models import ProviderRegistration, SiteBanner, CeleryTaskResult, logs |
Contributor
There was a problem hiding this comment.
Remove all the from share.models imports, just use from share import models (and update existing things to match)
api/urls.py
Outdated
| register_route(r'user', views.ShareUserViewSet) | ||
| register_route(r'sources', views.SourceViewSet) | ||
| register_route(r'HarvestLog', views.HarvestLogViewSet) | ||
| register_route(r'SourceConfig', views.SourceConfigViewSet) |
Contributor
There was a problem hiding this comment.
these routes should be snake case and plural (harvest_logs, source_configs)
api/views/__init__.py
Outdated
| from .schema import * # noqa | ||
| from .banner import * # noqa | ||
| from .harvestlogs import * # noqa | ||
| from .sourceConfig import * # noqa |
Contributor
There was a problem hiding this comment.
rename these files:
harvestlogs.py => harvest_logs.py
sourceConfig.py => source_config.py
api/views/harvestlogs.py
Outdated
| from share.util import IDObfuscator | ||
|
|
||
| from api.serializers import HarvestLogSerializer | ||
| from share.models import HarvestLog |
Contributor
There was a problem hiding this comment.
import ordering from most broadly available to most specific:
- built-ins
- 3rd-party imports
- 2nd-party imports
- 1st-party imports
api/views/harvestlogs.py
Outdated
| from share.models import HarvestLog | ||
|
|
||
| class SourceConfigFilterBackend(MultipleChoiceFilter): | ||
| def filter_queryset(self, request, queryset, view, conjoined=True): |
api/views/share.py
Outdated
|
|
||
| # Override get_queryset to handle items marked as deleted. | ||
| def get_queryset(self, list=True): | ||
| # import ipdb; ipdb.set_trace() |
api/views/share.py
Outdated
|
|
||
| # Override to convert encoded pk to an actual pk | ||
| def get_object(self): | ||
| import ipdb; ipdb.set_trace() |
api/views/workflow.py
Outdated
| from api.permissions import ReadOnlyOrTokenHasScopeOrIsAuthenticated | ||
| from api.serializers import FullNormalizedDataSerializer, BasicNormalizedDataSerializer, \ | ||
| RawDatumSerializer, ShareUserSerializer, SourceSerializer | ||
| from api.serializers import FullNormalizedDataSerializer, BasicNormalizedDataSerializer,RawDatumSerializer, ShareUserSerializer, SourceSerializer |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.