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
| http://ibdeveloper.blogspot.com/2008/09/what-page-size-i-should-use-in-my.html |
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
| from datetime import datetime | |
| from sqlalchemy import Column, Integer, DateTime, ForeignKey | |
| from sqlalchemy.orm import relationship | |
| from sqlalchemy.ext.declarative import declared_attr | |
| from flask_security import current_user | |
| class AuditMixin(object): | |
| created_at = Column(DateTime, default=datetime.now) | |
| updated_at = Column(DateTime, default=datetime.now, onupdate=datetime.now) |
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 ArticleCardsListItemDefinition extends window.wagtailStreamField.blocks.StructBlockDefinition { | |
| render(placeholder, prefix, initialState, initialError) { | |
| const block = super.render(placeholder, prefix, initialState, initialError); | |
| const categoryField = document.getElementById(prefix + '-category'); | |
| const pageField = document.getElementById(prefix + '-page'); | |
| const observer = new MutationObserver((mutationList, observer) => { |
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
| import logging | |
| import time | |
| from django.conf import settings | |
| from django.db import connection | |
| THRESHOLD = getattr(settings, 'SLOW_REQUEST_THRESHOLD', 1.0) | |
| LOG_SQL = getattr(settings, 'SLOW_REQUEST_LOG_SQL', False) | |
| LOG = logging.getLogger(__name__) |
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
| LOGGING = { | |
| 'version': 1, | |
| 'disable_existing_loggers': False, | |
| 'formatters': { | |
| 'default': { | |
| 'format': "[%(asctime)s] %(levelname)s [%(name)s:%(lineno)s] %(message)s", | |
| 'datefmt': "%d/%b/%Y %H:%M:%S", | |
| }, | |
| 'sql': { | |
| 'format': "[%(asctime)s] %(levelname)s [%(module)s:%(lineno)s] %(message)s", |
OlderNewer