🤔
- alyahmady.ir
- https://codewars.com/users/alyahmady
- in/alyahmady
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
| # apps/core/metadata.py | |
| from collections import OrderedDict | |
| from django.utils.encoding import force_str | |
| from rest_framework import serializers | |
| from rest_framework.metadata import SimpleMetadata | |
| from rest_framework.request import clone_request | |
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
| DOMAIN=http//:localhost | |
| # For production, use a real domain without scheme (http:// or https://) to be served with auto-renewal HTTPS/SSL | |
| # DOMAIN=example.com |
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
| # Credits to https://stackoverflow.com/a/68194120 | |
| import time | |
| from django.db import connection | |
| class QueryLogger: | |
| def __init__(self): | |
| self.queries = [] |