The expected output when rendering index.html is:
<!doctype html> <head> <title>example</title> </head> <body> <h2>before</h2> <h2><span>start</span> <span>the middle</span> <span>end</span></h2> <h2>after</h2>
<?php | |
/** | |
* Remove the phsyical files created for the intermediate image sizes but | |
* after they're created to ensure the metadata is generated and saved for | |
* the attachment. The PressThumb service dynamically creates these images | |
* outside of Wordpress, so we can save disk space by removing them. | |
* | |
* Note: will interfere with any thumbnail regeration attempts | |
*/ |
require 'facter' | |
Facter.add(:esxi_version) do | |
confine :virtual => :vmware | |
confine :kernel => :Linux | |
setcode do | |
dmi_path = Facter::Util::Resolution.exec('which dmidecode 2> /dev/null') | |
if dmi_path.nil? | |
'unknown:no_dmidecode' | |
else |
# Activate tab | |
# $ osascript set_tab.scpt 1, 2 | |
on run argv | |
set window_index to item 1 in argv | |
set target_index to item 2 in argv | |
tell application "Google Chrome" to set active tab index of first window to target_index | |
tell application "Google Chrome" to activate | |
end run |
all implementations ensure that: | |
non-empty querysets are always ordered. either by submitted value when bound, | |
the order field's initial value or the value of the first ordering choice | |
when filterset is strict and bound: | |
* the form is validated, so errors are available | |
* returns empty queryset when form is invalid | |
* returns fully filtered queryset otherwise |
The expected output when rendering index.html is:
<!doctype html> <head> <title>example</title> </head> <body> <h2>before</h2> <h2><span>start</span> <span>the middle</span> <span>end</span></h2> <h2>after</h2>
language: python | |
python: | |
- "2.6" | |
- "2.7" | |
- "3.2" | |
- "3.3" | |
env: | |
- DJANGO=https://github.com/django/django/archive/master.tar.gz |
import operator | |
from django.db import models | |
from django.contrib.auth.models import User | |
from myapp.models import License | |
or_list = [] | |
values = User.objects.values_list('id').annotate(models.Max('licenses__created_at')) | |
for pk, dt in values: |
from django.db import models | |
from django.contrib.auth.models import User | |
from django_filters import CharFilter, FilterSet | |
class ICharFilter(CharFilter): | |
def __init__(self, *args, **kwargs): | |
super(ICharFilter, self).__init__(*args, **kwargs) | |
self.lookup_type = 'icontains' |