- We call for the minified Vue.js library that’s hosted on our own server (for security reasons).
- Download the Development version: https://vuejs.org/js/vue.js and the production version: https://vuejs.org/js/vue.min.js
- Copy this files into the public/js folder
This file contains 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", |
This file contains 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 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 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 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 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
<VirtualHost localhost:YOUR_PORT> | |
ServerName localhost | |
Define WebDirPath WEB_ROOT_DIR_PATH | |
DocumentRoot ${WebDirPath} | |
Alias /YOUR_PROJECT_NAME ${WebDirPath} | |
<Directory ${WebDirPath}> | |
Options -Indexes |
This file contains 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
#nav-bar ul { | |
list-style-type: none; | |
} | |
#nav-bar { | |
padding-left: 0; | |
} | |
#nav-bar > ul { | |
padding-left: 20px; |
This file contains 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
CREATE TABLE `documents` ( | |
`id` INT NOT NULL AUTO_INCREMENT, | |
`id_category` INT NOT NULL, | |
-- `id_department` INT NOT NULL, | |
`title` VARCHAR(150) NOT NULL, | |
`comment` MEDIUMTEXT, | |
`filename` VARCHAR(150), | |
`ts` timestamp DEFAULT CURRENT_TIMESTAMP, | |
PRIMARY KEY (`id`), | |
FOREIGN KEY (`id_category`) REFERENCES categories(`id`) ON DELETE NO ACTION |
NewerOlder