summaryrefslogtreecommitdiff
path: root/django/db
AgeCommit message (Collapse)Author
2013-06-10Added TransactionTestCase.available_apps.Aymeric Augustin
This can be used to make Django's test suite significantly faster by reducing the number of models for which content types and permissions must be created and tables must be flushed in each non-transactional test. It's documented for Django contributors and committers but it's branded as a private API to preserve our freedom to change it in the future. Most of the credit goes to Anssi. He got the idea and did the research. Fixed #20483.
2013-06-10Added a stealth option to flush to allow cascades.Aymeric Augustin
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-09Replaced a dict emulating a set with a set.Aymeric Augustin
2013-06-07Initial stab at a migrate command, it's probably quite a way off.Andrew Godwin
2013-06-07Auto-naming for migrations and some writer fixesAndrew Godwin
2013-06-07Autodetector testsAndrew Godwin
2013-06-07Field encodingAndrew Godwin
2013-06-07A bit of an autodetector and a bit of a writerAndrew Godwin
2013-06-07Merge remote-tracking branch 'core/master' into schema-alterationAndrew Godwin
Conflicts: django/db/models/fields/related.py
2013-06-06Fixed #20564 -- Generic relations exclude() regressionAnssi Kääriäinen
The patch for #19385 caused a regression in certain generic relations .exclude() filters if a subquery was needed. The fix contains a refactoring to how Query.split_exclude() and Query.trim_start() interact. Thanks to Trac alias nferrari for the report.
2013-06-04Fixed #17601 -- expose underlying db exceptions under py2James Aylett
Use __cause__ to expose the underlying database exceptions even under python 2.
2013-06-02Added get_app_paths() to the AppCache.Aymeric Augustin
This method is useful to discover files inside apps.
2013-06-01Fixed #20337 -- Clarified error message when database relation is not allowed.Dan Loewenherz
2013-05-30Remove debug printsAndrew Godwin
2013-05-30Use correct model versions for field operationsAndrew Godwin
2013-05-30Fix error in ModelState.clone() not copying deep enoughAndrew Godwin
2013-05-30Add an Executor for end-to-end runningAndrew Godwin
2013-05-30Allow retrieval of project state at start of migrationsAndrew Godwin
2013-05-30Fixed #16856 - Added a way to clear select_related.Tim Graham
Thanks Carl for the suggestion and David Cramer for the patch.
2013-05-30Fixed #20272 - Moved update_fields existence check into Model._do_update.Tim Graham
Thanks Gavin Wahl.
2013-05-30Fixed #16436 -- defer + annotate + select_related crashTai Lee
Correctly calculate the ``aggregate_start`` offset from loaded fields, if any are deferred, instead of ``self.query.select`` which includes all fields on the model. Also made some PEP 8 fixes.
2013-05-29Start adding operations that work and tests for themAndrew Godwin
2013-05-27Fixed #20014 -- implemented get_key_columns() for OracleShai Berger
Thanks Aymeric Augustin for reporting
2013-05-27Fixed #20501 -- failure of datetime queries with timezones under OracleShai Berger
2013-05-27Fixed #16137 - Removed kwargs requirement for QuerySet.get_or_createTim Graham
Thanks wilfred@, poirier, and charettes for work on the patch.
2013-05-27Fixed #17582 - Added message to DoesNotExist exceptions.Tim Graham
Thanks simon@ for the suggestion and JordanPowell for the initial patch.
2013-05-27Fixed #20507 -- SubqueryConstraint alias handlingAnssi Kääriäinen
MySQL should work now, too.
2013-05-27Fixed #20507 -- SubqueryConstraint alias relabelingAnssi Kääriäinen
The SubqueryConstraint defined relabeled_clone(), but that was never called. Instead there is now clone() and relabel_aliases() methods for SubqueryConstraint. A related problem was that SubqueryConstraint didn't correctly use quote_name_unless_alias() of the outer query. This resulted in failures when running under PostgreSQL.
2013-05-26Replaced `and...or...` constructs with PEP 308 conditional expressions.Ramiro Morales
2013-05-24Fixed a regression in router initializationClaude Paroz
Regression was introduced in 6a6bb168b. Thanks Bas Peschier for the report.
2013-05-24Optimisation in prefetch_related_objectsLuke Plant
2013-05-24Fixed #19607 - prefetch_related crashLuke Plant
Thanks to av@rdf.ru and flarno11@yahoo.de for the report.
2013-05-23Delayed settings.DATABASE_ROUTERS usage by ConnectionRouterClaude Paroz
Refs #20474.
2013-05-23Delayed settings.DATABASES usage by ConnectionHandlerClaude Paroz
Refs #20474.
2013-05-23Fixed #20474 -- Proxied and deprecated django.db.backendClaude Paroz
2013-05-23Fixed #11398 - Added a pre_syncdb signalDonald Stufft
2013-05-22Fixed #20463 -- Made get_or_create more robust.Aymeric Augustin
When an exception other than IntegrityError was raised, get_or_create could fail and leave the database connection in an unusable state. Thanks UloPe for the report.
2013-05-22Fixed #20012 -- test_year_lookup_edge_case fails under OracleShai Berger
Used formatted date instead of datetime object for the end of the year range, as the datetime object loses fractions-of-seconds when inserted into the db.
2013-05-22Fixed #20015 -- date__startswith('2008') fails under OracleShai Berger
Removed the explicit casting of strings to dates
2013-05-22Fixed #20453 -- inspectdb test failure on OracleShai Berger
2013-05-21Fixed #18702 -- Removed chunked reads from QuerySet iterationAnssi Kääriäinen
2013-05-21Fixed #19326 -- Added first() and last() methods to QuerySetSelwin Ong
2013-05-21(Re-)moved some importsClaude Paroz
2013-05-20Fixed #9321 -- Deprecated hard-coding of help text in model ManyToManyField ↵Ramiro Morales
fields. This is backward incompatible for custom form field/widgets that rely on the hard-coded 'Hold down "Control", or "Command" on a Mac, to select more than one.' sentence. Application that use standard model form fields and widgets aren't affected but need to start handling these help texts by themselves before Django 1.8. For more details, see the related release notes and deprecation timeline sections added with this commit.
2013-05-20Fixed #20278 -- ensured .get() exceptions do not recurse infinitelyAnssi Kääriäinen
A regression caused by d5b93d3281fe93cbef5de84a52 made .get() error reporting recurse infinitely on certain rare conditions. Fixed this by not trying to print the given lookup kwargs.
2013-05-20Fixed #20378 -- regression in GenericRelation on abstract modelAnssi Kääriäinen
When a GenericRelation was defined on abstract model, queries on childs of the abstract model didn't work. The problem was in the way fields and in particular field.rel was copied from models to their children. The regression was likely caused by #19385. Thanks to Gavin Wahl for spotting the regression.
2013-05-20Fixed qs.values() regression when used in subqueryAnssi Kääriäinen
2013-05-19Changed API to disable ATOMIC_REQUESTS per view.Aymeric Augustin
A decorator is easier to apply to CBVs. Backwards compatibility isn't an issue here, except for people running on a recent clone of master. Fixed a few minor problems in the transactions docs while I was there.
2013-05-19Fixed test failures with Oracle when pytz isn't installed.Aymeric Augustin
Thanks Shai Berger for the report.
2013-05-19Merge pull request #1160 from erikr/host-inet-postgres2Aymeric Augustin
Fixed #11442 -- Postgresql backend casts all inet types to text