Skip to content
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

Add searchable feature for plugins on plublic repo #448

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

kibablu
Copy link

@kibablu kibablu commented Oct 15, 2022

Add a searchable feature for plugins on public repo #439 which closes the earlier pr @jennydaman

Comment on lines 1 to 2
from cgitb import lookup
from dataclasses import field
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What are these two imports for?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Must have been picked by the VsCode extension ... I do not think they add on what I was trying to do. I have disabled the extension

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove these lines. I recommend you review your git diff before making commits.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, I have made chnages

@@ -240,11 +242,19 @@ def search_name_title_category(self, queryset, name, value):
lookup = lookup | models.Q(meta__category__icontains=value)
return queryset.filter(lookup)


def search_name_public_rep(self, queryset, name, value):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the purpose of this function definition?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trying to return any value that contains public_repo when you search

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is being called?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My understanding is from pluginMeta table

Copy link
Member

@jbernal0019 jbernal0019 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

public_repo = django_filters.CharFilter(field_name='meta__type', lookup_expr='icontains')

should be changed to

public_repo = django_filters.CharFilter(field_name='meta__public_repo, lookup_expr='icontains')

@kibablu
Copy link
Author

kibablu commented Dec 8, 2022

public_repo = django_filters.CharFilter(field_name='meta__type', lookup_expr='icontains')

should be changed to

public_repo = django_filters.CharFilter(field_name='meta__public_repo, lookup_expr='icontains')

@jbernal0019 Thank you, I have made changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants