Commit Graph

7132 Commits

Author SHA1 Message Date
Adrian Holovaty 3f003a3c4b Fixed #17323 -- Renamed HttpRequest.raw_post_data to request.body. Thanks for the patch, dstufft
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17210 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-16 23:40:32 +00:00
Adrian Holovaty 61f0aff811 Fixed #14597 -- Added a SECURE_PROXY_SSL_HEADER setting for cases when you're behind a proxy that 'swallows' the fact that a request is HTTPS
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17209 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-16 22:06:06 +00:00
Adrian Holovaty 4d32e6abc2 Removed incorrect comment in core/handlers/modpython.py. If it were true, the modpython handler wouldn't be working, because the handler's module imports from django.http, which includes a settings import
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17208 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-16 20:37:12 +00:00
Adrian Holovaty 082cfce185 Negligible typo fix in a comment in handlers/wsgi.py
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17207 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-16 20:21:16 +00:00
Julien Phalip a1d2f1f7b7 Ensured that thread-shareability gets validated when closing a PostgreSQL or SQLite connection. Refs #17258.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17206 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-16 17:02:41 +00:00
Julien Phalip 34e248efec Fixed #17258 -- Moved `threading.local` from `DatabaseWrapper` to the `django.db.connections` dictionary. This allows connections to be explicitly shared between multiple threads and is particularly useful for enabling the sharing of in-memory SQLite connections. Many thanks to Anssi Kääriäinen for the excellent suggestions and feedback, and to Alex Gaynor for the reviews. Refs #2879.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17205 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-16 13:40:19 +00:00
Jannis Leidel 5df31c0164 Fixed #17194 -- Made sure the auth form tests work if a language other than English is activated by moving the error message translation strings into class level dictionaries. Many thanks to Claude Paroz, rabio and Bas Peschier for their initial work on this.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17204 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-15 16:12:46 +00:00
Luke Plant 655b29b5ba Fixed #16563 - Error pickling request.user
Thanks to zero.fuxor for the report

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17202 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-15 02:33:14 +00:00
Luke Plant a935d436e9 Fixed #15863 - SimpleCookies are not correctly serialized with the file or database cache backends
Thanks to rakuco for the report and for the tests.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17200 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-11 21:04:56 +00:00
Aymeric Augustin 694bc0f22b Fixed #16397 -- Respected the --traceback flag in BaseCommand. This should make import loops easier to debug. Refs #11667, #17369.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17197 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-11 10:03:09 +00:00
Aymeric Augustin affca1369c Fixed #16632 -- Crash on responses without Content-Type with IE. Thanks juan for the report and kenth for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17196 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-11 08:58:14 +00:00
Aymeric Augustin 219b41cc15 Fixed #17266 -- Skipped the "SET TIME ZONE" query for PostgreSQL when it isn't necessary.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17194 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-11 08:19:04 +00:00
Ramiro Morales f2e99ecfda Made makemessages leave `'%%'` sequences untouched when extracting translatable literals from blocktrans template tags.
This makes it consistent with behavior introduced when fixing #11240 in
processing of literal passed to the trans tag to avoid double escaping
(i.e. `'%%%%'` sequences in resulting PO files.)

Also, cleaned up tests changes from r17190 (removed commented out code and
implemented compatibility with Python 2.5.)

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17192 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-11 00:48:26 +00:00
Ramiro Morales ff7556c4ec Fixed #11240 -- Made makemessages i18n command escape % symbols in literals passed to the trans tag.
This avoids problems with unintended automatic detection, marking and
validation of Python string formatting specifiers performed by
xgettext(1)/msgfmt(1) that stem from the fact that under the hood makemessages
converts templates to Python code before passing them to xgettext.

This also makes it consistent with its behavior on literals passed to the
blocktrans tag.

