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
class A(object): | |
# Dictionary | |
extra_content = None | |
def get_context_data(self, **kwargs): | |
kwargs.update(extra_content) | |
return kwargs | |
class B(A): |
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
" Git rebase helper for: | |
" git rebase --interactive | |
" | |
" L - view commit log | |
" p - pick | |
" e - edit | |
" s - squash | |
" r - reword | |
" D - delete | |
" |
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
{ | |
"product": { | |
"_type": {"store": "yes"}, | |
"_source": {"compress": true}, | |
"index_analyzer": "standard", | |
"search_analyzer": "standard", | |
"dynamic_date_formats": ["date_time_no_millis", "date_optional_time"], | |
"properties": { | |
"_id": {"type": "string", "index": "not_analyzed"}, | |
"key": {"type": "string"}, |
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
fields = [ | |
"_id", "key", "content.name", "content.brand", "content.season", | |
"content.description", "content.status", "content.category" | |
] | |
typeFilter = TermFilter("type", "product") | |
deleteFilter = TermFilter("deleted", False) | |
f = ANDFilter([typeFilter, deleteFilter]) | |
query = FilteredQuery(MatchAllQuery(), f) | |
search = Search(query, start=paging['skip'], size=paging['take'], | |
fields=fields) |
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
def main(): | |
""" | |
THis is an exmaple | |
""" | |
print 'Hello %s' % "123" |
NewerOlder