summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2013-12-30Fixed a broken link in docs/intro/tutorial01.txt.Tim Graham
2013-12-30Merge pull request #2126 from apollo13/email_bytesFlorian Apolloner
Many thanks to @bitdancer and @aaugustin for answering my stupid questions about (mail)encodings and pointing me in the right direction.
2013-12-30Fixed #21708 -- Added some headings to separate unrelated topics.Tim Graham
Thanks ashley at ashleymills.com for the suggestion.
2013-12-30Decode mails using the message encoding.Florian Apolloner
2013-12-30Changed console and filebackend to use msg.as_bytes to output the data as it ↵Florian Apolloner
would get send via smtp.
2013-12-30Fixed #21710 -- Documented User.get_short_name()Tim Graham
Thanks Keryn Knight for the report.
2013-12-30Merged Apps.populate_apps() and populate_models().Aymeric Augustin
After the recent series of refactorings, there's no reason to keep two distinct methods. Refs #21681.
2013-12-30Removed postponing in Apps.populate_models.Aymeric Augustin
To the best of my understanding, since populate_models() is now called as soon as Django starts, it cannot be called while a models module is being imported, and that removes the need for postponing. (If hell breaks loose we'll revert this commit.) Refs #21681.
2013-12-30Stopped populating the app registry as a side effect.Aymeric Augustin
Since it triggers imports, it shouldn't be done lightly. This commit adds a public API for doing it explicitly, django.setup(), and does it automatically when using manage.py and wsgi.py.
2013-12-30Populated Apps instances immediately by default.Aymeric Augustin
2013-12-30Updated advice on connecting signals at startup.Aymeric Augustin
2013-12-30Added AppConfig.setup() to run setup code.Aymeric Augustin
2013-12-30Populated the app registry earlier at startup.Aymeric Augustin
Refs #1796, #21676.
2013-12-30Avoided leaking state on exceptions in populate_models().Aymeric Augustin
2013-12-30Pointed intersphinx links to Python's default version.Aymeric Augustin
Currently it's 3.3.
2013-12-30Assumed Python 3 throughout docs/intro.Aymeric Augustin
Various small fixes while I was proof-reading.
2013-12-29Converted links to HTTPS and linked to stable docs.Aymeric Augustin
2013-12-29Stopped calling get_models() for a side effect.Aymeric Augustin
2013-12-29Deprecated the app argument of apps.get_models.Aymeric Augustin
Use app_config.get_models() instead.
2013-12-29Changed get_validation_errors to use an app config.Aymeric Augustin
2013-12-29Changed get_migratable_models to use an app config.Aymeric Augustin
2013-12-29Changed sql_* to use an app config instead of a models module.Aymeric Augustin
2013-12-29Used Apps.clear_cache() in tests that alter the app registry.Aymeric Augustin
2013-12-29Fixed stupid error in 21f22f95.Aymeric Augustin
2013-12-29Removed unused import.Aymeric Augustin
2013-12-29Removed obsolete docstring.Aymeric Augustin
2013-12-29Added Apps.clear_cache().Aymeric Augustin
This avoid leaking implementation details to tests that swap models.
2013-12-29Fixed a typo.Aymeric Augustin
Thanks Simon.
2013-12-29Added AppConfig.get_models().Aymeric Augustin
2013-12-29Cleared global templatetags module cache.Florian Apolloner
TOOOOO MUCH GLOBAL STATE (you didn't see that).
2013-12-29Replaced Options.object_name.lower() by Options.model_name.Aymeric Augustin
Thanks Simon for the suggestion. Also removed inappropriate lowercasing of app labels in migrations. Unlike model names, they are case sensitive.
2013-12-29Cleared get_models cache when swapping User model.Aymeric Augustin
Thanks Florian for isolating the shortest way to reproduce this issue: ./runtests.py \ django.contrib.auth.tests.test_context_processors.AuthContextProcessorTests.test_perms_attrs \ django.contrib.auth.tests.test_auth_backends.ChangedBackendSettingsTest.test_changed_backend_settings \ django.contrib.auth.tests.test_auth_backends.CustomUserModelBackendAuthenticateTest.test_authenticate \ django.contrib.auth.tests.test_basic.BasicTestCase.test_createsuperuser_management_command
2013-12-29Refactored the migration signals to use app configs.Aymeric Augustin
De-aliased pre/post_syncdb to pre/post_migrate to increase backwards-compatibility.
2013-12-29Skipped inclusion of scripts (pip will take care of that).Florian Apolloner
2013-12-28Added generation of SQLite FK DDL in initial migrations.Ramiro Morales
SQLite accepts the relevant standard SQL (although by default it doesn't enforce the constraint), and the 'traditional' creation backend helper generate it, so this allows us to: - Maintain the status quo - Improve readability of the SQL code generated for that backend. Also, we will need this for when we fix Refs #14204.
2013-12-28Fixed #21242 -- Allowed more IANA schemes in URLValidatorClaude Paroz
Thanks Sascha Peilicke for the report and initial patch, and Tim Graham for the review.
2013-12-28Removed the only_installed argument of Apps.get_models.Aymeric Augustin
Refs #15903, #15866, #15850.
2013-12-28Changed get_model to raise an exception on errors.Aymeric Augustin
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-28Simplified Apps.get_model and added AppConfig.get_model.Aymeric Augustin
Documented them as public APIs.
2013-12-28Stopped calling apps.get_model with only_installed=False.Aymeric Augustin
ContentTypes are only created for installed applications, and I could make a case for not returning a model that isn't installed any more. The check for stale ContentTypes in update_contenttypes doesn't use model_class. ModelSignal actually needs get_registered_model since the lookup happens at import time. I took this opportunity to perform a small refactoring.
2013-12-28Populated non-master app registries.Aymeric Augustin
This removes the gap between the master app registry and ad-hoc app registries created by the migration framework, specifically in terms of behavior of the get_model[s] methods. This commit contains a stealth feature that I'd rather not describe.
2013-12-28Introduced as_bytes for SafeMIMEText (and other SafeMIME-classes).Florian Apolloner
This is to provide a consistent interface (namely bytes) for the smtp backend which after all sends bytes over the wire; encoding with as_string yields different results since mails as unicode are not really specified. as_string stays for backwardscompatibilty mostly and some debug outputs. But keep in mind that the output doesn't match as_bytes!
2013-12-28Fixed doc indentation in previous commit.Tim Graham
2013-12-28Fixed #20346 -- Made cache middleware vary on the full URL.ijl
Previously, only the URL path was included in the cache key. Thanks jamey for the suggestion.
2013-12-28Worked around a bug in python 3.3.3. Refs #21093Florian Apolloner
2013-12-28Implemented #10164 for new schema migration code.Ramiro Morales
Made it use 'AUTOINCREMENT' suffix for PK creation. This way it doeesn't regress when compared with the 'traditional' DB backend creation infrastructure. Refs #10164.
2013-12-28Fixed #21093 -- Ensured that mails are not base64 encoded on python 3.3.3+.Florian Apolloner
Thanks to Arfrever for the report and Aymeric for the review.
2013-12-28Fixed #21618 -- Added hints about openlayers.js hostingClaude Paroz
Thanks kz26 for the report and Tim Graham for the excellent review.
2013-12-28Used app_label instead of appname.Aymeric Augustin
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-28Migrated built-in AppCommands to use handle_app_config.Aymeric Augustin