Thanks Jannis and claude for reviewing and feedback.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17190 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-11 00:07:06 +00:00
Adrian Holovaty 073d987a84 Fixed #16818 -- Fixed ORM bug with many-to-many add() method where it wasn't committing the change. Thanks, pressureman and kmtracey
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17189 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-09 23:16:56 +00:00
Aymeric Augustin 19cbdf8c8f Fixed #17348 -- Implemented {% elif %}. Refs #3100.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17187 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-09 22:13:27 +00:00
Aymeric Augustin 959f78b3c6 Fixed #3100 -- Added support for arguments on intermediate tag tokens.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17186 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-09 22:10:52 +00:00
Adrian Holovaty 718a5ba1a1 Fixed #16845 -- Admin 'Change user' page no longer shows the password hash. Thanks, dstufft
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17185 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-09 22:10:03 +00:00
Adrian Holovaty 1a8b40c9fa Checking in latest results of running Google Closure Compiler on the admin JS. Looks like they changed the compiler output for 'false'
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17182 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-09 21:43:24 +00:00
Adrian Holovaty cfb7e477d3 Fixed #17218 -- Fixed bug with SelectFilter where the 'to' box had a height=0 when it was within a collapsed fieldset. Thanks jimallman
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17181 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-09 21:41:20 +00:00
Adrian Holovaty 5c1c1a1254 Changed admin/js/collapse.js to take advantage of jQuery chaining in three places. Should make for a slight performance boost.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17180 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-09 21:30:53 +00:00
Adrian Holovaty ce247476af Removed way-outdated comment in SelectFilter2.js admin JS file. And we should rename this to SelectFilter.js at some point
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17179 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-09 21:09:59 +00:00
Adrian Holovaty 08bec4fbc1 Changed BoundField.subwidgets() to return SubWidget objects instead of rendered strings. This means we can access individual radio buttons' properties in the template (see new docs)
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17175 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-07 23:08:27 +00:00
Adrian Holovaty fc90c09efd Made BoundFields iterable, so that you can iterate over individual radio buttons of a RadioSelect in a template
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17173 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-07 22:31:39 +00:00
Aymeric Augustin 2693aa890e Simplified time zone support in the Oracle backend. Avoided outputtypehandler which doesn't exist in cx_Oracle < 4.4.1.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17171 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-07 08:43:30 +00:00
Adrian Holovaty 5f9dbef4bb Fixed #17335 -- Added supports_select_related hook for django-nonrel. Thanks, jonash
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17170 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-05 23:11:43 +00:00
Aymeric Augustin 33bb3cd47c Fixed #17343 -- Changed the {% now %} tag to use the current time zone when time zone support is enabled. Thanks oinopion for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17169 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-04 22:11:12 +00:00
Ramiro Morales 5e2f5d1466 Fixed a couple of typos.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17166 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-03 17:34:52 +00:00
Ramiro Morales f51205d0ed Updated uses of i18n.blocktrans template tag to use the new more compact syntax introduced in 1.3.
Ref r14922.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17165 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-01 22:57:01 +00:00
Aymeric Augustin be8938f0d8 Fixed #17275 -- Moved some imports back from module level to class level to prevent the test suite from raising warnings.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17164 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-01 20:21:00 +00:00
Luke Plant f2ebb169f9 Small code clarification in prefetch_related code using better variable names
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17162 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-29 12:50:10 +00:00
Aymeric Augustin 7872fc0dab Fixed #16247 -- Removed wildcard expansion of application names in INSTALLED_APPS.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17158 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-27 20:13:37 +00:00
Aymeric Augustin 33a52cde08 Fixed #16040 -- Preserved scheme, host and port in the test client when following a redirect.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17157 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-27 20:04:13 +00:00
Aymeric Augustin c11f9c3193 Optimized the cached_db session backend to check if a key exists in the cache first.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17156 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-27 18:36:03 +00:00
Aymeric Augustin bda21e2b9d Fixed #11555 -- Made SessionBase.session_key read-only. Cleaned up code slightly. Refs #13478.
This also removes the implicit initialization of the session key on the first access in favor of explicit initialization.



