Skip to content

Conversation

@Mihir-solanki-13
Copy link
Contributor

  1. Now search field (roll no /name) is not required in the year-book
  2. Change Get to Post method
  3. commented some useless codes and functions for deprecation

if len(request.POST) > 1:
if request.POST['search'] != '':
key = request.POST['search']
profiles = Profile.objects.filter(name__icontains=key) | Profile.objects.filter(
Copy link
Member

Choose a reason for hiding this comment

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

We don't have to call all data again, just apply the filter on profiles, that would be fine.

path('autosearch/', views.autoSearch, name='autosearch'),
path('mapsearch/', views.mapSearch, name='mapsearch'),
# path('autosearch/', views.autoSearch, name='autosearch'),
# path('mapsearch/', views.mapSearch, name='mapsearch'),
Copy link
Member

Choose a reason for hiding this comment

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

Nor this.

@tushhr tushhr merged commit 830e4be into BitByte-TPC:master Sep 13, 2022
tushhr added a commit that referenced this pull request Sep 14, 2022
* Search field changes

* Proper error and messages

* Incremental changes

Co-authored-by: Tushhr <tusharmaheshwaritm6@gmail.com>
tushhr pushed a commit that referenced this pull request Sep 14, 2022
* Search field changes

* Proper error and messages

* Incremental changes

Co-authored-by: Tushhr
tushhr pushed a commit that referenced this pull request Sep 14, 2022
* Search field changes

* Proper error and messages

* Incremental changes

Co-authored-by: Tushhr
tushhr pushed a commit that referenced this pull request Dec 16, 2022
…oll number (#101)

* Refactor yearbook  search feature (#100)

* Search field changes

* Proper error and messages

* Incremental changes

Co-authored-by: Tushhr

* fix server error 500 due to alphanumeric roll number

* sort by roll no. , increase roll no. limit, shorten query

* query update
tushhr pushed a commit that referenced this pull request Dec 22, 2022
…oll number (#101)

* Refactor yearbook  search feature (#100)

* Search field changes

* Proper error and messages

* Incremental changes

Co-authored-by: Tushhr

* fix server error 500 due to alphanumeric roll number

* sort by roll no. , increase roll no. limit, shorten query

* query update
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.

2 participants