-
Notifications
You must be signed in to change notification settings - Fork 28
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
feat: hookup feature models to django admin #413
Conversation
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.
could you upload a screenshot of what the webform looks like or something? very curious if it is actually usable OOTB or if we have to do some custom webform work to allow users to input things like "github/codecov" and have that translate to the database id for codecov's github org
@@ -16,7 +16,6 @@ | |||
"django_http_requests_unknown_latency_including_middlewares_total", | |||
"django_http_requests_latency_seconds_by_view_method", | |||
"django_http_requests_unknown_latency_total", | |||
"django_http_ajax_requests_total", |
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.
this metric isn't actually important for us (and makes django-autocomplete-light
error)
views.RepositoryAutoCompleteSearch.as_view(), | ||
name="admin-repository-autocomplete", | ||
), | ||
path( |
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.
these endpoints will be exposed on the API but I think its fine cause of this
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.
thanks for calling this out!
codecov/views.py
Outdated
class RepositoryAutoCompleteSearch(autocomplete.Select2QuerySetView): | ||
def get_queryset(self): | ||
# must be authenticated to query | ||
if not self.request.user.is_authenticated: |
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.
i think if you do self.request.user.is_staff
instead of is_authenticated
it's just users who can access the admin interface
views.RepositoryAutoCompleteSearch.as_view(), | ||
name="admin-repository-autocomplete", | ||
), | ||
path( |
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.
thanks for calling this out!
codecov/views.py
Outdated
class OwnerAutoCompleteSearch(autocomplete.Select2QuerySetView): | ||
def get_queryset(self): | ||
# must be authenticated to query | ||
if not self.request.user.is_authenticated: |
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.
same is_staff
comment as above
b464182
to
02a1dd8
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #413 +/- ##
==========================================
- Coverage 96.09% 95.94% -0.15%
==========================================
Files 640 641 +1
Lines 16867 16938 +71
==========================================
+ Hits 16208 16252 +44
- Misses 659 686 +27
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Codecov ReportAttention:
@@ Coverage Diff @@
## main #413 +/- ##
==========================================
- Coverage 96.09% 95.94% -0.15%
==========================================
Files 640 641 +1
Lines 16867 16938 +71
==========================================
+ Hits 16208 16252 +44
- Misses 659 686 +27
Flags with carried forward coverage won't be shown. Click here to find out more.
|
6818b0a
to
74dab69
Compare
Codecov ReportAttention: Patch coverage is
📢 Thoughts on this report? Let us know! |
Purpose/Motivation
Screen.Recording.2024-02-26.at.2.30.56.PM.mov
Adds the new feature models from here to django admin so that we can assign feature variants to features dynamically