git-svn-id: http://code.djangoproject.com/svn/django/trunk@17155 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-27 17:52:24 +00:00
Alex Gaynor e4919f64b0 Clean up the the locmem cache backend and utils.synch by using context managers. Puch prettier.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17152 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-27 04:28:31 +00:00
Carl Meyer 1086a9a845 Fixed #17287 -- Prevented LocMemCache.incr/decr from changing key expiry time. Thanks Ivan Virabyan for report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17151 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-26 22:27:16 +00:00
Aymeric Augustin 866c229f52 Fixed #17294 -- Supported nullable DateTimeFields when time zone support is enabled. Thanks pressureman for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17148 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-25 09:25:43 +00:00
Julien Phalip a89b156284 Disentangled some parts of the admin ChangeList and ListFilter's internals. With this refactoring, the query string lookups are now processed once instead of twice and some bugs (in particular the SimpleListFilter parameter name being mistaken for a model field in some cases) are avoided.
Refs #17091.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17145 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-22 12:26:17 +00:00
Alex Gaynor e71f33625c Fixed the humanize tests to work properly with a pure-python datetime module (platforms such as PyPy)
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17144 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-22 09:20:58 +00:00
Julien Phalip 8ddecc39db Fixed #17252 -- Fixed a minor regression introduced by the work in #11868, where the default sorted columns wouldn't correctly be visually represented in the changelist table headers if those columns referred to non model fields. Thanks to sebastian for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17143 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-22 09:14:09 +00:00
Aymeric Augustin 658abb0859 Removed redundant definition of urls in the auth tests.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17142 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-22 07:44:26 +00:00
Paul McMillan 02a1b9a93e Improved the test for #16847.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17141 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-22 01:10:00 +00:00
Paul McMillan 16e3636a1a Fixed Python 2.5 test failure introduced in r17135.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17137 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-21 22:50:35 +00:00
Paul McMillan 0506facd86 Fixed #16378. Locmem now uses pickle.HIGHEST_PROTOCOL for better compatibility with other hash backends. Thanks aaugustin for the initial patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17136 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-21 22:25:49 +00:00
Paul McMillan 4d975b4f88 Fixed #16847. Session Cookies now default to httponly = True.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17135 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-21 22:03:03 +00:00
Aymeric Augustin 43c5d35315 Fixed #17274 -- Accepted TIME_ZONE = None when USE_TZ = True. Thanks pressureman for the report.
This problem only occured when pytz is installed. It's still strongly recommended to define the correct time zone in TIME_ZONE in order to use pytz' implementation and not the approximation based on system time.



git-svn-id: http://code.djangoproject.com/svn/django/trunk@17134 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-21 12:42:09 +00:00
Aymeric Augustin c5a899b190 Fixed #16787 -- Restored the ability to {% load %} template tags libraries within packages. Thanks Ivan Sagalaev for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17133 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-21 10:28:12 +00:00
Aymeric Augustin 19e54084dc Fixed #17114 -- Handled integer values 0 and 1 for checkboxes like other integer values, not like False and True.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17132 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-21 10:11:06 +00:00
Aymeric Augustin 74b836abf5 Fixed #17062 -- Ensured that the effect of SET TIME ZONE isn't lost when the first transation is rolled back under PostgreSQL. Thanks Anssi for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17128 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-20 16:12:33 +00:00
Aymeric Augustin 98b08bd4d4 Upgraded the date based generic views to avoid warnings when time zone support is enabled.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17127 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-20 15:34:08 +00:00
Julien Phalip 5c9901323e Fixed #12073 -- Made `AdminDateWidget` and `AdminTimeWidget` consider user-supplied `attrs`. Thanks to elliss for the report and to koenb for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17125 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-20 11:12:37 +00:00
Aymeric Augustin 119e188717 Upgraded manage.py cleanup to be compatible with time zone support. See also r17121.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17124 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-20 11:04:37 +00:00
Aymeric Augustin 1510c3efda Upgraded django.contrib.comments to be compatible with time zone support.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17123 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-20 10:58:20 +00:00
Aymeric Augustin 03cfad4198 Upgraded django.contrib.auth to be compatible with time zone support.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17122 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-20 10:50:18 +00:00
Aymeric Augustin 4ac594f8a5 Upgraded django.contrib.sessions to be compatible with time zone support.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17121 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-20 10:33:44 +00:00
Aymeric Augustin 7075e93256 Made the database cache backend, which bypasses the ORM, compatible with time zone support.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17119 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-20 10:17:12 +00:00
Aymeric Augustin 9c30d48b45 Fixed #17263 -- Added a warning when a naive datetime reaches the database layer while time zone support is enabled.
After this commit, timezones.AdminTests will raise warnings because the sessions contrib app hasn't been upgraded to support time zones yet.
This will be fixed in an upcoming commit.



