Skip to content

Instantly share code, notes, and snippets.

View claudep's full-sized avatar

Claude Paroz claudep

View GitHub Profile
@claudep
claudep / gist:c234e546eab00ff9fdbf
Last active August 29, 2015 14:09
Register as_<vendor>
diff --git a/django/contrib/gis/db/backends/postgis/operations.py b/django/contrib/gis/db/backends/postgis/operations.py
index 690194f..2a7e1f6 100644
--- a/django/contrib/gis/db/backends/postgis/operations.py
+++ b/django/contrib/gis/db/backends/postgis/operations.py
@@ -4,6 +4,7 @@ from django.conf import settings
from django.contrib.gis.db.backends.base import BaseSpatialOperations
from django.contrib.gis.db.backends.postgis.adapter import PostGISAdapter
from django.contrib.gis.db.backends.utils import SpatialOperator
+from django.contrib.gis.db.models.sql import aggregates # .sql should disappear with 14030
from django.contrib.gis.geometry.backend import Geometry
hooks.po-directories:
=====================
beagle: beagle/po
gimp: po po-tips po-script-fu po-libgimp po-python po-plug-ins po-tags
gnumeric: po po-functions
gtk+: po po-properties
libgweather: po po-locations
glom: po examples/po_files/example_film_manager examples/po_files/example_lesson_planner examples/po_files/example_music_collection examples/po_files/example_project_manager examples/po_files/example_smallbusiness
gnome-web-www: translations/dynamic translations/static
def test_connection_import_doesnt_configure_settings(self):
"""
Test that importing django.db doesn't trigger settings configuration.
"""
from django.conf import settings
from django.utils.functional import empty
old_wrapped = settings._wrapped
settings._wrapped = empty
try:
self.assertFalse(settings.configured)
/etc/ssh/sshd_config:
file.replace:
- pattern: Subsystem sftp /usr/lib/openssh/sftp-server
- repl: |
Subsystem sftp internal-sftp
Match Group sftponly
ChrootDirectory /home/sftpusers/%u
X11Forwarding no
AllowTcpForwarding no
ForceCommand internal-sftp
diff --git a/docs/templatetags/docs.py b/docs/templatetags/docs.py
index f43d998..3029f4c 100644
--- a/docs/templatetags/docs.py
+++ b/docs/templatetags/docs.py
@@ -38,8 +38,6 @@ class AllDocVersionsTag(template.Node):
def __init__(self, docurl, asvar):
self.docurl = template.Variable(docurl)
self.asvar = asvar
- # FIXME
- self.lang = 'en'
diff --git a/docs/fixtures/doc_releases.json b/docs/fixtures/doc_releases.json
index 56b5394..aa93fe8 100644
--- a/docs/fixtures/doc_releases.json
+++ b/docs/fixtures/doc_releases.json
@@ -82,5 +82,17 @@
"version": "1.5",
"docs_subdir": "docs"
}
+ },
+ {
diff --git a/django/utils/html.py b/django/utils/html.py
index 5732350..ebf97f8 100644
--- a/django/utils/html.py
+++ b/django/utils/html.py
@@ -137,12 +137,7 @@ def strip_tags(value):
"""Returns the given HTML with all tags stripped."""
s = MLStripper()
s.feed(value)
- data = s.get_data()
- try:
diff --git a/django/db/models/fields/__init__.py b/django/db/models/fields/__init__.py
index f8ec205..f9f913b 100644
--- a/django/db/models/fields/__init__.py
+++ b/django/db/models/fields/__init__.py
@@ -57,6 +57,7 @@ class Field(object):
# Designates whether empty strings fundamentally are allowed at the
# database level.
empty_strings_allowed = True
+ empty_values = list(validators.EMPTY_VALUES)
diff --git a/docs/ref/contrib/admin/index.txt b/docs/ref/contrib/admin/index.txt
index cbf7d42..1a35bcc 100644
--- a/docs/ref/contrib/admin/index.txt
+++ b/docs/ref/contrib/admin/index.txt
@@ -1420,7 +1420,7 @@ jQuery
Django admin Javascript makes use of the `jQuery`_ library.
To avoid conflicts with user-supplied scripts or libraries, Django's jQuery
-(version 1.4.2) is namespaced as ``django.jQuery``. If you want to use jQuery
+(version 1.9.1) is namespaced as ``django.jQuery``. If you want to use jQuery
diff --git a/django/core/management/commands/makemessages.py b/django/core/management/commands/makemessages.py
--- a/django/core/management/commands/makemessages.py
+++ b/django/core/management/commands/makemessages.py
@@ -112,75 +112,56 @@
break
return msgs
-def write_pot_file(potfile, msgs, file, work_file, is_templatized):
- """
- Write the :param potfile: POT file with the :param msgs: contents,