Commit Graph

922 Commits

Author SHA1 Message Date
Aymeric Augustin 00110904ac Refactored the migration signals to use app configs.
De-aliased pre/post_syncdb to pre/post_migrate to increase
backwards-compatibility.
2013-12-29 17:53:42 +01:00
Aymeric Augustin ba7206cd81 Changed get_model to raise an exception on errors.
Returning None on errors required unpythonic error checking and was
inconsistent with get_app_config.

get_model was a private API until the previous commit, but given that it
was certainly used in third party software, the change is explained in
the release notes.

Applied the same change to get_registered_model, which is a new private
API introduced during the recent refactoring.
2013-12-28 20:53:00 +01:00
Aymeric Augustin c81fae6b95 Used app_label instead of appname.
The last component of the dotted path to the application module is
consistently referenced as the application "label". For instance it's
AppConfig.label. appname could be confused with AppConfig.name, which is
the full dotted path.
2013-12-28 09:53:02 +01:00
Aymeric Augustin a7add2f296 Migrated built-in AppCommands to use handle_app_config. 2013-12-28 09:43:06 +01:00
Aymeric Augustin bb8ec71f61 Updated the AppCommand API to support apps without a models module. 2013-12-28 09:42:59 +01:00
Aymeric Augustin efddae252c Refactored dumpdata with app configs instead of models modules. 2013-12-27 21:25:35 +01:00
Aymeric Augustin ce1bc2c94b Made the AppConfig API marginally more consistent.
Eliminated the app_ prefix that was more confusing than useful.
2013-12-26 19:25:09 +01:00
Aymeric Augustin 1716b7ce5a Renamed AppCache to Apps.
Also renamed app_cache to apps and "app cache" to "app registry".

Deprecated AppCache.app_cache_ready() in favor of Apps.ready().
2013-12-24 12:25:17 +01:00
Aymeric Augustin 2fef9e5375 Moved apps back in the toplevel django namespace.
Reverted 4a56a93cc4.
2013-12-22 11:39:55 +01:00
Aymeric Augustin 65cd74be8e Stopped iterating on INSTALLED_APPS.
Used the app cache's get_app_configs() method instead.
2013-12-22 11:39:18 +01:00
Aymeric Augustin 4582993302 Populated models only when necessary in get_app_config[s].
Took this opportunity to change get_app[s] to only consider applications
containing a model module as that seems slightly more backwards compatible.

Since callers that care about models pass only_with_models_module=True,
this has very few consequences. Only AppCommand needed a change.
2013-12-22 11:39:18 +01:00
Aymeric Augustin 4a56a93cc4 Moved the new app cache inside core. 2013-12-17 10:17:46 +01:00
Aymeric Augustin 5ba743e262 Made it possible to create apps without a models module.
This commit reverts f44c4a5d0f and 39bbd165.

django.test.simple will be updated in a separate commit as it requires
invasive changes.
2013-12-17 10:17:45 +01:00
Aymeric Augustin 69039becde Deprecated get_app(). 2013-12-17 10:17:45 +01:00
Aymeric Augustin 2732edc5f2 Deprecated get_apps(). 2013-12-17 10:17:45 +01:00
Aymeric Augustin 259cd3cd41 Deprecated get_app_package, get_app_path and get_app_paths. 2013-12-17 10:17:45 +01:00
Aymeric Augustin 2c9e84af4a Removed unused attribute app_errors of the app cache.
get_app_errors() always returned an empty dictionary; this behavior is
preserved in django.db.models.loading until that module is deprecated.
2013-12-17 10:17:44 +01:00
Aymeric Augustin 8662654d6d Removed module-level functions for the app cache.
Since the original ones in django.db.models.loading were kept only for
backwards compatibility, there's no need to recreate them. However, many
internals of Django still relied on them.

They were also imported in django.db.models. They never appear in the
documentation, except a quick mention of get_models and get_app in the
1.2 release notes to document an edge case in GIS. I don't think that
makes them a public API.

This commit doesn't change the overall amount of global state but
clarifies that it's tied to the app_cache object instead of hiding it
behind half a dozen functions.
2013-12-17 10:17:44 +01:00
Aymeric Augustin 860c2c8bc5 Moved django.db.models.loading to django.apps.cache.
This commit doesn't contain any code changes; it's purely a refactoring.
2013-12-17 10:17:43 +01:00
Loic Bistuer 6685713869 Fixed E127 pep8 warnings. 2013-12-14 11:59:15 -05:00
Loic Bistuer a2814846ca Fixed E124 pep8 warnings. 2013-12-10 15:12:48 -05:00
Claude Paroz 41ebc4838d Fixed #21551 -- Reenabled loading fixtures from subdirectory
This was a regression in Django 1.6 that was only partially
restored in 839940f27f.
Thanks Jonas Haag for the report.
2013-12-07 10:47:34 +01:00
Andrew Godwin 4ca39684ee Fix poor variable name (flake8 warning) 2013-12-05 14:11:46 +00:00
Andrew Godwin 3b8e46cbc7 Migration VCS conflict detection and --merge for makemigrations 2013-12-04 16:01:49 +00:00
Andrew Godwin ab587fa51a Add --dry-run option to makemigrations 2013-12-04 13:55:20 +00:00
Andrew Godwin 1d20e6df95 Migrate prompts if you need makemigrations, runserver prompts for migrate 2013-12-04 13:34:01 +00:00
Ramiro Morales 12615dab78 Fixed #13476 -- Added support for color in console output under Windows.
Detect and use the services of the ANSICON third-party tool if it's
available.
2013-12-02 23:18:04 -03:00
Claude Paroz 2080bce695 Fixed #21358 -- Allowed runserver on non-English locales
Thanks svartalf for the report.
2013-11-30 19:17:36 +01:00
Claude Paroz 6310d658b7 Closed file after reading pot file
Faulty line was introduced in 50a8ab7cd1.
2013-11-30 11:31:17 +01:00
Claude Paroz 50a8ab7cd1 Enabled makemessages to support several translation directories
Thanks Rémy Hubscher, Ramiro Morales, Unai Zalakain and
Tim Graham for the reviews.
Also fixes #16084.
2013-11-30 11:00:23 +01:00
Simon Charette eb38257e51 Fixed #21391 -- Allow model signals to lazily reference their senders. 2013-11-24 17:51:22 -05:00
Ramiro Morales 62b393c5ae Fixed #21488 -- Multiple locales treatment in i18n commands.
Removed multiple locales separated by commas variation (that wasn't
working as documented) in favor of simply allowing use of the
``--locale``/``-l`` options more than once for ``makemessages`` and
``compilemessages``.

Thanks Romain Beylerian for the report and Claude, Simon for their help.

8750296918 from stable/1.6.x.
2013-11-23 11:53:47 -03:00
Curtis Maloney ffc37e2343 Fixed #21012 -- New API to access cache backends.
Thanks Curtis Malony and Florian Apolloner.

Squashed commit of the following:

commit 3380495e93
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Sat Nov 23 14:18:07 2013 +0100

    Looked up the template_fragments cache at runtime.

commit 905a74f52b
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Sat Nov 23 14:19:48 2013 +0100

    Removed all uses of create_cache.

    Refactored the cache tests significantly.

    Made it safe to override the CACHES setting.

commit 35e289fe92
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Sat Nov 23 12:23:57 2013 +0100

    Removed create_cache function.

commit 8e274f747a
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Sat Nov 23 12:04:52 2013 +0100

    Updated docs to describe a simplified cache backend API.

commit ee7eb0f73e
Author: Curtis Maloney <curtis@tinbrain.net>
Date:   Sat Oct 19 09:49:24 2013 +1100

    Fixed #21012 -- Thread-local caches, like databases.
2013-11-23 15:06:59 +01:00
Claude Paroz 97ac22ebfc Fixed #21457 -- Allowed fixture file name to contain dots
Thanks Keryn Knight for the report.
2013-11-18 20:32:13 +01:00
Claude Paroz 115fd140ab Configure settings sooner in makemessages
As get_text_list is using translations, setup settings before
calling it.
2013-11-15 15:30:22 +01:00
Claude Paroz dffcc5e979 Fixed #20990 -- Ensured unicode paths in compilemessages
Thanks Gregoire Astruc for the report and furins for the review.
2013-11-11 11:51:38 +01:00
Bouke Haarsma 9b7455e918 Fixed #21351 -- Replaced memoize with Python's lru_cache.
Replaced the custom, untested memoize with a similar decorator from Python's
3.2 stdlib. Although some minor performance degradation (see ticket), it is
expected that in the long run lru_cache will outperform memoize once it is
implemented in C.