git-svn-id: http://code.djangoproject.com/svn/django/trunk@17117 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-19 23:27:20 +00:00
Aymeric Augustin d0eb4693ab Fixed #15255 -- Ensured createcachetable honors database routers.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17114 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-19 19:56:31 +00:00
Aymeric Augustin 549c495875 Used symbolic constants for psycopg2 isolation levels.
Django used the value 1 = ISOLATION_LEVEL_READ_UNCOMMITTED in some places, but
PostgreSQL doesn't provide "read uncommited", it uses "read committed" instead:
http://www.postgresql.org/docs/9.1/static/transaction-iso.html. For clarity,
this commit uses ISOLATION_LEVEL_READ_COMMITTED = 2 where 1 was previously used.



git-svn-id: http://code.djangoproject.com/svn/django/trunk@17112 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-19 14:18:44 +00:00
Aymeric Augustin 40b9532668 Fixed #16753 -- Supported network-path references in the syndication framework. Thanks cato for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17108 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-18 22:54:24 +00:00
Jannis Leidel 6f66b55108 Fixed #17255 -- Removed "as" prefix from new timezone template filter names for the sake of clarity. Cheers to Aymeric Augustin for bearing with me.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17107 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-18 15:00:08 +00:00
Aymeric Augustin 9b1cb755a2 Added support for time zones. Thanks Luke Plant for the review. Fixed #2626.
For more information on this project, see this thread:
http://groups.google.com/group/django-developers/browse_thread/thread/cf0423bbb85b1bbf



