Skip to content

Commit

Permalink
Merge pull request #1 from django/master
Browse files Browse the repository at this point in the history
sync fork of master branch against latest in django
  • Loading branch information
etos committed May 2, 2016
2 parents 80bcbec + f2b2a35 commit ff88dbb
Show file tree
Hide file tree
Showing 3,197 changed files with 66,356 additions and 41,163 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
2 changes: 1 addition & 1 deletion .eslintrc
Expand Up @@ -14,7 +14,7 @@
"no-octal-escape": [2],
"no-underscore-dangle": [2],
"no-unused-vars": [2, {"vars": "local", "args": "none"}],
"no-script-url": [1],
"no-script-url": [2],
"no-shadow": [2, {"hoist": "functions"}],
"quotes": [0, "single"],
"linebreak-style": [2, "unix"],
Expand Down
1 change: 1 addition & 0 deletions .gitattributes
@@ -1,6 +1,7 @@
# Normalize line endings to avoid spurious failures in the core test suite on Windows.
*html text eol=lf
*css text eol=lf
*js text eol=lf
tests/staticfiles_tests/apps/test/static/test/*txt text eol=lf
tests/staticfiles_tests/project/documents/test/*txt text eol=lf
docs/releases/*.txt merge=union
20 changes: 19 additions & 1 deletion AUTHORS
Expand Up @@ -19,6 +19,7 @@ answer newbie questions, and generally made Django that much better:
ajs <adi@sieker.info>
Akis Kesoglou <akiskesoglou@gmail.com>
Aksel Ethem <aksel.ethem@gmail.com>
Akshesh Doshi <aksheshdoshi+django@gmail.com>
alang@bright-green.com
Alasdair Nicol <http://al.sdair.co.uk/>
Albert Wang <aywang31@gmail.com>
Expand All @@ -32,6 +33,7 @@ answer newbie questions, and generally made Django that much better:
Alex Hill <alex@hill.net.au>
Alex Ogier <alex.ogier@gmail.com>
Alex Robbins <alexander.j.robbins@gmail.com>
Alexey Boriskin <alex@boriskin.me>
Aljosa Mohorovic <aljosa.mohorovic@gmail.com>
Amit Chakradeo <http://amit.chakradeo.net/>
Amit Ramon <amit.ramon@gmail.com>
Expand Down Expand Up @@ -73,6 +75,7 @@ answer newbie questions, and generally made Django that much better:
Arvis Bickovskis <viestards.lists@gmail.com>
Aryeh Leib Taurog <http://www.aryehleib.com/>
A S Alam <aalam@users.sf.net>
Asif Saif Uddin <auvipy@gmail.com>
atlithorn <atlithorn@gmail.com>
Audrey Roy <http://audreymroy.com/>
av0000@mail.ru
Expand Down Expand Up @@ -171,6 +174,7 @@ answer newbie questions, and generally made Django that much better:
Daniele Procida <daniele@vurt.org>
Daniel Greenfeld
dAniel hAhler
Daniel Jilg <daniel@breakthesystem.org>
Daniel Lindsley <daniel@toastdriven.com>
Daniel Poelzleithner <http://poelzi.org/>
Daniel Pyrathon <pirosb3@gmail.com>
Expand Down Expand Up @@ -243,7 +247,7 @@ answer newbie questions, and generally made Django that much better:
Francisco Albarran Cristobal <pahko.xd@gmail.com>
Frank Tegtmeyer <fte@fte.to>
Frank Wierzbicki
Frantisek Malina <vizualbod@vizualbod.com>
František Malina <fmalina@gmail.com>
Fraser Nevett <mail@nevett.org>
Gabriel Grant <g@briel.ca>
Gabriel Hurley <gabriel@strikeawe.com>
Expand Down Expand Up @@ -286,7 +290,9 @@ answer newbie questions, and generally made Django that much better:
Hiroki Kiyohara <hirokiky@gmail.com>
Honza Král <honza.kral@gmail.com>
Horst Gutmann <zerok@zerokspot.com>
Hugo Osvaldo Barrera <hugo@barrera.io>
Hyun Mi Ae
Iacopo Spalletti <i.spalletti@nephila.it>
Ian A Wilson <http://ianawilson.com>
Ian Clelland <clelland@gmail.com>
Ian G. Kelly <ian.g.kelly@gmail.com>
Expand All @@ -303,6 +309,7 @@ answer newbie questions, and generally made Django that much better:
Jaap Roes <jaap.roes@gmail.com>
Jacob Burch <jacobburch@gmail.com>
Jacob Kaplan-Moss <jacob@jacobian.org>
Jakub Paczkowski <jakub@paczkowski.eu>
Jakub Wilk <jwilk@jwilk.net>
Jakub Wiśniowski <restless.being@gmail.com>
james_027@yahoo.com
Expand Down Expand Up @@ -338,6 +345,7 @@ answer newbie questions, and generally made Django that much better:
Jérémie Blaser <blaserje@gmail.com>
Jeremy Carbaugh <jcarbaugh@gmail.com>
Jeremy Dunck <jdunck@gmail.com>
Jeremy Lainé <jeremy.laine@m4x.org>
Jesse Young <adunar@gmail.com>
jhenry <jhenry@theonion.com>
Jim Dalton <jim.dalton@gmail.com>
Expand Down Expand Up @@ -367,6 +375,7 @@ answer newbie questions, and generally made Django that much better:
Jordan Dimov <s3x3y1@gmail.com>
Jorge Bastida <me@jorgebastida.com>
Jorge Gajon <gajon@gajon.org>
José Tomás Tocino García <josetomas.tocino@gmail.com>
Joseph Kocherhans <joseph@jkocherhans.com>
Josh Smeaton <josh.smeaton@gmail.com>
Joshua Ginsberg <jag@flowtheory.net>
Expand Down Expand Up @@ -476,6 +485,7 @@ answer newbie questions, and generally made Django that much better:
Matt Deacalion Stevens <matt@dirtymonkey.co.uk>
Matt Dennenbaum
Matthew Flanagan <http://wadofstuff.blogspot.com>
Matthew Schinckel <matt@schinckel.net>
Matthew Somerville <matthew-django@dracos.co.uk>
Matthew Tretter <m@tthewwithanm.com>
Matthias Kestenholz <mk@406.ch>
Expand Down Expand Up @@ -565,6 +575,7 @@ answer newbie questions, and generally made Django that much better:
Paul Lanier <planier@google.com>
Paul McLanahan <paul@mclanahan.net>
Paul McMillan <Paul@McMillan.ws>
Paulo Poiati <paulogpoiati@gmail.com>
Paulo Scardine <paulo@scardine.com.br>
Paul Smith <blinkylights23@gmail.com>
pavithran s <pavithran.s@gmail.com>
Expand Down Expand Up @@ -633,19 +644,22 @@ answer newbie questions, and generally made Django that much better:
ryankanno
Ryan Kelly <ryan@rfk.id.au>
Ryan Niemeyer <https://profiles.google.com/ryan.niemeyer/about>
Ryno Mathee <rmathee@gmail.com>
Sam Newman <http://www.magpiebrain.com/>
Sander Dijkhuis <sander.dijkhuis@gmail.com>
Sarthak Mehrish <sarthakmeh03@gmail.com>
schwank@gmail.com
Scot Hacker <shacker@birdhouse.org>
Scott Barr <scott@divisionbyzero.com.au>
Scott Pashley <github@scottpashley.co.uk>
scott@staplefish.com
Sean Brant
Sebastian Hillig <sebastian.hillig@gmail.com>
Selwin Ong <selwin@ui.co.id>
Sengtha Chay <sengtha@e-khmer.com>
Senko Rašić <senko.rasic@dobarkod.hr>
serbaut@gmail.com
Sergey Fedoseev <fedoseev.sergey@gmail.com>
Sergey Kolosov <m17.admin@gmail.com>
Seth Hill <sethrh@gmail.com>
Shai Berger <shai@platonix.com>
Expand Down Expand Up @@ -700,6 +714,7 @@ answer newbie questions, and generally made Django that much better:
Tim Graham <timograham@gmail.com>
Tim Heap <tim@timheap.me>
Tim Saylor <tim.saylor@gmail.com>
Tobias Kunze <rixx@cutebit.de>
Tobias McNulty <http://www.caktusgroup.com/blog>
tobias@neuyork.de
Todd O'Bryan <toddobryan@mac.com>
Expand All @@ -711,6 +726,7 @@ answer newbie questions, and generally made Django that much better:
Tom Insam
Tommy Beadle <tbeadle@gmail.com>
Tom Tobin
Tore Lundqvist <tore.lundqvist@gmail.com>
torne-django@wolfpuppy.org.uk
Travis Cline <travis.cline@gmail.com>
Travis Pinney
Expand Down Expand Up @@ -749,10 +765,12 @@ answer newbie questions, and generally made Django that much better:
Wilson Miner <wminer@gmail.com>
wojtek
Xia Kai <http://blog.xiaket.org/>
Yann Fouillat <gagaro42@gmail.com>
Yann Malet
Yasushi Masuda <whosaysni@gmail.com>
ye7cakf02@sneakemail.com
ymasuda@ethercube.com
Yoong Kang Lim <yoongkang.lim@gmail.com>
Yusuke Miyazaki <miyazaki.dev@gmail.com>
Zachary Voase <zacharyvoase@gmail.com>
Zach Thompson <zthompson47@gmail.com>
Expand Down
5 changes: 3 additions & 2 deletions LICENSE.python
Expand Up @@ -74,8 +74,9 @@ analyze, test, perform and/or display publicly, prepare derivative works,
distribute, and otherwise use Python alone or in any derivative version,
provided, however, that PSF's License Agreement and PSF's notice of copyright,
i.e., "Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
2011, 2012, 2013, 2014, 2015 Python Software Foundation; All Rights Reserved"
are retained in Python alone or in any derivative version prepared by Licensee.
2011, 2012, 2013, 2014, 2015, 2016 Python Software Foundation; All Rights
Reserved" are retained in Python alone or in any derivative version prepared by
Licensee.

3. In the event Licensee prepares a derivative work that is based on
or incorporates Python or any part thereof, and wants to make
Expand Down
16 changes: 8 additions & 8 deletions MANIFEST.in
Expand Up @@ -6,12 +6,12 @@ include LICENSE.python
include MANIFEST.in
include package.json
include *.rst
recursive-include django *
graft django
prune django/contrib/admin/bin
recursive-include docs *
recursive-include extras *
recursive-include js_tests *
recursive-include scripts *
recursive-include tests *
recursive-exclude * __pycache__
recursive-exclude * *.py[co]
graft docs
graft extras
graft js_tests
graft scripts
graft tests
global-exclude __pycache__
global-exclude *.py[co]
2 changes: 1 addition & 1 deletion django/__init__.py
Expand Up @@ -15,7 +15,7 @@ def setup(set_prefix=True):
"""
from django.apps import apps
from django.conf import settings
from django.core.urlresolvers import set_script_prefix
from django.urls import set_script_prefix
from django.utils.encoding import force_text
from django.utils.log import configure_logging

Expand Down
5 changes: 1 addition & 4 deletions django/apps/config.py
Expand Up @@ -165,8 +165,7 @@ def get_model(self, model_name):
raise LookupError(
"App '%s' doesn't have a '%s' model." % (self.label, model_name))

def get_models(self, include_auto_created=False,
include_deferred=False, include_swapped=False):
def get_models(self, include_auto_created=False, include_swapped=False):
"""
Returns an iterable of models.
Expand All @@ -182,8 +181,6 @@ def get_models(self, include_auto_created=False,
"""
self.check_models_ready()
for model in self.models.values():
if model._deferred and not include_deferred:
continue
if model._meta.auto_created and not include_auto_created:
continue
if model._meta.swapped and not include_swapped:
Expand Down
12 changes: 6 additions & 6 deletions django/apps/registry.py
Expand Up @@ -156,8 +156,7 @@ def get_app_config(self, app_label):

# This method is performance-critical at least for Django's test suite.
@lru_cache.lru_cache(maxsize=None)
def get_models(self, include_auto_created=False,
include_deferred=False, include_swapped=False):
def get_models(self, include_auto_created=False, include_swapped=False):
"""
Returns a list of all installed models.
Expand All @@ -174,8 +173,7 @@ def get_models(self, include_auto_created=False,

result = []
for app_config in self.app_configs.values():
result.extend(list(app_config.get_models(
include_auto_created, include_deferred, include_swapped)))
result.extend(list(app_config.get_models(include_auto_created, include_swapped)))
return result

def get_model(self, app_label, model_name=None):
Expand Down Expand Up @@ -297,8 +295,10 @@ def set_available_apps(self, available):
available = set(available)
installed = set(app_config.name for app_config in self.get_app_configs())
if not available.issubset(installed):
raise ValueError("Available apps isn't a subset of installed "
"apps, extra apps: %s" % ", ".join(available - installed))
raise ValueError(
"Available apps isn't a subset of installed apps, extra apps: %s"
% ", ".join(available - installed)
)

self.stored_app_configs.append(self.app_configs)
self.app_configs = OrderedDict(
Expand Down
8 changes: 5 additions & 3 deletions django/conf/__init__.py
Expand Up @@ -108,8 +108,7 @@ def __init__(self, settings_module):

if (setting in tuple_settings and
not isinstance(setting_value, (list, tuple))):
raise ImproperlyConfigured("The %s setting must be a list or a tuple. "
"Please fix your settings." % setting)
raise ImproperlyConfigured("The %s setting must be a list or a tuple. " % setting)
setattr(self, setting, setting_value)
self._explicit_settings.add(setting)

Expand Down Expand Up @@ -169,7 +168,10 @@ def __delattr__(self, name):
super(UserSettingsHolder, self).__delattr__(name)

def __dir__(self):
return list(self.__dict__) + dir(self.default_settings)
return sorted(
s for s in list(self.__dict__) + dir(self.default_settings)
if s not in self._deleted
)

def is_overridden(self, setting):
deleted = (setting in self._deleted)
Expand Down
File renamed without changes.
File renamed without changes.
@@ -1,4 +1,4 @@
from django.apps import AppConfig
{{ unicode_literals }}from django.apps import AppConfig


class {{ camel_case_app_name }}Config(AppConfig):
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
26 changes: 15 additions & 11 deletions django/conf/global_settings.py
@@ -1,9 +1,15 @@
# Default Django settings. Override these with settings in the module
# pointed-to by the DJANGO_SETTINGS_MODULE environment variable.
# -*- coding: utf-8 -*-
"""
Default Django settings. Override these with settings in the module pointed to
by the DJANGO_SETTINGS_MODULE environment variable.
"""
from __future__ import unicode_literals


# This is defined here as a do-nothing function because we can't import
# django.utils.translation -- that module depends on the settings.
gettext_noop = lambda s: s
def gettext_noop(s):
return s

####################
# CORE #
Expand Down Expand Up @@ -68,6 +74,7 @@
('eo', gettext_noop('Esperanto')),
('es', gettext_noop('Spanish')),
('es-ar', gettext_noop('Argentinian Spanish')),
('es-co', gettext_noop('Colombian Spanish')),
('es-mx', gettext_noop('Mexican Spanish')),
('es-ni', gettext_noop('Nicaraguan Spanish')),
('es-ve', gettext_noop('Venezuelan Spanish')),
Expand All @@ -78,6 +85,7 @@
('fr', gettext_noop('French')),
('fy', gettext_noop('Frisian')),
('ga', gettext_noop('Irish')),
('gd', gettext_noop('Scottish Gaelic')),
('gl', gettext_noop('Galician')),
('he', gettext_noop('Hebrew')),
('hi', gettext_noop('Hindi')),
Expand All @@ -102,7 +110,7 @@
('mn', gettext_noop('Mongolian')),
('mr', gettext_noop('Marathi')),
('my', gettext_noop('Burmese')),
('nb', gettext_noop('Norwegian Bokmal')),
('nb', gettext_noop('Norwegian Bokmål')),
('ne', gettext_noop('Nepali')),
('nl', gettext_noop('Dutch')),
('nn', gettext_noop('Norwegian Nynorsk')),
Expand Down Expand Up @@ -479,10 +487,10 @@

LOGIN_URL = '/accounts/login/'

LOGOUT_URL = '/accounts/logout/'

LOGIN_REDIRECT_URL = '/accounts/profile/'

LOGOUT_REDIRECT_URL = None

# The number of days a password reset link is valid for
PASSWORD_RESET_TIMEOUT_DAYS = 3

Expand All @@ -492,13 +500,9 @@
PASSWORD_HASHERS = [
'django.contrib.auth.hashers.PBKDF2PasswordHasher',
'django.contrib.auth.hashers.PBKDF2SHA1PasswordHasher',
'django.contrib.auth.hashers.Argon2PasswordHasher',
'django.contrib.auth.hashers.BCryptSHA256PasswordHasher',
'django.contrib.auth.hashers.BCryptPasswordHasher',
'django.contrib.auth.hashers.SHA1PasswordHasher',
'django.contrib.auth.hashers.MD5PasswordHasher',
'django.contrib.auth.hashers.UnsaltedSHA1PasswordHasher',
'django.contrib.auth.hashers.UnsaltedMD5PasswordHasher',
'django.contrib.auth.hashers.CryptPasswordHasher',
]

AUTH_PASSWORD_VALIDATORS = []
Expand Down
14 changes: 13 additions & 1 deletion django/conf/locale/__init__.py
Expand Up @@ -137,6 +137,12 @@
'name': 'Argentinian Spanish',
'name_local': 'español de Argentina',
},
'es-co': {
'bidi': False,
'code': 'es-co',
'name': 'Colombian Spanish',
'name_local': 'español de Colombia',
},
'es-mx': {
'bidi': False,
'code': 'es-mx',
Expand Down Expand Up @@ -197,6 +203,12 @@
'name': 'Irish',
'name_local': 'Gaeilge',
},
'gd': {
'bidi': False,
'code': 'gd',
'name': 'Scottish Gaelic',
'name_local': 'Gàidhlig',
},
'gl': {
'bidi': False,
'code': 'gl',
Expand Down Expand Up @@ -417,7 +429,7 @@
'bidi': False,
'code': 'sk',
'name': 'Slovak',
'name_local': 'slovenský',
'name_local': 'Slovensky',
},
'sl': {
'bidi': False,
Expand Down
Binary file modified django/conf/locale/af/LC_MESSAGES/django.mo
Binary file not shown.

0 comments on commit ff88dbb

Please sign in to comment.