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
top_bar.js | |
events | |
{ | |
'clicl login' : open_login | |
} | |
open_login : function(){ | |
this.child_views.login_regi_bare_modal = login_regi_bare_modal(); | |
} |
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
/views/landing.js | |
initialize_ui : { | |
//add populer_bike as child view | |
this.child_views.popular_item = Popular_item({parent_view : this}) | |
} |
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
{ | |
"esnext": true, | |
"disallowSpacesInNamedFunctionExpression": { | |
"beforeOpeningRoundBrace": true | |
}, | |
"disallowSpacesInFunctionExpression": { | |
"beforeOpeningRoundBrace": true | |
}, | |
"disallowSpacesInAnonymousFunctionExpression": { | |
"beforeOpeningRoundBrace": true |
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
here take the filters model and apply filter accordingly |
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
in fav item collection | |
override add and remove backbone collection method. | |
How to overide? You can see its example in label.js and extend.js | |
add : (){ | |
step 1: call the backbone add | |
step 2: if user is logged in call user model method sycn_shortlist | |
} |
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
make filter panel with filter_model value |
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
Go with sqlite. Its simple and easy to start with. | |
Host server on https://www.heroku.com/ . Its good |
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
Its a post call on search | |
Some pointers : | |
Search api has nothing to with user logged in. User shortlisted bike should be diffrent api. | |
if decoded_query has not attr assume enum = all | |
I think we should build up raw postgress query depending upon enum , query , and filters and page_no | |
Part 1 : assume things if not present in POST vaiables | |
Part 2 : Build Query | |
Part 3 : Apply sort method on querydict | |
part 4 : Apply page no on query set |
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
<a href="#search/q=grabadeal"> | |
you can replace a tag with button for exampel | |
<button class='grab-deal'> |
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
# Create your views here. | |
def search(request , query): | |
''' | |
Product search algo | |
query = { | |
enum : '', @not_required @assume | |
search_string: '', @not_required but if !enum && !query assume enum all @assume | |
brands: list of dict, @not_required | |
mfg_year: dict with min max value @not_required |