git-svn-id: http://code.djangoproject.com/svn/django/trunk@17106 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-18 13:01:06 +00:00
Jannis Leidel 773d91ead2 Fixed #17128 -- Fixed a Python 2.5 incompatibility. Thanks, Simon Meers.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17102 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-17 21:30:07 +00:00
Jannis Leidel c20d33201c Fixed #17223 -- Correctly reference the signed cookies session backend. Thanks, Bryan Veloso.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17101 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-17 21:16:42 +00:00
Ramiro Morales 907015cb40 Fixed #17234 -- Added back a missing endblock tag to an admindoc template. Thanks shibz for the report and fix.
Refs #16912.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17098 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-16 10:30:19 +00:00
Julien Phalip a6ccc8cc06 Fixed #15912 -- Ensured that `forms.CharField.widget_attrs()` always returns a dictionary. Thanks to tsabi and rubyruy for the report and to mmcnickle and prestontimmons for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17096 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-15 09:36:08 +00:00
Karen Tracey 5de31cb8cb Refs #17215: Avoid generating 47 leftover tmp dirs during a clean test run.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17094 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-13 19:05:02 +00:00
Karen Tracey b8353016b7 Fixed #13640: Avoid generating an exception when a model has an attribute named 'evaluate'. Thanks LukaszKorzybski and tobias.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17093 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-13 15:09:08 +00:00
Karen Tracey 0db571b417 Fixed #17134: Corrected Python 2.5 fallback code for parsing microseconds in time values. Thanks aaugustin and jcd.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17092 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-13 00:43:02 +00:00
Julien Phalip b45099eefb Fixed #17190 -- Ensured that the `NullBooleanSelect` widget's options get lazily localized. Thanks to pennersr for the report and to kenth for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17091 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-12 23:07:51 +00:00
Karen Tracey efe4e2e517 Fix #16570: Restore ability to have decimal fields where max_digits equals decimal_places. Thanks dcwatson and kenth.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17089 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-12 19:53:56 +00:00
Karen Tracey 63ba472cc4 Fix #13864: Removed database error raised when force_update is requsted on save of an inherited model with no fields of its own. Thanks fva, gregmuellegger, and markb1.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17088 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-12 19:06:39 +00:00
Karen Tracey f4f61baa8c Fix #16813: Restore checking whether a backend supports inctive users before sending inactive users in for permission checking. Thanks apollo13 for the report and poirier for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17084 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-12 17:23:07 +00:00
Julien Phalip c3df840c20 Fixed #16903 -- Added `--no-location` option to the `makemessages` command to not write '#: filename:line' comment lines in language files. Thanks to alpar for the suggestion and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17081 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-11 13:07:14 +00:00
Ramiro Morales e92b3b723f Fixed #11118 -- Made management command BaseCommand restore locale after execution.
Thanks rvdrijst for the report and initial patch and Claude Paroz for enhancing it.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17077 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-07 11:28:31 +00:00
Julien Phalip 90d3697417 Fixed #17125 -- Made it possible to change a `RegexField`'s regular expression validator after it has been initialized. Thanks to Claude Paroz for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17076 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-07 07:41:24 +00:00
Julien Phalip 5f64af9ecb Fixed #17152 -- Fixed a few anomalies in the `contrib.formtools` documentation and templates. Thanks, Bradley Ayers.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17072 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-06 01:19:40 +00:00
Julien Phalip b2948d8179 Fixed #17165 -- Fixed `SelectDateWidget._has_changed()` to work correctly with a localized date format.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17071 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-06 00:31:06 +00:00
Jannis Leidel a82488bf4b Fixed #16966 -- Stopped CachedStaticFilesStorage from choking on querystrings and path fragments.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17068 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-03 10:51:02 +00:00
Jannis Leidel 0e2c543979 Fixed #16967 -- Made sure CachedStaticFilesStorage repopulates its cache if there was a miss (for example if the cache server went down).
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17067 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-02 17:45:32 +00:00
Luke Plant 6d39cb4119 Fixed #5704 - Admin popup windows won't close when using application/xhtml as default content type
Thanks to Rob van der Linde for the report, and to mb0, dArignac and claudep
for the patch.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17065 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-01 21:50:17 +00:00
Aymeric Augustin d71b4309ca Used yaml.safe_load instead of yaml.load, because safety should be the default.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17062 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-01 20:07:42 +00:00
Aymeric Augustin af1893c4ff Made the cache locale-dependant when USE_L10N is True, even if USE_I18N is False. Refs #5691.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17061 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-01 14:02:31 +00:00
Aymeric Augustin 01964fd7e4 Fixed an obsolete comment.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17060 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-31 18:54:24 +00:00
Aymeric Augustin d17bc72880 Fixed #17135 -- Made it possible to use decorators (like stringfilter) on template filter functions in combination with auto-escaping. Refs #16726.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17056 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-30 07:32:21 +00:00
Ramiro Morales bebbc9e4a5 Made a couple of changes for readability and correctness in loaddata.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17055 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-29 22:32:28 +00:00
Aymeric Augustin 0a1a9b71fa Made the defaultfilters tests run on the actual filters, not on functions imported from django.utils.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17054 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-29 15:28:44 +00:00
Ramiro Morales eedc9cb5f6 Fixed #16849 -- Updated management command verbosity option help text.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17053 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-29 15:01:17 +00:00
Aymeric Augustin 52c66a21e1 Used the decorator syntax consistently to register template filters.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17052 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-29 14:51:43 +00:00
Ramiro Morales 345be05622 Enhanced loaddata error message printed when no DB fixture is provided.
Fixes #7043 by fixing the last code path where a misleading 'No fixtures found.' error message was being shown.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17051 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-29 14:47:45 +00:00
Aymeric Augustin 69eadc7f15 Used the decorator syntax consistently for stringfilter. Fixed linebreaks that was decorated twice.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17050 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-29 14:39:02 +00:00
Ramiro Morales 24f3c06e4a More django.conf.urls.defaults removals. Refs #17132
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17049 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-29 12:24:44 +00:00
Alex Gaynor 3e66913f96 Fixed #17132 -- remove a leftover reference to django.conf.default.urls in Django. THanks to claudep for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17048 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-28 21:23:50 +00:00
Carl Meyer 7a718f0f3a Fixed #17127 -- Made field validators list independent per form instance. Thanks claudep for report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17046 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-28 14:38:41 +00:00
Aymeric Augustin 0cf139d201 Fixed several problems that hid one another in the cache tests and code.
1 - Used django.test.TestCase instead of unittest.TestCase so that the override_settings decorator works.
2 - Reverted parts of r17039 that caused failures (masked until 1).
3 - Isolated tests by clearing the cache in tear down (masked until 1). Refs #11505.
4 - Fixed a bug in cache key generation (revealed by 3).
5 - Fixed a test that relied on this bug -- hardcoding the generated cache keys in tests isn't a very good idea anyway.
6 - Uniformized some parts of the cache tests.



