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
def update(self, **kwargs): | |
""" | |
Updates all elements in the current QuerySet, setting all the given | |
fields to the appropriate values. | |
""" | |
assert self.query.can_filter(), \ | |
"Cannot update a query once a slice has been taken." | |
meta = self.model._meta | |
self._for_write = True | |
query = self.query.clone(sql.UpdateQuery) |
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
""" | |
EXAMPLE 1: Get a report of online sales by month | |
------------------------------------------------ """ | |
from django.db.models import Sum, DatePart, MONTH, YEAR | |
from store.models import Order | |
def get_monthly_sales(): | |
# new class DatePart, subclass of ExpressionNode | |
# Add annotations for year and month, as well as an annotation |
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
#!/bin/sh | |
#--| OpenVPN |---------------------------------------------------- | |
USERNAME="$(nvram get vyprvpn_username)" | |
PASSWORD="$(nvram get vyprvpn_password)" | |
HOST="$(nvram get vyprvpn_host)" | |
PROTOCOL="udp" | |
#### Do not make modifications below this line #### |
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
# Maintainer: Thomas Dziedzic <gostrc@gmail.com> | |
# Contributor: Jan "heftig" Steffens <jan.steffens@gmail.com> | |
# Contributor: tobias [ tobias at archlinux org ] | |
# Contributor: Daniel J Griffiths <ghost1227@archlinux.us> | |
pkgbase=vim | |
pkgname=('gvim-pythonsix') | |
_topver=7.4 | |
_patchlevel=410 | |
__hgrev=4aa63564dd3f |
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
<link rel="import" href="../core-icon-button/core-icon-button.html"> | |
<link rel="import" href="../core-toolbar/core-toolbar.html"> | |
<link rel="import" href="../core-header-panel/core-header-panel.html"> | |
<link rel="import" href="../speech-mic/speech-mic.html"> | |
<polymer-element name="my-element"> | |
<template> | |
<style> | |
#core_header_panel { |
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
<link rel="import" href="../core-menu-button/core-menu-button.html"> | |
<link rel="import" href="../core-icons/core-icons.html"> | |
<link rel="import" href="../core-item/core-item.html"> | |
<polymer-element name="my-element"> | |
<template> | |
<style> | |
:host { | |
position: absolute; |
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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | |
<title>VanillaJS • TodoMVC</title> | |
<link rel="stylesheet" href="style/base.css"> | |
<!--[if IE]> | |
<script src="style/ie.js"></script> | |
<![endif]--> |
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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | |
<title>VanillaJS • TodoMVC</title> | |
<link rel="stylesheet" href="style/base.css"> | |
<!--[if IE]> | |
<script src="style/ie.js"></script> | |
<![endif]--> |
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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | |
<title>VanillaJS • TodoMVC</title> | |
<link rel="stylesheet" href="style/base.css"> | |
<!--[if IE]> | |
<script src="style/ie.js"></script> | |
<![endif]--> |
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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | |
<title>VanillaJS • TodoMVC</title> | |
<link rel="stylesheet" href="style/base.css"> | |
<!--[if IE]> | |
<script src="style/ie.js"></script> | |
<![endif]--> |
OlderNewer