Thanks to EvilDMP for the report and Baptiste Mispelon for the idea of
replacing memoize with lru_cache.
2013-11-11 08:53:09 +01:00
Andrew Godwin c7bf4c27a0 Allow squashing of squashed migrations 2013-11-06 15:27:08 +00:00
Alex Gaynor c347f78cc1 Fixed all E226 violations 2013-11-03 10:08:55 -08:00
Milton Mazzarri cbc7cbbc5b Fixed flake8 E251 violations 2013-11-03 03:22:11 -06:00
coagulant 3bc0d46a84 Fixed all E261 warnings 2013-11-02 18:20:39 -04:00
Alex Gaynor 7548aa8ffd More attacking E302 violators 2013-11-02 13:12:09 -07:00
Boryslav Larin e737c009b8 Fixed flake8 E241 2013-11-02 21:45:40 +02:00
Tim Graham 36ded01527 Fixed #21302 -- Fixed unused imports and import *. 2013-11-02 15:24:56 -04:00
Anssi Kääriäinen 9f76ea1eaa Fixed #21375 -- related_name='+' clashed with other '+' names 2013-11-02 21:18:35 +02:00
Andrew Godwin e9cb333bc3 Auto-apply initial migrations if their tables exist already. 2013-10-30 15:17:49 +00:00
Alex Gaynor f2d8027c9a Fixed up some more flake8 violations (this particular violation still has many occurrences in the tests/ dir so it can't be removed from setup.cfg yet) 2013-10-26 10:50:40 -07:00
Tim Graham ae48d77ef8 Fixed E225 pep8 warnings. 2013-10-23 06:09:29 -04:00
Tim Graham 1597503a01 Fixed E221 pep8 warnings. 2013-10-22 09:51:39 -04:00
Ramiro Morales b5f52647fe Decode from UTF-8 explicitly when reading a text file in makemessages.
This shows itself with Python 3 under Windows where UTF-8 usually isn't
the default file I/O encoding and caused one failure and three errors
in our test suite under that platform setup.
2013-10-22 06:09:21 -03:00
Claude Paroz a098bee1b9 Fixed #19724 -- Output note when showing only core management commands
When listing available management commands, only core commands are
listed if settings have any error. This commit adds a note in this
case so errors are not totally silently skipped.
Thanks Peter Davis for the report.
2013-10-21 21:26:48 +02:00
Alasdair Nicol b289fcf1bf Fixed #21288 -- Fixed E126 pep8 warnings 2013-10-21 08:31:30 -04:00
Alasdair Nicol a800036981 Fixed #21287 -- Fixed E123 pep8 warnings 2013-10-18 10:07:39 +01:00
Alasdair Nicol 65d1d65d52 Fixed #21267 -- Fixed E502 pep8 warnings 2013-10-18 01:28:32 +01:00
Alasdair Nicol dfb4cb9970 Fixed #21285 -- Fixed E121,E122 pep8 warnings 2013-10-17 20:20:11 -04:00
Claude Paroz 3514bcb251 Fixed #21284 -- Prevented KeyError swallowing in fetch_command
Thanks wildfire for the report.
2013-10-17 18:57:44 +02:00
Javed Khan a921f06345 Fixed #21280 -- Don't generate empty migration files 2013-10-17 08:21:17 -04:00
Alasdair Nicol eb214452c3 Fixed #21270 -- Fixed E701 pep8 warnings 2013-10-17 12:12:40 +01:00
Claude Paroz 650b6fd90e Add get_migratable_models util method to ConnectionRouter 2013-10-16 18:02:49 +02:00
Claude Paroz 2992f42861 Fixed #19657 -- Made sql commands honor allow_migrate
Thanks Manel Clos for the report and the initial patch, and
Marc Tamlyn and Tim Graham for the review.
2013-10-16 18:02:32 +02:00
Andrew Godwin 763ac8b642 First pass on squashmigrations command; files are right, execution not. 2013-10-16 12:00:07 +01:00
Claude Paroz 42a67ec1cd Fixed #21269 -- Don't crash when CommandError contains non-ascii
Thanks kontakt@eikefoken.de for the report.
2013-10-14 21:21:07 +02:00
Claude Paroz 1e8eadc94e Fixed #15888 -- Made tablename argument of createcachetable optional
Thanks Aymeric Augustin for the report and the documentation and
Tim Graham for the review.
2013-10-14 13:24:40 +02:00
Tai Lee e527c0b6d8 Fixed #13252 -- Added ability to serialize with natural primary keys.
Added ``--natural-foreign`` and ``--natural-primary`` options and
deprecated the ``--natural`` option to the ``dumpdata`` management
command.

Added ``use_natural_foreign_keys`` and ``use_natural_primary_keys``
arguments and deprecated the ``use_natural_keys`` argument to
``django.core.serializers.Serializer.serialize()``.

Thanks SmileyChris for the suggestion.
2013-10-11 12:52:57 -04:00
Tim Graham 945e033a69 Fixed #8918 -- Made FileField.upload_to optional.
Thanks leahculver for the suggestion and dc and vajrasky for work
on the patch.
2013-10-11 08:07:25 -04:00
Tim Graham 1dae4ac177 Whitespace cleanup.
* Removed trailing whitespace.
* Added newline to EOF if missing.
* Removed blank lines at EOF.
* Removed some stray tabs.
2013-10-10 16:49:20 -04:00
Baptiste Mispelon 20472aa827 Fixed #21189: Cleaned up usage of bare except clauses.
Thanks to berkerpeksag for the report and to claudep
for the review.
2013-10-05 11:50:03 +02:00
Ramiro Morales 4b715fc05a Fixed #21209 -- .po file path comments on Windows.
Literals from source files with Django template language syntax don't
have a '.py' suffix anymore.

Also, the '.\' prefix is preserved to respect GNU gettext behavior on
that platform.

Refs #16903.
2013-10-01 20:37:43 -03:00
Helen ST 41167645b1 Fixed #14028 - Added validation for clashing db_columns.
Thanks akaariai for the suggestion.
2013-09-23 11:51:58 -04:00
Florian Apolloner 2ca00faa91 Fixed "Address already in use" from liveserver.
Our WSGIServer rewrapped the socket errors from server_bind into
WSGIServerExceptions, which is used later on to provide nicer
error messages in runserver and used by the liveserver to see if
the port is already in use. But wrapping server_bind isn't enough since
it only binds to the socket, socket.listen (which is called from
server_activate) could also raise "Address already in use".

Instead of overriding server_activate too I chose to just catch socket
errors, which seems to make more sense anyways and should be more robust
against changes in wsgiref.
2013-09-22 22:02:59 +02:00
Markus Holtermann a772ea8117 Fixed #21115 -- Fixed NameError in migrate --list command 2013-09-17 12:53:59 -04:00
Michael Manfre c89d80e2cc Fixed #21097 - Added DatabaseFeature.can_introspect_autofield 2013-09-14 09:48:59 +03:00
Michael Manfre e61cc87129 Fixed #21090 -- Allowed backends to provide dotted field path to inspectdb. 2013-09-11 13:35:26 -04:00
Gregor MacGregor b2b763448f Fixed #20841 -- Added messages to NotImplementedErrors
Thanks joseph at vertstudios.com for the suggestion.
2013-09-10 11:09:59 -04:00
Alex Gaynor 2530735d2d Fixed a number of flake8 errors -- particularly around unused imports and local variables 2013-09-06 21:56:40 -07:00
Russell Keith-Magee 4f5faa1916 Merge pull request #1582 from rca/12756-missing-yaml-module-serializer-error-message
Fixed #12756: Improved error message when yaml module is missing.
2013-09-06 16:05:02 -07:00
Andrew Godwin 0b7cf56e28 Add -l alias for migrate --list 2013-09-06 17:00:38 -05:00
Roberto Aguilar 076cf131ec Moved get_serializer() call in dumpdata command.
Moved the get_serializer() call within the condition that checks public
serializers.  This will allow exceptions other than
SerializerDoesNotExist to be raised in order to provide the caller with
useful information, e.g when pyyaml is not installed.
2013-09-06 20:33:23 +00:00
Andrew Godwin efd1e6096e Adding 'sqlmigrate' command and quote_parameter to support it. 2013-09-06 15:28:12 -05:00
Andrew Godwin 9f6e6009a4 Add --list option to migrate command 2013-09-06 11:06:19 -05:00
Markus Holtermann bd8e1a354c Fixed #20977 -- Fixed writing migrations to disk on Python 3 2013-09-06 09:51:58 -04:00
Aymeric Augustin 6a6428a36f Took advantage of django.utils.six.moves.urllib.*. 2013-09-05 14:39:23 -05:00
Carl Meyer 8f7f8bf688 Fixed #21026 -- Corrected help for manage.py test command. 2013-09-03 09:50:34 -06:00
Simon Charette 11cd7388f7 Fixed #20989 -- Removed useless explicit list comprehensions. 2013-08-30 10:57:51 -04:00
Tim Graham c7d0ff0cad Fixed #20989 -- Removed explicit list comprehension inside dict() and tuple()
Thanks jeroen.pulles at redslider.net for the suggestion and
helper script.
2013-08-29 12:11:03 -04:00
Christopher Medrela 32a962bdbf Fixed #20814 -- Improved model field accessor clash error messages
Thanks shai for the suggestion.
2013-08-24 18:00:23 -04:00
Andrew Godwin beefac8aae Only create the migration directory once per app 2013-08-21 22:32:05 +01:00
Florian Apolloner 839940f27f Fixed #20933 -- Allowed loaddata to load fixtures from relative paths. 2013-08-21 22:32:04 +01:00
Andrew Godwin 2e7f45a372 Change autodetector changes API to be just one method 2013-08-21 22:25:15 +01:00
Andrew Godwin 841b7af812 Use DEFAULT_DB_ALIAS 2013-08-12 16:40:41 +01:00
Andrew Godwin d5a7a3d6a8 Add clarifying comment 2013-08-10 21:04:59 +01:00
Andrew Godwin 3f1f91f155 Print all bad apps passed to makemigrations, not just the first one. 2013-08-10 20:02:55 +01:00
Andrew Godwin b3cec920a2 Remove other color_style override 2013-08-09 17:39:07 +01:00
Andrew Godwin 9f73629420 utils.importlib is deprecated 2013-08-09 17:36:16 +01:00
Andrew Godwin 679627660f Remove useless override of self.style 2013-08-09 17:34:35 +01:00
Andrew Godwin de64c4d6e9 Merge remote-tracking branch 'core/master' into schema-alteration
Conflicts:
	django/core/management/commands/flush.py
	django/core/management/commands/syncdb.py
	django/db/models/loading.py
	docs/internals/deprecation.txt
	docs/ref/django-admin.txt
	docs/releases/1.7.txt
2013-08-09 14:17:30 +01:00
Curtis Maloney 07876cf02b Deprecated SortedDict (replaced with collections.OrderedDict)
Thanks Loic Bistuer for the review.
2013-08-04 07:09:39 -04:00
MinRK 75cf5fc7f0 Added support for IPython.start_ipython in shell
IPython 1.0 introduces an actual stable public API function
for starting a normal (non-embedded) IPython session.

This is an official public API, which is promised to survive implementation changes.
2013-07-30 10:22:41 -07:00
Jose L. Patino 7b57e575c9 Fixed #19877 -- Added `--no-color` option to `BaseCommand` to avoid using output styles. 2013-07-30 09:26:18 -04:00
Andrew Godwin 12e9804d16 Rename allow_syncdb to allow_migrate 2013-07-30 12:08:59 +01:00
Andrew Godwin 68e0a169c4 Rename pre_ and post_syncdb to *_migrate, with aliases from old names 2013-07-30 11:52:52 +01:00
Claude Paroz 5c1143910e Removed most of absolute_import imports
Should be unneeded with Python 2.7 and up.
Added some unicode_literals along the way.
2013-07-29 20:28:13 +02:00
Claude Paroz fdd7a355bf Deprecated django.utils.importlib
This was a shim for pre-Python 2.7 support.
2013-07-29 17:10:22 +02:00
Przemek Lewandowski 382c53d7d8 Fixed #18213 -- Allowed empty fixtures (emit a warning rather than raising an exception). 2013-07-29 08:03:51 -04:00
Julien Phalip 47c755327b Fixed a number of minor misspellings. 2013-07-27 18:46:03 -07:00
Andrew Godwin d5ca169334 Fix "OK" alignment in migrate output 2013-07-26 16:52:17 +01:00
Andrew Godwin 52643a69e3 Add --fake option to migrate 2013-07-26 16:47:00 +01:00
Andrew Godwin c1ed21fa9e Use new transaction API in syncdb section of migrate 2013-07-26 16:39:44 +01:00
Andrew Godwin 6b39010d57 Remove nasty error message checking hack 2013-07-26 16:33:32 +01:00
Andrew Godwin 00276e0414 Add tests for the migrate command and fix a bug they exposed 2013-07-25 13:52:35 +01:00
Tim Graham bd0dcc6c89 Fixed #20766 -- Deprecated FastCGI support. 2013-07-24 13:41:45 -04:00
Tim Graham 31c13a99bb Fixed #14300 -- Fixed initial SQL location if models is a package.
Thanks al_the_x for the report and fheinz for the draft patch.
2013-07-24 06:56:33 -04:00
Andrew Godwin 162f7b938f Make migrate command recognise prefixes and 'zero'. 2013-07-22 19:43:58 +01:00
Andrew Godwin b1e0ec06f0 Merge branch 'master' into schema-alteration 2013-07-02 10:49:53 +01:00
Ramiro Morales f73d04dda9 Removed 'cleanup' management command as per deprecation TL. 2013-06-28 21:48:16 -03:00
Andrew Godwin 7a47ba6f6a Merge remote-tracking branch 'core/master' into schema-alteration
Conflicts:
	django/db/backends/__init__.py
	django/db/models/fields/related.py
	tests/field_deconstruction/tests.py
2013-06-28 17:32:57 +01:00
Russell Keith-Magee 0346563939 Fixed #20653 -- Renamed checksetup management command.
This is to allow future compatibility with work that is ongoing in the 2013 GSoC.
2013-06-25 09:37:54 +08:00
Ramiro Morales 1559f84d8b Fixed #20311 -- Make sure makemessages doesn't create duplicate Plural-Forms .po file headers.
Thanks naktinis for the report and initial patch.
2013-06-22 18:45:41 -03:00
Andrew Godwin 0e8ee50e86 Rename makemigration to makemigrations 2013-06-20 15:27:33 +01:00
Baptiste Mispelon fdbcbb9ebd Fixed #20632 -- Fixed {{ docs_version }} in project template 2013-06-20 15:39:58 +02:00
Andrew Godwin 41214eaf18 Autodetect fields, have migrate actually work 2013-06-19 16:41:04 +01:00
Andrew Godwin f25a385a5e Makemigration command now works 2013-06-19 16:23:52 +01:00
Aymeric Augustin ffcf24c9ce Removed several unused imports. 2013-06-19 17:18:40 +02:00
Andrew Godwin ab5cbae9b7 First stab at some migration creation commands 2013-06-19 15:36:22 +01:00
Andrew Godwin 9daf81b94e Merge remote-tracking branch 'core/master' into schema-alteration
Conflicts:
	django/db/models/loading.py
2013-06-19 12:05:23 +01:00
Florian Apolloner ffa8a9ab24 Fixed python 3.2 compat. 2013-06-14 15:44:45 +02:00
Daniel Lindsley 91f317c76d Added a ``checksetup`` management command for verifying Django compatibility. 2013-06-13 18:39:02 -07:00
Aymeric Augustin 55cbd65985 Fixed #20579 -- Improved TransactionTestCase.available_apps.
Also moved its documentation to the 'advanced' section. It doesn't
belong to the 'overview'. Same for TransactionTestCase.reset_sequences.

When available_apps is set, after a TransactionTestCase, the database
is now totally empty. post_syncdb is fired at the beginning of the next
TransactionTestCase.

Refs #20483.
2013-06-12 20:01:41 +02:00
Aymeric Augustin 13b7f299de Added a stealth option to flush to allow cascades.
This allows using flush on a subset of the tables without having to
manually cascade to all tables with foreign keys to the tables being
truncated, when they're known to be empty.

On databases where truncate is implemented with DELETE FROM, this
doesn't make a difference. The cascade is allowed, not mandatory.
2013-06-10 11:21:54 +02:00
Tim Graham 96c71d423d Added runserver validation to detect if DEBUG=False and ALLOWED_HOSTS is empty.
Refs #19875.
2013-06-09 15:08:29 -04:00
Chris Streeter 69373f3420 Fixed #19925 - Added validation for REQUIRED_FIELDS being a list
Thanks Roman Alexander for the suggestion.
2013-06-07 19:58:41 -04:00
Andrew Godwin 315ab41e41 Initial stab at a migrate command, it's probably quite a way off. 2013-06-07 18:47:17 +01:00
Andrew Godwin 3c296382b8 Merge remote-tracking branch 'core/master' into schema-alteration
Conflicts:
	django/db/models/fields/related.py
2013-06-07 11:15:34 +01:00
Florian Apolloner c9d07d251f Fixed loaddata for Django checkouts with non ASCII chars in the name. 2013-06-03 13:18:16 +02:00
Aymeric Augustin 6900cb79dc Fixed small regression from 51aa000378.
A test failed if the path to the Django checkout contained a dot.

Refs #20485.
2013-06-03 11:48:03 +02:00
Aymeric Augustin 51aa000378 Fixed #20485 -- Refactored loaddata for speed.
Thanks Anssi for reporting this performance bottleneck.
2013-06-02 20:39:45 +02:00
René Fleschenberg 5090c7b58b Improved the usage message of the test command. 2013-05-31 13:16:54 -04:00
Tim Graham 59235816bd Fixed #20509 - Proper parsing for dumpdata --pks option.
Thanks weipin for the report and Baptiste Mispelon for the patch.
2013-05-30 10:19:13 -04:00
Claude Paroz 8010289ea2 Fixed #15697 -- Made sqlindexes aware of auto-created tables
Thanks mbertheau for the report and Ash Christopher for the
initial patch.
2013-05-29 15:50:26 +02:00
Tim Graham ded95ccdce Fixed #20484 -- Added model validation for GenericIPAddressField
GenericIPAddressField must not allow blank for NOT NULL fields

Thanks Erik Romijn.
2013-05-28 15:12:47 -04:00
Ramiro Morales 0fa8d43e74 Replaced `and...or...` constructs with PEP 308 conditional expressions. 2013-05-26 23:47:50 -03:00
Donald Stufft 3de1288042 Fixed #11398 - Added a pre_syncdb signal 2013-05-23 01:09:22 -04:00
Claude Paroz 51998dffe7 Removed check for 0.15 version of gettext tools
gettext 0.15 has been released in July 2006.
2013-05-22 18:21:33 +02:00
Jorge Bastida 888c86dcf3 Fixed #20445 -- Raised original exception after command error 2013-05-20 18:59:37 +02:00
Preston Holmes 6786920fd8 Fixed #16330 -- added --pks option in dumpdata command
Thanks to guettli for the initial ticket and patch, with additional work
from mehmetakyuz and Kevin Brolly.
2013-05-19 09:10:40 -07:00
Senko Rasic c44a2c40fe Fixed #18990 -- Loaddata now complains if fixture doesn't exist
If the fixture doesn't exist, loaddata will output a warning.

The fixture named "initial_data" is exceptional though; if it
doesn't exist, the warning is not emitted. This allows syncdb and
flush management commands to attempt to load it without causing
spurious warnings.

Thanks to Derega, ptone, dirigeant and d1ffuz0r for contributions
to the ticket.
2013-05-19 11:31:27 +02:00
Senko Rasic cc3b3ba93a Fixed #18990: Loaddata now complains if fixture doesn't exist
The fixture named "initial_data" is exceptional though; if it
doesn't exist, the error is not raised. This allows syncdb and
flush management commands to attempt to load it without causing
an error if it doesn't exist.
2013-05-19 10:56:09 +02:00
Donald Stufft a19e9d80ff Fixed #20430 - Enable iterable of iterables for model choices
Allows for any iterable, not just lists or tuples, to be used as
the inner item for a list of choices in a model.
2013-05-18 11:14:05 -04:00
Baptiste Mispelon 9012a9e200 Fixed #20422 -- Applied makemessage's --ignore patterns to full path
Fix makemessage's --ignore patterns being applied to the full path
instead of the file name. Thanks to nnseva for the report and the
original patch.
2013-05-18 10:40:16 +02:00
Andrew Godwin b31eea069c Merge branch 'master' into schema-alteration 2013-05-18 10:21:31 +02:00
Aymeric Augustin 9c487b5974 Replaced an antiquated pattern.
Thanks Lennart Regebro for pointing it out.
2013-05-17 18:08:58 +02:00
Daniel Lindsley 33793f7c3e Fixed #19934 - Use of Pillow is now preferred over PIL.
This starts the deprecation period for PIL (support to end in 1.8).
2013-05-14 19:32:04 -07:00
Andrew Godwin cb4b0de49e Merge branch 'master' into schema-alteration 2013-05-10 12:55:30 +01:00
Claude Paroz de8aa3a9a9 Fixed #20256 -- Corrected startproject --template help text
Thanks n0nam3 for the patch.
2013-05-08 09:55:40 +02:00
Tai Lee 99a6f0e77c Fixed #20354 -- `makemessages` no longer crashes with `UnicodeDecodeError`
Handle the `UnicodeDecodeError` exception, send a warning to `stdout` with the
file name and location, and continue processing other files.
2013-05-07 21:22:05 +02:00
Andrew Godwin 7f3678dc4c Merge branch 'master' into schema-alteration
Conflicts:
	django/db/backends/__init__.py
	django/db/backends/mysql/base.py
	django/db/backends/oracle/base.py
	django/db/backends/oracle/creation.py
	django/db/backends/postgresql_psycopg2/base.py
	django/db/backends/sqlite3/base.py
	django/db/models/fields/related.py
2013-04-18 17:16:39 +01:00
Claude Paroz dcf563071f Fixed #5014 -- Guessed max_digits and decimal_places for SQLite
Decimal is treated as float on SQLite, hence inspectdb can only
guess max_digits and decimal_places arguments.
2013-04-01 18:32:57 +02:00
Preston Holmes e79b857a07 Fixed #18985 -- ensure module level deprecations are displayed
Also don't compete with -W CLI option.

Thanks to Aymeric Augustin for the catch, and Claude Paroz for the patch.
2013-03-24 22:06:02 -07:00
Anssi Kääriäinen 97774429ae Fixed #19385 again, now with real code changes
The commit of 266de5f9ae included only
tests, this time also code changes included...
2013-03-24 18:40:40 +02:00
konarkmodi bc4111ba68 Fixed #18003 -- Preserved tracebacks when re-raising errors.
Thanks jrothenbuhler for draft patch, Konark Modi for updates.
2013-03-19 15:42:39 -07:00
Aymeric Augustin 20a91cce04 Fixed #17037 -- Added a --all option to diffsettings. 2013-03-18 00:03:58 +01:00
Baptiste Mispelon d5683bd06b Fix #20058: Make compilemessages use stdout instead of stderr. 2013-03-16 19:48:40 +01:00
Aymeric Augustin a50e0c9fdc Fixed a refactoring error in ba5138b1.
Thanks Florian for tracing the error.
2013-03-11 22:40:13 +01:00
Aymeric Augustin 3f1efc44f6 Fixed loaddata command, broken in the previous merge. 2013-03-11 15:43:42 +01:00
Aymeric Augustin d04964e70d Used commit_on_success_unless_managed in loaddata. 2013-03-11 15:05:05 +01:00
Aymeric Augustin ba5138b1c0 Deprecated transaction.commit/rollback_unless_managed.
Since "unless managed" now means "if database-level autocommit",
committing or rolling back doesn't have any effect.

Restored transactional integrity in a few places that relied on
automatically-started transactions with a transitory API.
2013-03-11 14:48:54 +01:00
Aymeric Augustin 7aacde84f2 Made transaction.managed a no-op and deprecated it.
enter_transaction_management() was nearly always followed by managed().

In three places it wasn't, but they will all be refactored eventually.
The "forced" keyword argument avoids introducing behavior changes until
then.

This is mostly backwards-compatible, except, of course, for managed
itself. There's a minor difference in _enter_transaction_management:
the top self.transaction_state now contains the new 'managed' state
rather than the previous one. Django doesn't access
self.transaction_state in _enter_transaction_management.
2013-03-11 14:48:53 +01:00
Ramiro Morales 7fca4416c7 Made (make|compile)messages check for availability of gettext commands.
Refs #19584.
2013-03-10 17:31:11 -03:00
Claude Paroz 6a91b63842 Fixed #19923 -- Display tracebacks for non-CommandError exceptions
By default, show tracebacks for management command errors when the
exception is not a CommandError.
Thanks Jacob Radford for the report.
2013-03-09 12:38:45 +01:00
Claude Paroz e4bf0f2c36 Fixed #19942 -- Decoded errors coming from Popen commands
Thanks Aymeric Augustin for reporting the issue.
2013-03-03 20:00:44 +01:00
Claude Paroz 0657646cb8 Removed unused options copy in flush
This was used at the time the 'database' option did not default to
DEFAULT_DB_ALIAS in make_option.
2013-03-01 22:52:08 +01:00
Ramiro Morales 8459eac031 Move management helper function to new utils module.
This allows us to iremove an inter-command import.
2013-02-26 22:07:22 -03:00
Ramiro Morales dfa9324966 Don't use os.system() in compilemessages.
Fixes #19584.

This implies stop storing file path command line arguments in envvars as
a security measure to start relying on with Popen's shell=False instead,
and addition of an 'utils' module.

Thanks kmichel_wgs for the report.
2013-02-26 21:31:53 -03:00
Tomasz Rybak d7429defe6 Add sqldropindexes to manage
Change patch from https://code.djangoproject.com/ticket/5568
to work on modern Django.
Add special case for MySQL which has different syntax for DROP INDEX.
Add unit tests for the new functionality.
2013-02-24 12:38:28 +01:00
Russell Keith-Magee f5e4a699ca Fixed #19822 -- Added validation for uniqueness on USERNAME_FIELD on custom User models.
Thanks to Claude Peroz for the draft patch.
2013-02-15 09:00:55 +08:00
Simon Charette ec469ade2b Fixed #19689 -- Renamed `Model._meta.module_name` to `model_name`. 2013-02-05 04:16:07 -05:00
Aymeric Augustin 3f1c7b7053 Simplified default project template.
Squashed commit of:

commit 508ec9144b35c50794708225b496bde1eb5e60aa
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Tue Jan 29 22:50:55 2013 +0100

    Tweaked default settings file.

    * Explained why BASE_DIR exists.
    * Added a link to the database configuration options, and put it in its
      own section.
    * Moved sensitive settings that must be changed for production at the
      top.

commit 6515fd2f1aa73a86dc8dbd2ccf512ddb6b140d57
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Tue Jan 29 14:35:21 2013 +0100

    Documented the simplified app & project templates in the changelog.

commit 2c5b576c2ea91d84273a019b3d0b3b8b4da72f23
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Tue Jan 29 13:59:27 2013 +0100

    Minor fixes in tutorials 5 and 6.

commit 55a51531be8104f21b3cca3f6bf70b0a7139a041
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Tue Jan 29 13:51:11 2013 +0100

    Updated tutorial 2 for the new project template.

commit 29ddae87bdaecff12dd31b16b000c01efbde9e20
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Tue Jan 29 11:58:54 2013 +0100

    Updated tutorial 1 for the new project template.

commit 0ecb9f6e2514cfd26a678a280d471433375101a3
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Tue Jan 29 11:29:13 2013 +0100

    Adjusted the default URLconf detection to account for the admin.

    It's now enabled by default.

commit 5fb4da0d3d09dac28dd94e3fde92b9d4335c0565
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Tue Jan 29 10:36:55 2013 +0100

    Added security warnings for the most sensitive settings.

commit 718d84bd8ac4a42fb4b28ec93965de32680f091e
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Mon Jan 28 23:24:06 2013 +0100

    Used an absolute path for the SQLite database.

    This ensures the settings file works regardless of which directory
    django-admin.py / manage.py is invoked from.

    BASE_DIR got a +1 from a BDFL and another core dev. It doesn't involve
    the concept of a "Django project"; it's just a convenient way to express
    relative paths within the source code repository for non-Python files.

    Thanks Jacob Kaplan-Moss for the suggestion.

commit 1b559b4bcda622e10909b68fe5cab90db6727dd9
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Mon Jan 28 23:22:40 2013 +0100

    Removed STATIC_ROOT from the default settings template.

    It isn't necessary in development, and it confuses beginners to no end.

    Thanks Carl Meyer for the suggestion.

commit a55f141a500bb7c9a1bc259bbe1954c13b199671
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Mon Jan 28 23:21:43 2013 +0100

    Removed MEDIA_ROOT/URL from default settings template.

    Many sites will never deal with user-uploaded files, and MEDIA_ROOT is
    complicated to explain.

    Thanks Carl Meyer for the suggestion.

commit 44bf2f2441420fd9429ee9fe1f7207f92dd87e70
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Mon Jan 28 22:22:09 2013 +0100

    Removed logging config.

    This configuration is applied regardless of the value of LOGGING;
    duplicating it in LOGGING is confusing.

commit eac747e848eaed65fd5f6f254f0a7559d856f88f
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Mon Jan 28 22:05:31 2013 +0100

    Enabled the locale middleware by default.

    USE_I18N is True by default, and doesn't work well without
    LocaleMiddleware.

commit d806c62b2d00826dc2688c84b092627b8d571cab
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Mon Jan 28 22:03:16 2013 +0100

    Enabled clickjacking protection by default.

commit 99152c30e6a15003f0b6737dc78e87adf462aacb
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Mon Jan 28 22:01:48 2013 +0100

    Reorganized settings in logical sections, and trimmed comments.

commit d37ffdfcb24b7e0ec7cc113d07190f65fb12fb8a
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Mon Jan 28 16:54:11 2013 +0100

    Avoided misleading TEMPLATE_DEBUG = DEBUG.

    According to the docs TEMPLATE_DEBUG works only when DEBUG = True.

commit 15d9478d3a9850e85841e7cf09cf83050371c6bf
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Mon Jan 28 16:46:25 2013 +0100

    Removed STATICFILES_FINDERS/TEMPLATE_LOADERS from default settings file.

    Only developers with special needs ever need to change these settings.

commit 574da0eb5bfb4570883756914b4dbd7e20e1f61e
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Mon Jan 28 16:45:01 2013 +0100

    Removed STATICFILES/TEMPLATES_DIRS from default settings file.

    The current best practice is to put static files and templates in
    applications, for easier testing and deployment.

commit 8cb18dbe56629aa1be74718a07e7cc66b4f9c9f0
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Mon Jan 28 16:24:16 2013 +0100

    Removed settings related to email reporting from default settings file.

    While handy for small scale projects, it isn't exactly a best practice.

commit 8ecbfcb3638058f0c49922540f874a7d802d864f
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Tue Jan 29 18:54:43 2013 +0100

    Documented how to enable the sites framework.

commit 23fc91a6fa67d91ddd9d71b1c3e0dc26bdad9841
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Mon Jan 28 16:28:59 2013 +0100

    Disabled the sites framework by default.

    RequestSite does the job for single-domain websites.

commit c4d82eb8afc0eb8568bf9c4d12644272415e3960
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Tue Jan 29 00:08:33 2013 +0100

    Added a default admin.py to the application template.

    Thanks Ryan D Hiebert for the suggestion.

commit 4071dc771e5c44b1c5ebb9beecefb164ae465e22
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Mon Jan 28 10:59:49 2013 +0100

    Enabled the admin by default.

    Everyone uses the admin.

commit c807a31f8d89e7e7fd97380e3023f7983a8b6fcb
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Mon Jan 28 10:57:05 2013 +0100

    Removed admindocs from default project template.

commit 09e4ce0e652a97da1a9e285046a91c8ad7a9189c
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Mon Jan 28 16:32:52 2013 +0100

    Added links to the settings documentation.

commit 5b8f5eaef364eb790fcde6f9e86f7d266074cca8
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Mon Jan 28 11:06:54 2013 +0100

    Used a significant example for URLconf includes.

commit 908e91d6fcee2a3cb51ca26ecdf12a6a24e69ef8
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Mon Jan 28 16:22:31 2013 +0100

    Moved code comments about WSGI to docs, and rewrote said docs.

commit 50417e51996146f891d08ca8b74dcc736a581932
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Mon Jan 28 15:51:50 2013 +0100

    Normalized the default application template.

    Removed the default test that 1 + 1 = 2, because it's been committed
    way too many times, in too many projects.

    Added an import of `render` for views, because the first view will
    often be:

    def home(request):
        return render(request, "mysite/home.html")
2013-02-04 13:21:36 +01:00
Ramiro Morales 21ea58b8cc Enhanced docs and docctrings added in 869c9ba.
Thanks Claude for the suggestion.
2013-02-04 08:55:45 -03:00
Claude Paroz 2edef932ff Revert "Fixed #19724 -- Output error when settings are improperly configured"
This reverts commit 40ca99097f.
Outputting error is not always suitable, for example this shouldn't
happen for the 'startproject' command.
2013-02-04 12:15:22 +01:00
Claude Paroz 40ca99097f Fixed #19724 -- Output error when settings are improperly configured
...during retrieval of available management commands.
Thanks Peter Davis for the report and Julien Phalip for the review.
2013-02-04 11:47:59 +01:00
Ramiro Morales 869c9ba306 Fixed #19730 -- Don't validate importability of settings by using i18n in management commands.
They are handled independently now and the latter can be influenced by
the new BaseCommand.leave_locale_alone internal option.

Thanks chrischambers for the report, Claude, lpiatek, neaf and gabooo for
their work on a patch, originally on refs. #17379.
2013-02-03 23:40:38 -03:00
Ramiro Morales 08dc90bccf Fixed #14305 -- Switched inspectdb to create unmanaged models.
Thanks Ian Kelly for the report and initial patch.
2013-02-02 21:11:32 -03:00
Aymeric Augustin 0412b7d280 Avoided ambiguous output when runserver port is already in use.
Thanks James Pic for the suggestion (PR 88).
2013-02-01 22:25:29 +01:00
Claude Paroz b757e7ae18 Fixed dict randomization issue in inspectdb 2013-01-31 22:21:24 +01:00
Claude Paroz 7bbd17bf20 Fixed #19341 -- Detected NullBooleanField when introspecting models
Thanks Tim Bowden for the report.
2013-01-31 20:55:00 +01:00
Claude Paroz eb03fe1642 Added introspection tests for most of Django model fields 2013-01-31 20:41:57 +01:00
Aymeric Augustin c47fa3b481 Fixed #19676 -- Supported 'self' foreign keys in inspectdb.
Thanks Georgy Kutsurua for the report and Simon Charette for the patch.
2013-01-28 10:21:07 +01:00
Ramiro Morales ce27fb198d Revert "Patch by Claude for #16084."
This reverts commit 2babab0bb3.
2013-01-25 13:58:37 -03:00
Ramiro Morales 2babab0bb3 Patch by Claude for #16084. 2013-01-25 13:23:33 -03:00
Claude Paroz b9c8bbf372 Fixed #19665 -- Ensured proper stderr output for Command.run_from_argv
Thanks Stefan Koegl for the report and Simon Charette for the review.
2013-01-25 14:56:41 +01:00
Ramiro Morales 1f6b2e7a65 Fixed #6682 -- Made shell's REPL actually execute $PYTHONSTARTUP and `~/.pythonrc.py`.
Also:

* Added a ``--no-startup`` option to disable this behavior. Previous
  logic to try to execute the code in charge of this funcionality was
  flawed (it only tried to do so if the user asked for ipython/bpython
  and they weren't found)
* Expand ``~`` in PYTHONSTARTUP value.

Thanks hekevintran at gmail dot com  for the report and initial patch.

Refs #3381.
2013-01-24 22:01:47 -03:00
Claude Paroz 9893fa12b7 Fixed #19125 -- The startproject command should validate the name earlier
Thanks Łukasz Rekucki for the report and the patch.
2013-01-24 09:26:13 +01:00
Ramiro Morales 37718eb50b Fix in makemessages refactoring plus UI tweaks. 2013-01-19 12:58:33 -03:00
Claude Paroz 755f215590 Refactored makemessages command 2013-01-19 12:05:06 +01:00
Anssi Kääriäinen 3647c0a49a Avoided unnecessary recreation of RelatedObjects
Refs #19399. Thanks to Track alias KJ for the patch.
2013-01-18 07:09:39 +02:00
Craig Blaszczyk 6158c79dbe Made (make|compile)messages commands accept multiple locales at once.
Thanks Craig Blaszczyk for the initial patch. Refs #17181.
2013-01-17 00:53:17 -03:00
Ramiro Morales 248aee1606 Modified makemessages so it creates .pot files once per invocation.
It creates a `locale/django.pot` file once instead of one
`locale/<locale_code>/django.pot` file for every locale involved.

Thanks Michal Čihař for the report and patch.
2013-01-16 20:48:06 -03:00
Ramiro Morales eee865257a Fixed #17008 -- Added makemessages option to not remove .pot files.
Thanks airstrike for the report and initial patch, Julien for an
enhanced patch and Jannis for reviewing.
2013-01-16 20:29:06 -03:00
Ramiro Morales 3570ff734e Fixed #17078 -- Made shell use std IPython startup.
This allows for a behavior more in line with what is expected by Ipython
users, e.g. the user namespace is initialized from config files, startup
files.

Thanks Benjamin Ragan-Kelley from the IPython dev team for the patch.
2012-12-31 19:40:02 -03:00
Aymeric Augustin ef017a5f00 Advanced pending deprecation warnings.
Also added stacklevel argument, fixed #18127.
2012-12-29 21:59:07 +01:00
Aymeric Augustin d1c72d9e01 Removed django.core.management.setup_environ and execute_manager. 2012-12-29 21:59:07 +01:00
Andrew Godwin b62e82365a Merge remote-tracking branch 'core/master' into schema-alteration
Conflicts:
	django/db/models/loading.py
	django/db/models/options.py
2012-12-18 09:02:07 +00:00
Claude Paroz c91667338a Fixed #19357 -- Allow non-ASCII chars in filesystem paths
Thanks kujiu for the report and Aymeric Augustin for the review.
2012-12-08 11:13:52 +01:00
Claude Paroz 5fa5621f57 Fixed #19416 -- Fixed multi-line commands in initial SQL files
Thanks Aymeric Augustin for detecting this regression.
2012-12-03 20:47:08 +01:00
Aymeric Augustin baae4b8187 Fixed #19397 -- Crash on binary files in project templates.
Thanks gw 2012 at tnode com for the report.
2012-12-03 10:45:18 +01:00
Russell Keith-Magee f2d8004967 Removed some stray debug lines introduced accidentally in c8985a8. 2012-11-24 15:26:36 +08:00
Russell Keith-Magee c8985a8a73 Fixed #19806 -- Ensure that content types and permissions aren't created for swapped models.
Thanks to rizumu for the report.
2012-11-24 13:43:20 +08:00
Ramiro Morales 9e7723f851 Refactor loaddata for readability.
Thanks Claude Paroz and Daniel Moisset for review and feedback.
2012-11-17 13:18:01 -03:00
Claude Paroz 9a09558e9f Fixed #19257 -- Don't swallow command's KeyError in call_command
Thanks Giovanni Bajo for the report.
2012-11-07 18:28:53 +01:00
Alex Gaynor 4285571c5a Fixed #5805 -- it is now possible to specify multi-column indexes. Thanks to jgelens for the original patch. 2012-11-04 10:16:06 -08:00
Aymeric Augustin 83ba0a9d4b Fixed #18978 -- Moved cleanup command to sessions.
This removes a dependency of 'core' on 'contrib'.
2012-10-27 18:31:00 +02:00
Andrew Godwin 6a632e0457 Merge branch 'master' into schema-alteration
Conflicts:
	django/db/backends/__init__.py
	django/db/models/fields/related.py
	django/db/models/options.py
2012-10-26 08:41:13 +01:00
Preston Holmes 1a3ff63199 Updated error message for bad database engine
removing typo in the process. Thanks to Carlos Palol for the catch.
Closes pull 450
2012-10-21 07:41:59 -07:00
Russell Keith-Magee 7a908747a5 Fixed #19150 -- Added validation for USERNAME_FIELD being included in REQUIRED_FIELDS.
Thanks to Chris Pagnutti for the suggestion.
2012-10-20 11:51:15 +08:00
Claude Paroz dcdaf9a079 Fixed error output from runserver
This has been missed in commit 822d6d6dab (Refs #18325).
2012-10-10 17:56:25 +02:00
Ramiro Morales 2100da9dcd Ensure we ignore __pycache__ PEP 3174 dirs in a few more places. 2012-10-06 18:40:58 -03:00
Russell Keith-Magee 3b6f980bed Fixed #19049 -- Ensure that swapped models aren't included in reverse field caches.
Thanks to Ivan Virabyan for the report.
2012-10-02 22:52:45 +08:00
Preston Holmes 2aac3ce0c6 Cleaned up loaddata command options help text 2012-10-01 14:46:12 -07:00
Preston Holmes e7723683dc Fixed #9279 -- Added ignorenonexistent option to loaddata
Thanks to Roman Gladkov for the initial patch and Simon Charette for review.
2012-09-30 23:40:27 -07:00
Claude Paroz bb7da7844f Fixed #18845 -- Do not swallow AttributeErrors when running commands 2012-09-26 15:07:11 +02:00
Russell Keith-Magee 70a0de37d1 Fixed #3011 -- Added swappable auth.User models.
Thanks to the many people that contributed to the development and review of
this patch, including (but not limited to) Jacob Kaplan-Moss, Anssi
Kääriäinen, Ramiro Morales, Preston Holmes, Josh Ourisman, Thomas Sutton,
and Roger Barnes, as well as the many, many people who have contributed to
the design discussion around this ticket over many years.

Squashed commit of the following:

commit d84749a0f0
Merge: 531e771 7c11b1a
Author: Russell Keith-Magee <russell@keith-magee.com>
Date:   Wed Sep 26 18:37:04 2012 +0800

    Merge remote-tracking branch 'django/master' into t3011

commit 531e7715da
Merge: 29d1abb 1f84b04
Author: Russell Keith-Magee <russell@keith-magee.com>
Date:   Wed Sep 26 07:09:23 2012 +0800

    Merged recent trunk changes.

commit 29d1abbe35
Merge: 8a527dd 54c81a1
Author: Russell Keith-Magee <russell@keith-magee.com>
Date:   Mon Sep 24 07:49:46 2012 +0800

    Merge remote-tracking branch 'django/master' into t3011

commit 8a527dda13
Author: Russell Keith-Magee <russell@keith-magee.com>
Date:   Mon Sep 24 07:48:05 2012 +0800

    Ensure sequences are reset correctly in the presence of swapped models.

commit e2b6e22f29
Author: Russell Keith-Magee <russell@keith-magee.com>
Date:   Sun Sep 23 17:53:05 2012 +0800

    Modifications to the handling and docs for auth forms.

commit 98aba856b5
Author: Russell Keith-Magee <russell@keith-magee.com>
Date:   Sun Sep 23 15:28:57 2012 +0800

    Improved error handling and docs for get_user_model()

commit 0229209c84
Merge: 6494bf9 8599f64
Author: Russell Keith-Magee <russell@keith-magee.com>
Date:   Sun Sep 23 14:50:11 2012 +0800

    Merged recent Django trunk changes.

commit 6494bf91f2
Author: Russell Keith-Magee <russell@keith-magee.com>
Date:   Mon Sep 17 21:38:44 2012 +0800

    Improved validation of swappable model settings.

commit 5a04cde342
Author: Russell Keith-Magee <russell@keith-magee.com>
Date:   Mon Sep 17 07:15:14 2012 +0800

    Removed some unused imports.

commit ffd535e413
Author: Russell Keith-Magee <russell@keith-magee.com>
Date:   Sun Sep 16 20:31:28 2012 +0800

    Corrected attribute access on for get_by_natural_key

commit 913e1ac84c
Author: Russell Keith-Magee <russell@keith-magee.com>
Date:   Sun Sep 16 20:12:34 2012 +0800

    Added test for proxy model safeguards on swappable models.

commit 280bf19e94
Merge: dbb3900 935a863
Author: Russell Keith-Magee <russell@keith-magee.com>
Date:   Sun Sep 16 18:16:49 2012 +0800

    Merge remote-tracking branch 'django/master' into t3011

commit dbb3900775
Author: Russell Keith-Magee <russell@keith-magee.com>
Date:   Sun Sep 16 18:09:27 2012 +0800

    Fixes for Python 3 compatibility.

commit dfd72131d8
Author: Russell Keith-Magee <russell@keith-magee.com>
Date:   Sun Sep 16 15:54:30 2012 +0800

    Added protection against proxying swapped models.

commit abcb027190
Author: Russell Keith-Magee <russell@keith-magee.com>
Date:   Sun Sep 16 15:11:10 2012 +0800

    Cleanup and documentation of AbstractUser base class.

commit a9491a8776
Merge: fd8bb4e 08bcb4a
Author: Russell Keith-Magee <russell@keith-magee.com>
Date:   Sun Sep 16 14:46:49 2012 +0800

    Merge commit '08bcb4aec1ed154cefc631b8510ee13e9af0c19d' into t3011

commit fd8bb4e3e4
Author: Russell Keith-Magee <russell@keith-magee.com>
Date:   Sun Sep 16 14:20:14 2012 +0800

    Documentation improvements coming from community review.

commit b550a6d06d
Author: Russell Keith-Magee <russell@keith-magee.com>
Date:   Sun Sep 16 13:52:47 2012 +0800

    Refactored skipIfCustomUser into the contrib.auth tests.

commit 52a02f1110
Author: Russell Keith-Magee <russell@keith-magee.com>
Date:   Sun Sep 16 13:46:10 2012 +0800

    Refactored common 'get' pattern into manager method.

commit b441a6bbc7
Author: Russell Keith-Magee <russell@keith-magee.com>
Date:   Sun Sep 16 13:41:33 2012 +0800

    Added note about backwards incompatible change to admin login messages.

commit 08bcb4aec1
Author: Anssi Kääriäinen <akaariai@gmail.com>
Date:   Sat Sep 15 18:30:33 2012 +0300

    Splitted User to AbstractUser and User

commit d9f5e5addb
Author: Anssi Kääriäinen <akaariai@gmail.com>
Date:   Sat Sep 15 18:30:02 2012 +0300

    Reworked REQUIRED_FIELDS + create_user() interaction

commit 579f152e4a
Merge: 9184972 93e6733
Author: Russell Keith-Magee <russell@keith-magee.com>
Date:   Sat Sep 15 20:18:37 2012 +0800

    Merge remote-tracking branch 'django/master' into t3011

commit 918497218c
Author: Russell Keith-Magee <russell@keith-magee.com>
Date:   Sat Sep 15 20:18:19 2012 +0800

    Deprecate AUTH_PROFILE_MODULE and get_profile().

commit 334cdfc1bb
Author: Russell Keith-Magee <russell@keith-magee.com>
Date:   Sat Sep 15 20:00:12 2012 +0800

    Added release notes for new swappable User feature.

commit 5d7bb22e8d
Author: Russell Keith-Magee <russell@keith-magee.com>
Date:   Sat Sep 15 19:59:49 2012 +0800

    Ensure swapped models can't be queried.

commit 57ac6e3d32
Merge: f2ec915 abfba3b
Author: Russell Keith-Magee <russell@keith-magee.com>
Date:   Sat Sep 15 14:31:54 2012 +0800

    Merge remote-tracking branch 'django/master' into t3011

commit f2ec915b20
Merge: 1952656 5e99a3d
Author: Russell Keith-Magee <russell@keith-magee.com>
Date:   Sun Sep 9 08:29:51 2012 +0800

    Merge remote-tracking branch 'django/master' into t3011

commit 19526563b5
Merge: 2c5e833 c4aa26a
Author: Russell Keith-Magee <russell@keith-magee.com>
Date:   Sun Sep 9 08:22:26 2012 +0800

    Merge recent changes from master.

commit 2c5e833a30
Author: Russell Keith-Magee <russell@keith-magee.com>
Date:   Sun Sep 9 07:53:46 2012 +0800

    Corrected admin_views tests following removal of the email fallback on admin logins.

commit 20d1892491
Author: Russell Keith-Magee <russell@keith-magee.com>
Date:   Sun Sep 9 01:00:37 2012 +0800

    Added conditional skips for all tests dependent on the default User model

commit 40ea8b8882
Author: Russell Keith-Magee <russell@keith-magee.com>
Date:   Sat Sep 8 23:47:02 2012 +0800

    Added documentation for REQUIRED_FIELDS in custom auth.

commit e6aaf65970
Author: Russell Keith-Magee <russell@keith-magee.com>
Date:   Sat Sep 8 23:20:02 2012 +0800

    Added first draft of custom User docs.

    Thanks to Greg Turner for the initial text.

commit 75118bd242
Author: Thomas Sutton <me@thomas-sutton.id.au>
Date:   Mon Aug 20 11:17:26 2012 +0800

    Admin app should not allow username discovery

    The admin app login form should not allow users to discover the username
    associated with an email address.

commit d088b3af58
Author: Thomas Sutton <me@thomas-sutton.id.au>
Date:   Mon Aug 20 10:32:13 2012 +0800

    Admin app login form should use swapped user model

commit 7e82e83d67
Merge: e29c010 39aa890
Author: Russell Keith-Magee <russell@keith-magee.com>
Date:   Fri Sep 7 23:45:03 2012 +0800

    Merged master changes.

commit e29c010beb
Merge: 8e3fd70 30bdf22
Author: Russell Keith-Magee <russell@keith-magee.com>
Date:   Mon Aug 20 13:12:57 2012 +0800

    Merge remote-tracking branch 'django/master' into t3011

commit 8e3fd703d0
Merge: 507bb50 26e0ba0
Author: Russell Keith-Magee <russell@keith-magee.com>
Date:   Mon Aug 20 13:09:09 2012 +0800

    Merged recent changes from trunk.

commit 507bb50a92
Author: Russell Keith-Magee <russell@keith-magee.com>
Date:   Mon Jun 4 20:41:37 2012 +0800

    Modified auth app so that login with alternate auth app is possible.

commit dabe362836
Author: Russell Keith-Magee <russell@keith-magee.com>
Date:   Mon Jun 4 20:10:51 2012 +0800

    Modified auth management commands to handle custom user definitions.

commit 7cc0baf89d
Author: Russell Keith-Magee <russell@keith-magee.com>
Date:   Mon Jun 4 14:17:28 2012 +0800

    Added model Meta option for swappable models, and made auth.User a swappable model
2012-09-26 18:48:09 +08:00
Andrew Godwin 9234131c05 Remove weird syncdb managed thing - no longer needed. 2012-09-22 01:22:43 +01:00
Andrew Godwin d0b3536964 More schema test fixing 2012-09-17 21:16:36 +01:00
Mike Grouchy cb1614f7b3 Fixed #18611 -- Display current date/time when running runserver 2012-09-10 13:35:21 +02:00
Carl Meyer 307706d082 Fixed #18545 -- Make the 'no DJANGO_SETTINGS_MODULE' error message more useful.Thanks Nick Coghlan for the report, and Malcolm Tredinnick for review. 2012-09-08 14:26:33 -06:00
Claude Paroz ae88e73fa6 Replaced some smart_xxx by force_xxx equivalent
smart_str/smart_text should only be used when a potential lazy
string should be preserved in the result of the function call.
2012-08-30 15:46:16 +02:00
Aymeric Augustin 723c9a8c6d [py3] Ported the 'shell' management command.
The user module and the execfile function were removed in Python 3.

Thanks Linovia for the report.
2012-08-29 23:44:12 +02:00
Florian Apolloner 3afb5916b2 Fixed #18091 -- Non-ASCII templates break `django-admin.py startproject --template=TEMPLATE`.
Thanks to Claude Huchet and Tomáš Ehrlich for the patch.
2012-08-28 23:23:07 +02:00
Claude Paroz f5ea730dac Fixed #18843 -- Replaced more special chars in column names (inspectdb)
Thanks airstrike for the report.
2012-08-23 22:59:45 +02:00
Claude Paroz 395c6083af Fixed #12460 -- Improved inspectdb handling of special field names
Thanks mihail lukin for the report and elijahr and kgibula for their
work on the patch.
2012-08-23 21:46:57 +02:00
Claude Paroz 4353a6163c Fixed #18196 -- Improved loaddata error messages. 2012-08-21 21:52:25 +02:00
Claude Paroz fd58d6c258 Merge walk and find_files in makemessages command 2012-08-21 14:43:37 +02:00
Aymeric Augustin 16ab519f62 [py3] Removed gratuitous use of map/lambda
that causes a test failure on Python 3 because map returns an iterator.
2012-08-18 11:55:36 +02:00
Alex Gaynor 52c351a151 Fixed the erorr handling code for missing management commands. 2012-08-15 02:18:11 -07:00
Alex Gaynor 20a7a244d7 Make sure to explicitly close opened files. 2012-08-15 01:21:40 -07:00
Anssi Kääriäinen 4e7f04cdad [py3] Fixed file.read().decode(), used codecs.open() instead 2012-08-14 16:09:01 +03:00
Aymeric Augustin 0c198b85a3 [py3] Replace filter/lambda by list comprehensions
This is more idiomatic and avoids returning a list on Python 2 and
an iterator on Python 3.
2012-08-14 14:31:06 +02:00
Claude Paroz 0dac73ebd7 Removed binary flag to open files for writing text content 2012-08-13 18:23:26 +02:00
Claude Paroz 96a6912ec5 [py3] Fixed compilemessages tests 2012-08-08 23:40:20 +02:00
Claude Paroz b8e49d70f2 [py3] Replaced raw_input by input
The six addition has been borrowed from:
https://bitbucket.org/gutworth/six/changeset/733ef740
2012-08-08 19:53:11 +02:00
Alex Gaynor 4c97101b1f remove a bunch of unnescesarry iterkeys() calls 2012-08-08 07:33:15 -07:00
Aymeric Augustin a8b3ddec5f [py3] Applied minor fixes so the test suite starts 2012-08-07 12:00:22 +02:00
Aymeric Augustin c5ef65bcf3 [py3] Ported django.utils.encoding.
* Renamed smart_unicode to smart_text (but kept the old name under
  Python 2 for backwards compatibility).
* Renamed smart_str to smart_bytes.
* Re-introduced smart_str as an alias for smart_text under Python 3
  and smart_bytes under Python 2 (which is backwards compatible).
  Thus smart_str always returns a str objects.
* Used the new smart_str in a few places where both Python 2 and 3
  want a str.
2012-08-07 12:00:22 +02:00
Aymeric Augustin ee191715ea [py3] Fixed access to dict keys/values/items. 2012-08-07 12:00:22 +02:00
Marc Tamlyn a875f612e0 Fixed #18634 -- Don't escape variables in the context for startproject/startapp.
The & symbols which can come up in the secret key were
being escaped to &amp;.
2012-07-25 22:24:41 +02:00
Ramiro Morales f758bdab5e Fixed #18271 -- Changed stage at which TransactionTestCase flushes DB tables.
Previously, the flush was done before the test case execution and now
it is performed after it.

Other changes to the testing infrastructure include:

* TransactionTestCase now doesn't reset autoincrement sequences either
  (previous behavior can achieved by using `reset_sequences`.)
  With this, no implicit such reset is performed by any of the provided
  TestCase classes.

* New ordering of test cases: All unittest tes cases are run first and
  doctests are run at the end.

THse changes could be backward-incompatible with test cases that relied
on some kind of state being preserved between tests. Please read the
relevant sections of the release notes and testing documentation for
further details.

Thanks Andreas Pelme for the initial patch. Karen Tracey and Anssi
Kääriäinen for the feedback and Anssi for reviewing.

This also fixes #12408.
2012-07-24 17:24:16 -03:00
Aymeric Augustin 0d914d08a0 [py3] Updated urllib/urllib2/urlparse imports.
Lots of functions were moved. Use explicit imports in all cases
to keey it easy to identify where the functions come from.
2012-07-22 09:29:55 +02:00
Aymeric Augustin bdca5ea345 [py3] Replaced unicode/str by six.text_type/bytes. 2012-07-22 09:29:54 +02:00
Aymeric Augustin 3cb2457f46 [py3] Replaced basestring by six.string_types. 2012-07-22 09:29:54 +02:00
Aymeric Augustin cacd845996 [py3] Fixed remaining Python 3 syntax errors.
django.utils.unittest.* weren't touched -- they're only imported on Python 2.6.
2012-07-22 09:29:53 +02:00
Claude Paroz 423244bc6b Fixed #4680 -- Improved initial_sql parsing
In particular, allow the '--' sequence to be present in string
values without being interpreted as comment marker.
Thanks Tim Chase for the report and shaleh for the initial patch.
2012-07-21 14:24:29 +02:00
Claude Paroz c54905b359 Fixed #18479 -- Stopped makemessages raising error on gettext warnings
Thanks Niels Busch for the initial patch.
2012-07-18 20:43:35 +02:00
Claude Paroz 8184aff2b0 Fixed #18547 -- Improved error message when gettext is missing 2012-07-17 22:04:47 +02:00
Mike Grouchy f2abfe1e48 Adds interpreter option to shell command as per ticket #18639
Specify python interpreter interface ipython or bpython with the -i,
--interface options
argument.
 ex// python manage.py shell -i bpython
 ex// python manage.py shell --interface bpython

Like all other options, defaults to default python interpreter when your
selected choice isn't available.

updated documentation where appropriate
2012-07-17 13:45:35 -04:00
Alex Gaynor 76d5daa60f Changed `manage.py shell`'s help text to reflect that it can invoke bpython. 2012-07-10 14:26:42 -07:00
Claude Paroz 4b722b31e1 Fixed #16317 -- Fixed dumpdata for self-referencing models and natural keys
Thanks aldaran for the patch.
2012-06-24 19:54:56 +02:00
Claude Paroz 4a103086d5 Fixed #18269 -- Applied unicode_literals for Python 3 compatibility.
Thanks Vinay Sajip for the support of his django3 branch and
Jannis Leidel for the review.
2012-06-07 18:08:47 +02:00
Claude Paroz 6fd1950a4e Fixed #10200 -- Raised CommandError when errors happen in loaddata. 2012-06-07 10:32:10 +02:00
Claude Paroz f0664dc8ae Made TestNoInitialDataLoading pass with MySQL (Refs #15926) 2012-06-06 13:54:40 +02:00
Honza Kral fedac99c85 Fixed #15926 -- Added option --no-initial-data to syncdb and flush.
Thanks msiedlarek, jpaugh64 and vlinhart!
2012-06-05 16:46:15 +02:00
Ramiro Morales 72130385bf Made inspectdb tests deal with a smaller generated models.py file.
Implemented this by adding a stealth table_name_filter option for the
command.
2012-06-01 21:46:07 -03:00
Claude Paroz cc4b4d9fd3 Used CommandError in createcachetable command.
Raising CommandError whenever a management command meets an error
condition is the standard way to handle errors in commands.
2012-05-27 23:03:21 +02:00
Claude Paroz f2b6763ad7 Fixed #18387 -- Do not call sys.exit during call_command.
Moved sys.exit(1) so as failing management commands reach it
only when running from command line.
2012-05-27 20:38:47 +02:00
Claude Paroz 12f4bd74fc Removed unneeded sys import added in previous commit 2012-05-26 11:53:33 +02:00
Claude Paroz 3b5083bee5 Fixed #5423 -- Made dumpdata output one row at a time.
This should prevent storing all rows in memory when big sets of
data are dumped.
See ticket for heroic contributors.
2012-05-26 11:43:37 +02:00
Claude Paroz edfa95c22f Specified when open should use binary mode.
Thanks Vinaj Sajip for the help of his django3 branch.
2012-05-25 20:43:43 +02:00
Claude Paroz 822d6d6dab Fixed #18325 -- Wrapped self.stdout/stderr in OutputWrapper class 2012-05-19 13:51:54 +02:00
Claude Paroz bb4452f212 Fixed #18019 -- Use threaded runserver only when database supports it. 2012-05-15 09:21:10 +02:00
Claude Paroz d7dfab59ea Replaced cStringIO.StringIO by io.BytesIO.
Also replaced StringIO.StringIO by BytesIO in some other appropriate
places. StringIO is not available in Python 3.
2012-05-05 21:41:44 +02:00
Claude Paroz 865cd35c9b Made more extensive usage of context managers with open. 2012-05-05 14:06:36 +02:00
Aymeric Augustin e84f79f051 Fixed #18042 -- Advanced deprecation warnings.
Thanks Ramiro for the patch.
2012-05-03 15:27:01 +02:00
Anssi Kääriäinen 4fdd378beb Skip model validation when models are known good.
In some situations Django calls model validation when the models are
already known good. This is most visible in tests, which use flush
and loaddata commands. This resulted in around 10% overhead when
running tests under sqlite.
2012-05-01 08:40:04 +03:00
Claude Paroz 596cb9c7e2 Replaced print statement by print function (forward compatibility syntax). 2012-04-30 20:45:03 +02:00
Claude Paroz 3904b74a3f Fixed #18013 -- Use the new 'as' syntax for exceptions.
Thanks Clueless for the initial patch.
Note that unittest has been purposely left out (external package only used by Python 2.6).
2012-04-29 20:57:15 +02:00
Anssi Kääriäinen 527cce80dc Made table_names() output sorted.
Fixed #18218 -- previously Django's introspection table_names() and
get_table_list() methods did not sort the output consistently. This
resulted in random order of inspected models.

This commit also removed all external usages of get_table_list().
table_names() should be used instead.

Thanks to claudep for patch and report.
2012-04-29 02:11:55 +03:00
Adrian Holovaty 21f11e5280 Updated compilemessages and makemessages management commands to change SVN->Git references 2012-04-27 22:37:59 -05:00
Claude Paroz ddc5d59c6a Fixed #15076 -- Quoted ForeignKey target class names in inspectdb when class is defined below.
Thanks saschwarz for the report, jeff@deserettechnology.com for the initial patch and Ramiro Morales for the review. 


git-svn-id: http://code.djangoproject.com/svn/django/trunk@17942 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-04-27 06:56:31 +00:00
Claude Paroz c34d069a75 Removed direct print statements from django management commands.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17941 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-04-26 19:56:20 +00:00
Alex Gaynor 3c5ff9d703 Fixed #5893 -- Added a flag to FilePathField to allow listing folders, in addition to regular files. Thank you to Brian Rosner, for encouraging me to first contribute to Django 4 years ago.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17925 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-04-22 14:44:08 +00:00
Claude Paroz 5c53e30607 Fixed #18035 -- Removed deprecated AdminMediaHandler, as per official deprecation timeline. Thanks Jannis Leidel and Ramiro Morales for the review.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17879 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-04-08 21:13:32 +00:00
Aymeric Augustin d38690796c Removed the deprecated reset and sqlreset management commands.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17842 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-31 12:38:11 +00:00
Claude Paroz 23d3459761 Fixed #17965 -- Definitely dropped support for Python 2.5. Thanks jonash for the initial patch and Aymeric Augustin for the review.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17834 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-31 08:24:29 +00:00
Claude Paroz 9383a2761c Removed with_statement imports, useless in Python >= 2.6. Refs #17965. Thanks jonash for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17828 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-30 08:02:08 +00:00
Claude Paroz 8c54d7cf71 Fixed #17947 -- Fixed language restore after management command even when exceptions occur. Thanks andrey@kostenko.name for the report and the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17823 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-29 16:33:48 +00:00
Jannis Leidel 4219e2b7f8 Fixed #17920 -- Actually pass the full path of a newly created project or app in the template context as mentioned in the startproject docs. Many thanks to Preston Holmes for the initial patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17773 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-21 22:29:32 +00:00
Ramiro Morales c6425aafa5 Fixed #17820 -- Fixed more occurrences of redundant handling of management commands options.
They had been missen in the first attempts or had been introduced afterwards.

Refs #13760, #10080, #17799.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17678 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-10 17:50:59 +00:00
Carl Meyer 89b57a7c77 Added missing newline to makemessages output. Thanks Florian Apolloner for report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17631 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-02 20:34:46 +00:00
Paul McMillan 239e41f7c5 Cleanup to use get_random_string consistently.
Removes several ad hoc implementations of get_random_string()
and removes an innapropriate use of settings.SECRET_KEY.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@17580 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-23 21:39:12 +00:00
Adrian Holovaty 7981efe04f Documentation (and some small source code) edits from [17432] - [17537]
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17540 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-17 20:04:11 +00:00
Adrian Holovaty 7ecb6813c9 Fixed missing periods in django-admin help for startproject from [17432]
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17538 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-17 16:51:22 +00:00
Ramiro Morales a411242e94 Fixed #17676 -- Fixed introspection of column names that start with digit(s).
Thanks Gandalfar for the report and patch.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17509 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-11 20:53:48 +00:00
Jannis Leidel 538257b4ae Fixed #10080 -- Slightly extended the fix made in r10401 by also taking command line options into account that don't have have a default set. Thanks, Claude Paroz.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17467 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-09 18:56:41 +00:00
Aymeric Augustin 175e6d77df Fixed #11745 -- Grouped commands by application in the output of `manage.py help`. Made 'version' consistent with 'help' while I was in the area, and added tests. Thanks Jannis for the feedback and review.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17462 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-07 18:46:29 +00:00
Julien Phalip ad8ebb7006 Fixed #8317 -- Corrected the inspectdb management command to properly set `primary_key=True` and `unique=True` on foreign keys. Thanks to bthomas for the report and patch, and to David Gouldin for the tests.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17451 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-05 07:51:37 +00:00
Ramiro Morales 9b762d170a Made a couple of idiomatic changes in makemessages.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17449 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-04 22:12:58 +00:00
Ramiro Morales 2894ec71c9 Removed hard-coded root tree path in makemessages.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17448 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-04 21:44:31 +00:00
Ramiro Morales a4f68c1b40 Fixed undefined variable name in makemessages command code.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17446 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-04 20:02:46 +00:00
Julien Phalip d3154d1896 Fixed #8291 -- Allowed 'pk' to be used as an ordering option in `Model.Meta`. Thanks to peterd12 for the report and to evan_schulz, gruszczy, frog32 and David Gouldin for their work on the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17445 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-04 19:56:40 +00:00
Jannis Leidel c6065545ef Fixed #17628 -- Extended makemessages command to also ignore directories when walking, not only when looking for files. Thanks, Claude Paroz.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17441 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-04 18:27:24 +00:00
Jannis Leidel faeee611d6 Fixed #17517 -- Added `--name` option to startproject and startapp management commands to be able to render files without a file extension. Thanks, Florian Apolloner.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17432 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-04 13:01:30 +00:00
Jacob Kaplan-Moss e8e4293a48 Fixed #17078: properly invoke IPython 0.12.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17379 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-01-19 17:38:56 +00:00
Jannis Leidel aef0283f89 Fixed #17468 -- Made sure the project/app template management command tests correctly handle an existing directory on Windows.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17377 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-01-15 16:06:56 +00:00
Luke Plant 4e29b70b9d Fixed #17530 - Fixture loading with deferred constraints broken for Postgres for fixtures from multiple dirs/files
Thanks to claudep for the review.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17372 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-01-14 17:26:32 +00:00
Aymeric Augustin 19c544ff42 Fixed #17300 -- Prevented createcachetable from crashing when the cache table already exists. Thanks Claude Paroz.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17363 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-01-08 20:00:30 +00:00
Aymeric Augustin 40f0ecc56a Implemented PEP386-compatible version numbers. Thanks Jannis for the guidance.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17357 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-01-08 15:05:15 +00:00
Carl Meyer bc63ba700a Fixed #17503 -- A destination directory passed to startproject or startapp as optional second argument is now reused as the project/app directory, rather than a new project/app directory created within it. Refs #17042.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17340 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-01-04 23:55:34 +00:00
Ramiro Morales f250ef3573 Made sure startproject can handle template URLs with trailing slashes.
Thanks Issac Kelly that reported this via IRC.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17320 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-01-01 17:45:40 +00:00
Ramiro Morales a82204fa9a Moved validation of project names to an earlier spot so no directory with invalid name is created.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17288 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-29 19:06:57 +00:00
Ramiro Morales f185024fc4 Made sure the new project template functionality works when the template
path specified has a trailing path separator.

Thanks Alex for the report.

Fixes #17475.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17287 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-29 17:03:38 +00:00
Ramiro Morales 953a471a21 Made sure `manage.py help test` works.
Thanks shige DOT abe AT nasa DOT gov for the report.

Fixes #17477. Refs r16352.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17284 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-29 01:18:30 +00:00
Ramiro Morales 7c6e265a9f Refactored the internals of makemessages management command for better readability.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17261 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-23 11:24:35 +00:00
Jannis Leidel a9a0f0b03f Fixed #17042 -- Extended startproject and startapp management commands to better handle custom app and project templates. Many thanks to Preston Holmes for his initial patch and Alex Gaynor, Carl Meyer, Donald Stufft, Jacob Kaplan-Moss and Julien Phalip for code reviewing.
* Added ability to pass the project or app directory path as the second argument
* Added ``--template`` option for specifying custom project and app templates
* Cleaned up admin_scripts tests a little while I was there

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17246 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-22 22:38:02 +00:00
Julien Phalip 2f02a05ffb Fixed #2879 -- Added support for the integration with Selenium and other in-browser testing frameworks. Also added the first Selenium tests for `contrib.admin`. Many thanks to everyone for their contributions and feedback: Mikeal Rogers, Dirk Datzert, mir, Simon G., Almad, Russell Keith-Magee, Denis Golomazov, devin, robertrv, andrewbadr, Idan Gazit, voidspace, Tom Christie, hjwp2, Adam Nelson, Jannis Leidel, Anssi Kääriäinen, Preston Holmes, Bruno Renié and Jacob Kaplan-Moss.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17241 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-22 08:33:58 +00:00
Julien Phalip 45e3dff5ac Ensured that `makemessages` doesn't leave any temporary file over if the parsing of a template file fails. Refs #8536.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17240 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-21 15:35:58 +00:00
Adrian Holovaty 20c8aa2a20 Fixed various dodgy behaviours
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17226 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-17 17:37:24 +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
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
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 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
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
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
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
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
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
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
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
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
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
Paul McMillan d0979a5faf Fixed #6011 -- Improved help text for flush command. Thanks Julien for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16877 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-22 05:21:51 +00:00
Paul McMillan 1d96d886e7 Fixed #16026 -- loaddata now identifies which object triggered an error.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16873 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-22 04:30:20 +00:00
Julien Phalip 8f750bf6e5 Fixed #16897 -- Fixed some docstrings and help texts for the `makemessages` management command. Thanks, Simon Meers.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16864 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-21 17:25:13 +00:00
Alex Gaynor 8e1226b4a0 Kill some more dead code.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16795 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-10 22:46:44 +00:00
Jannis Leidel fb590bfa9b Replaced `has_key()` calls with `in` to ease Python 3 port. Thanks, Martin von Löwis.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16740 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-09 19:33:40 +00:00
Jannis Leidel ddaca29d3d Fixed a bunch of imports of the email stdlib module now that we are on Python 2.5 to ease the Python 3 port. Thanks, Martin von Löwis.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16731 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-09 16:18:38 +00:00
Malcolm Tredinnick 20473057d1 Modify validity check from r16678 slightly to work with Oracle.
We now skip this particular check on Oracle backends. Change is based on
a backend feature check, so it also works with other backends that may
treat NULL as equal to an empty string.

Fixes #16694 (with luck).

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16681 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-25 05:44:18 +00:00
Malcolm Tredinnick 75ddbf77a6 Teach "django-admin.py validate" to forbid nullable primary keys.
Fixes #15884, with thanks to JustinTArthur and Julie Pichon.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16678 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-23 23:43:29 +00:00
Malcolm Tredinnick 8560a2c080 Teach inspectdb to handle SQL column names that are digits.
There's no accounting for taste in the way some people name columns,
apparently. Create a column with a name of "1" and inspectdb will still
produce valid Python code now. Fixed #16536. Thanks tereaom and
danodonovan.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16641 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-22 02:46:59 +00:00
Jannis Leidel bce890ace4 Fixed #16584 -- Fixed a bunch of typos in code comments. Thanks, Bernhard Essl.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16598 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-12 14:14:15 +00:00
Karen Tracey be87f0b0ec Fixed #3615: Added support for loading fixtures with forward references on database backends (such as MySQL/InnoDB) that do not support deferred constraint checking. Many thanks to jsdalton for coming up with a clever solution to this long-standing issue, and to jacob, ramiro, graham_king, and russellm for review/testing. (Apologies if I missed anyone else who helped here.)
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16590 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-07 00:43:26 +00:00
Jannis Leidel 643239e7df Fixed #16477 -- Correct help text of an option of the dumpdata management command. Thanks, charettes.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16561 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-07-29 09:40:02 +00:00
Jannis Leidel 24f4764a48 Fixed #16225 -- Removed unused imports. Many thanks to Aymeric Augustin for the work on the patch and Alex for reviewing.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16539 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-07-13 09:35:51 +00:00
Jannis Leidel 89c302cf3f Rolled back r16510, r16513 and r16514 because it wasn't ready.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16515 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-07-05 14:16:37 +00:00
Jannis Leidel 6de65ab76f Fixed #15255 -- Stopped database cache from ignoring database routers when creating the cache table. Thanks, aaugustin.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16510 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-07-04 21:53:17 +00:00
Ramiro Morales 1d270ac8a3 Reverted [14563] because it introduced a dependency from core on a contrib app (contenttypes). Fixes #16283, Refs #3055. Thanks TheRoSS for the report and Aymeric Augustin for finding the problem.
This caused models shipped with some contrib apps to pollute the namespace when user's apps had the same name (e.g. auth, sites), even when these contrib apps weren't installed.

This undesired loading of contrib apps happened when model validation was executed, for example when running management commands that set or inherit `requires_model_validation=True`:
cleanup, dumpdata, flush, loaddata, reset, runfcgi, sql, sqlall, sqlclear, sqlcustom, sqlflush, sqlindexes, sqlinitialdata, sqlreset, sqlsequencereset, syncdb, createsuperusers, ping_google, collectstatic, findstatic.

This could also cause hard to diagnose problems e.g. when performing reverse URL resolving.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16493 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-07-03 16:20:48 +00:00
Jannis Leidel 63f9b67129 Added '.txt' to list of file extensions that the makemessages management command automatically scans. Refs #12202.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16437 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-06-19 11:24:25 +00:00
Jannis Leidel 54393493ef Fixed help message introduced in r16427.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16428 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-06-17 14:09:00 +00:00
Jannis Leidel ce165f7bbf Fixed #16099 -- Enabled threading for the runserver management command and added a --nothreading option to disable it if needed. This should help Google Chrome users because it opens more than one connection speculatively.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16427 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-06-17 13:08:36 +00:00
Russell Keith-Magee 046ffa483e Fixed #16185, #15675 -- Added the ability for test runners to define custom options, and to specify a custom test runner at the command line. Thanks to Dmitry Jemerov and Mikołaj Siedlarek for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16352 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-06-10 08:26:05 +00:00
Jannis Leidel 64e19ffb4e Fixed #7704, #14045 and #15495 -- Introduce a lexer for Javascript to fix multiple problems of the translation of Javascript files with xgettext. Many thanks to Ned Batchelder for his contribution of the JsLex library.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16333 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-06-07 16:11:25 +00:00