Serialisation function
This commit is contained in:
parent
c58f42476f
commit
12c8c652d7
1 changed files with 9 additions and 0 deletions
|
@ -137,6 +137,15 @@ class BrowserFingerprint(models.Model):
|
|||
def __str__(self):
|
||||
return self.description
|
||||
|
||||
def serialize_headers(self):
|
||||
return {
|
||||
"Description" : str(self.description),
|
||||
"User-Agent" : str(self.useragent),
|
||||
"Accept-Encoding" : str(self.accept_encoding),
|
||||
"Accept" : str(self.accept_default),
|
||||
"Accept-Language" : str(self.accept_lang),
|
||||
}
|
||||
|
||||
|
||||
class SearchEngine(models.Model):
|
||||
''' A search engine, and all the data needed to use it '''
|
||||
|
|
Loading…
Reference in a new issue