Conversation
marktai
left a comment
There was a problem hiding this comment.
some nits.
also, does your editor remove trailing whitespace on the end of files? it's not a huge deal, but typical styleguides say that files have trailing newlines. It's actually a Linux standard and a lot of command line utilities dont deal with files correctly if you dont have a trailing newline
| from rest_framework.response import Response | ||
| from .models import Data | ||
|
|
||
| def logger(cls, data): |
There was a problem hiding this comment.
can you name this log so the function is a verb and not a noun?
| from .models import Data | ||
|
|
||
| def logger(cls, data): | ||
| new_data = Data(data_type=cls, log=data) |
There was a problem hiding this comment.
if the field name is data_type, can you name this variable to be data_type instead of cls
| log = JSONField() | ||
|
|
||
| def __str__(self): | ||
| return '%s: %s' % (self.data_type, self.log) No newline at end of file |
There was a problem hiding this comment.
you might want to include the time on the str
| USER_VERIFICATION_TEMPLATE = 'ddd14008-25ee-46c6-9a55-b6b4d577a54b' | ||
| MESSAGING_TEMPLATE = 'ea29ebe3-df27-4383-9234-0d01539980e3' | ||
| PASSWORD_RESET_TEMPLATE = '262bdea5-7921-47b1-946d-7438ee7f865b' | ||
| PASSWORD_RESET_TEMPLATE = '262bdea5-7921-47b1-946d-7438ee7f865b' No newline at end of file |
There was a problem hiding this comment.
should this change be in this pull request?
|
Did the changes, let me know if there is anything else that needs to be looked at. I'll look into the trailing newlines as well |
|
|
||
| def __str__(self): | ||
| return '%s: %s' % (self.data_type, self.log) No newline at end of file | ||
| return '%s: %s %s' % (self.data_type, self.log, datetime.now(pytz.timezone('US/Pacific'))) |
There was a problem hiding this comment.
Yeah I figured that out later.. Changed it
|
oh man this PR is alive again! |
Description
Added logging feature to track major search.
Pls do
Test plan