git-svn-id: http://code.djangoproject.com/svn/django/trunk@17042 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-26 22:47:04 +00:00
Aymeric Augustin 4cfb7632e0 Removed remains from times when tests could be run outside of runtests.py.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17040 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-26 21:03:18 +00:00
Carl Meyer 5a16b64ed2 Avoid spurious failures in naturaltime tests.
Previous fix didn't cover timesince module, which naturaltime delegates to
under certain conditions. Extended mock of datetime to timesince module, and
switched to a fixed datetime rather than now() for testing, for more
reproducible tests (failures in mock will fail fast, rather than sporadically).

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17038 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-26 15:17:43 +00:00
Julien Phalip 9796f69533 Fixed #16257 -- Added new `ModelAdmin.get_list_display_links()` method to allow for the dynamic display of links on the admin changelist. Thanks to graveyboat for the suggestion and initial patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17037 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-26 12:19:18 +00:00
Julien Phalip 600c576ac5 Fixed #17090 -- Made the API specification for `ModelAdmin.get_list_display()` more consistent with that of `ModelAdmin.list_display` by separating out the admin action check boxes business. This is backwards-incompatible for those who have been using the still-unreleased `get_list_display()` method. Thanks to Ramiro Morales for the review.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17035 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-26 09:37:07 +00:00
Julien Phalip 4d79083453 Fixed #17111 -- Made the `redirect_to` generic view properly handle query strings with percent symbols. Thanks, Chris Adams.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17034 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-26 06:33:13 +00:00
Julien Phalip 2e2689c7c0 Fixed #15938 -- Prevented the `max_length` number in the admin `prepopulated_fields` javascript to be localized when `USE_THOUSAND_SEPARATOR` is turned on. Thanks to Lev Maximov, Mathieu Agopian and feel.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17033 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-26 05:33:17 +00:00
Julien Phalip c1a014bba4 Made some `contrib.messages` tests use `override_settings` for clarity. Thanks to Claude Paroz for the patch. Refs #16507, #16574.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17032 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-25 02:55:25 +00:00
Carl Meyer 6df91d9539 Fixed #17086 -- Removed pollution of global template-builtins from markup and humanize tests.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17031 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-24 21:30:55 +00:00
Carl Meyer d89be53d95 Fixed #17099 -- Removed an out-of-date warning and some unused code, now that startapp doesn't require creating app inside project. Thanks ptone for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17030 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-24 20:50:39 +00:00
Aymeric Augustin 965c5d7cce Fixed #14202 -- made the atom:link element optional in feeds.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17029 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-23 15:19:09 +00:00
Julien Phalip 59c051d170 Fixed #13760 -- Cleaned up unnecessary default option handling in a bunch of management commands. Thanks to Paul McMillan for the report and to adamv and Claude Paroz for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17028 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-23 03:43:43 +00:00
Julien Phalip adf51b0cb8 Fixed #16574 -- Strengthened the `contrib.messages` tests' isolation to avoid failures under certain project setting environments. Thanks to Boldewyn for the report and to Claude Paroz for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17027 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-22 23:39:09 +00:00
Julien Phalip 4f00a2d316 Fixed #15826 -- Made `assertContains` and `assertNotContains` work with `SimpleTemplateResponse` by forcing it to be rendered if it hasn't been rendered yet. Thanks to bmihelac for the report, to mmcnickle for the initial patch and tests, and to Carl Meyer for the guidance.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17025 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-22 09:15:50 +00:00
Carl Meyer 36a44ae75f Mocked datetime in the naturaltime tests to avoid sporadic test failure.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17023 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-22 06:06:44 +00:00
Carl Meyer 145a77edc9 Fixed #16360 -- Added WSGI entrypoint to startproject layout, and enabled internal servers (runserver and runfcgi) to use an externally-defined WSGI application. Thanks to Armin Ronacher, Jannis Leidel, Alex Gaynor, ptone, and Jacob Kaplan-Moss.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17022 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-22 04:30:10 +00:00
Julien Phalip dca81ad58a Fixed #17064 -- Improved the UX for the admin's time and date picker widgets by brushing up the 'Cancel' button's visual feedback and by allowing the popups to get closed by pressing the 'Escape' key.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17021 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-22 03:38:10 +00:00
Alex Gaynor 9117a4af30 move an mport out of a function
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17020 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-21 23:38:52 +00:00
Justin Bronn 01f4ce4c49 Fixed #17059 -- Encode `GeoIP` query strings properly so `libGeoIP` returns results for unicode strings.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17019 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-20 20:08:33 +00:00
Ramiro Morales b3b9049942 Fixed #17071 -- Made sure we report the right version of system-level {simple,}json module.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17018 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-20 17:21:10 +00:00
Julien Phalip 1452cecd15 Fixed 16938 -- Ensured that the active locale's formats take precedence over the default settings even if they would be interpreted as False in a conditional test (e.g. 0 or empty string). Thanks to pikerr for the report and initial patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17017 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-20 12:14:06 +00:00
Julien Phalip 51b8f0a240 Removed a small useless piece of code from `contrib.auth`.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17016 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-20 04:23:34 +00:00
Julien Phalip 26698bc851 Fixed #14806 -- Added support for contextual translations to the `trans` and `blocktrans` template tags. Thanks to jtiai for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17015 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-19 04:59:47 +00:00
Alex Gaynor 358e5a8031 Fixed #16393 -- FormWizard's cookie storage backend now works with all versions of simplejson and the standard library json module.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17014 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-19 00:09:41 +00:00
Paul McMillan 67565a5379 Remove comments referencing encryption. Django doesn't do encryption.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17012 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-18 20:28:52 +00:00
Aymeric Augustin 14d24eb438 Fixed #17067 -- reverted some backwards-incompatible changes from r16933 and added tests.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17010 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-18 16:42:32 +00:00
Alex Gaynor 396fcaaef9 Remove all relative imports. We have always been at war with relative imports.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17009 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-18 00:47:49 +00:00
Alex Gaynor 66210cbc70 Remove a great many of the remaining relative imports.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17008 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-17 18:45:22 +00:00
Alex Gaynor 544a8372fd Remove several more relative imports.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17007 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-17 16:56:18 +00:00
Alex Gaynor 1856e398c5 Remove more relative imports (I will kill them all).
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17006 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-17 16:39:53 +00:00
Alex Gaynor 87ffc6a6c2 remove some relative imports from django
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17003 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-17 13:15:40 +00:00
Carl Meyer 62afd58c87 Fixed #17057 -- Corrected flatpage url uniqueness validation to account for flatpage editing.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17000 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-17 00:56:32 +00:00
Ramiro Morales 5f2be4ecbb Fixed #17056 -- Tweaked insert SQL clause generation so a corner case doesn't fail with Oracle.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16997 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-16 20:06:59 +00:00
Aymeric Augustin d75337fc7b Fixed a test that was broken at r16978. Refs #17055.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16993 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-16 09:46:01 +00:00
Julien Phalip 93a581431a Fixed #15221 -- Made the admin filters on foreign key and m2m relationships display the related field's verbose name instead of that of the related model.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16991 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-16 06:42:50 +00:00
Aymeric Augustin 246580573d Fixed #12308 -- Added tablespace support to the PostgreSQL backend.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16987 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-14 21:49:43 +00:00
Alex Gaynor 6c91521902 Remove the usage of deprecated function in Django. Also simplify the fallback code.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16985 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-14 00:20:50 +00:00
Aymeric Augustin f830166167 Fixed #16899 -- Backported the fix for http://bugs.python.org/issue9063 and added a test.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16980 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-13 21:19:48 +00:00
Aymeric Augustin 38999f7e00 Fixed #16923 -- Removed unused method in the serialization code.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16979 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-13 19:39:46 +00:00
Aymeric Augustin 06d9b82a27 Fixed #16906 -- Format datetimes with str/unicode instead of strftime where possible: it's faster and it works for all dates.
Also ensured that datetime_safe is used wherever strftime is called on dates/datetimes that may be before 1900.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@16978 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-13 19:23:45 +00:00
Julien Phalip 99512d3544 Fixed #16918 -- Ensured that custom querysets are used when provided to `BaseDateDetailView.get_object()`. Thanks to mitar for the report, to koenb for the patch and to Preston Holmes for the review.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16974 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-13 13:38:38 +00:00
Julien Phalip c58e5724bc Fixed a couple of `assert` syntax warnings mistakingly introduced in r16966 and added some tests to prevent future regressions. Thanks to Anssi Kääriäinen for the report.
Refs #12467.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16971 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-13 11:53:59 +00:00
Julien Phalip 1f1b16722e Fixed a padding issue in admin tabular inline headers.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16968 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-13 10:09:17 +00:00
Julien Phalip 4da7c772ad Fixed #16776 -- Fixed a regression introduced in r16415 which caused Django's embedded jQuery to overwrite any pre-existing values of `window.jQuery` in the global namespace. Many thanks to Rob Hudson, Jannis Leidel and "anonymous" for the help resolving this issue.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16967 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-13 09:20:10 +00:00
Julien Phalip 3b22c68343 Fixed #12467 -- Made the model data validation for `DateField` and `DateTimeField` more useful by actually telling what was the value that failed. Also did a bit of PEP8 cleanup in the area. Thanks to knutin for the report, to raulcd for the initial patch and to charettes for the review.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16966 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-13 08:11:00 +00:00
Carl Meyer 38f1fe3b35 Fixed #15372 -- Switched to a startproject default layout that allows us to avoid sys.path hacks.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16964 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-13 05:56:15 +00:00
Alex Gaynor f04af7080b Introduce `ContentType.objects.get_for_models(*models)` and use it in the the auth permissions code. This is a solid performance gain on the test suite. Thanks to ptone for the profiling to find this hotspot, and carl for the review.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16963 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-12 20:51:59 +00:00
Alex Gaynor a5e691e5de Convert the contettypes tests to use self.assertNumQueries, rather than hand rolling their own version. Thanks to carl for the review.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16962 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-12 19:34:34 +00:00
Alex Gaynor 3e940cdfd9 Simplify some code to have one loop, rather than two.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16959 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-11 20:43:11 +00:00
Alex Gaynor e35ba97740 Change some string literals to be unicode, because:
* It's the most micro of optimizations (forget I even said it)
    * It makes significantly more sense semantically, given these are functions which return unicode.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16957 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-11 17:36:05 +00:00
Ramiro Morales 4725a732e7 Fixed #9460 -- Added template blocks for submit buttons rows in admin app model add/change views.
This allows for easier customization. Thanks kosmik for report and patch.

Refs #13875.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16956 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-10 22:19:59 +00:00
Julien Phalip 17659adf93 Fixed #16371 -- Added a prefix "field-" to all CSS class names automatically generated from field names in admin forms to avoid conflicts with other common class names (e.g. "button"). This is backwards-incompatible for those who previously used plain field names as selector in custom style sheets or javascript transformations.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16953 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-10 12:35:06 +00:00
Julien Phalip 6d7461ffdd Fixed #17019 -- Fixed a minor margin issue in multi-field admin form rows for right-to-left languages. Thanks to rem for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16947 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-09 11:37:48 +00:00
Carl Meyer 29def3e52c Fixed #16873 - Added dummy database backend in default settings, so that just importing django.db doesn't trigger ImproperlyConfigured if there is no DATABASES setting.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16946 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-08 19:23:37 +00:00
Luke Plant d5803bb5fb More efficient IN clauses for prefetch_related queries by use of sets to eliminate duplicates
This simply reduces the size of the IN clause in the SQL, which can be
significant in some cases.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16944 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-08 13:50:29 +00:00