Commit Graph

6670 Commits

Author SHA1 Message Date
Justin Bronn d45e24a1f8 Fixed #9955 -- Added `GoogleMapSet`, which enables multiple `GoogleMap` objects to placed on the same page; moved all templates to `google` parent dir, and added 'google-map.html' for an included example. Thanks to mandric for the ticket and aromano for initial patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10011 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-09 19:22:24 +00:00
Jannis Leidel a7ff8b79ff Updates German translation, fixes #10444
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10009 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-09 16:33:52 +00:00
Malcolm Tredinnick b4dd4d4bb7 Fixed #3163 -- Add a "Meta.managed" option to models.
This allows a model to be defined which is not subject to database table
creation and removal. Useful for models that sit over existing tables or
database views.

Thanks to Alexander Myodov, Wolfgang Kriesing and Ryan Kelly for the bulk of
this patch.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@10008 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-09 03:35:02 +00:00
Malcolm Tredinnick 98710a5a28 Made a couple of cross-references in the model fields documentaiton consistent.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10007 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-09 03:33:54 +00:00
Malcolm Tredinnick 059765fa6c Fixed #9436 -- Updated docs build code to create "new in development version".
Patch from Marc Fargas.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@10006 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-09 01:37:17 +00:00
Malcolm Tredinnick fedea84f3c Changed a few versionadded doc directives from "development" to "1.1".
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10005 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-09 01:36:53 +00:00
Malcolm Tredinnick 35f934f5a7 Pass values through get_db_prep_save() in a QuerySet.update() call.
This removes a long-standing FIXME in the update() handling and allows for
greater flexibility in the values passed in. In particular, it brings updates
into line with saves for django.contrib.gis fields, so fixed #10411.

Thanks to Justin Bronn and Russell Keith-Magee for help with this patch.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@10003 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-09 00:03:03 +00:00
Justin Bronn cee31735f7 Fixed #10072 -- `GMarker` overlays now have `draggable` option. Thanks to prairiedogg for ticket and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10002 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-08 18:34:24 +00:00
Malcolm Tredinnick 392f81cba9 Fixed #9626 -- Fixed a deletion race in the locmem cache.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9998 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-08 09:59:43 +00:00
Malcolm Tredinnick 6e415a5f90 Fixed #9508 -- Added an appropriate FileField.__hash__ implementation.
Required because we declare a custom __eq__ method.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@9997 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-08 09:59:17 +00:00
Malcolm Tredinnick d01c17e81d Fixed #9469 -- Apply the fix from r9189 to the WSGI handler as well.
This is a defensive encoding fix. No functionality change for correct URLs.
Patch from magneto.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@9996 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-08 09:58:40 +00:00
Malcolm Tredinnick 242fc60520 Fixed #9323 -- Allow glob loading in INSTALLED_APPS to handle digits in names.
Patch from carljm.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@9994 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-08 09:39:48 +00:00
Malcolm Tredinnick d8fdf4d7ac Fixed #9399 -- Added StopFutureHandlers to export list in file handling.
Thanks, George Vilches.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@9992 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-08 09:31:30 +00:00
Karen Tracey e8a817d499 Fixed #10433: Corrected typo in test doc. Thanks Matt Doran.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9989 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-08 04:31:05 +00:00
Malcolm Tredinnick cd99c62e2d Fixed #10432 -- Handle all kinds of iterators in queryset filters.
Only consumes the iterators once and works with Python 2.3.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@9986 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-08 03:32:16 +00:00
Justin Bronn f1ada99997 Maintenance refactor of the GDAL (OGR) ctypes interface. Changes include:
* All C API method explictly called from their prototype module, no longer imported via *.
* Applied DRY to C pointer management, classes that do so subclass from `GDALBase`.
* `OGRGeometry`: Added `from_bbox` class method (patch from Christopher Schmidt) and `kml` property.
* `SpatialReference`: Now initialize with `SetFromUserInput` (initialization is now more simple and flexible); removed duplicate methods.
* `Envelope`: Added `expand_to_include` method and now allow same coordinates for lower left and upper right points.  Thanks to Paul Smith for tickets and patches.
* `OGRGeomType`: Now treat OGC 'Geometry' type as 'Unknown'.

Fixed #9855, #10368, #10380.  Refs #9806.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@9985 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-07 23:02:48 +00:00
Malcolm Tredinnick 53da1e4794 Fixed #9649 -- Better error handling in model creation.
Previously, you could explicitly assign None to a non-null ForeignKey
(or other) field when creating the model (Child(parent=None), etc). We
now throw an exception when you do that, which matches the behaviour
when you assign None to the attribute after creation.

Thanks to ales.zoulek@gmail.com and ondrej.kohout@gmail.com for some
analysis of this problem.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@9983 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-06 04:51:05 +00:00
Malcolm Tredinnick b5d4a8ae1b Fixed #6710 -- Made DATABASE_OPTIONS work with postgresql_psycopg2 backend.
Thanks to rcoup for the patch.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@9981 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-06 02:36:56 +00:00
Malcolm Tredinnick 923f78f504 Improved table join handling for comparisons against NULL.
This fixes a broad class of bugs involving filters that look for missing
related models and fields. Most of them don't seem to have been reported
(the added tests cover the root cause). The exception is that this has
also fixed #9868.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@9979 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-06 02:02:09 +00:00
Justin Bronn 68f81c873d Fixed #10397 -- made GIS test runner compatible with changes in r9756.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9978 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-06 02:01:20 +00:00
Ian Kelly ad6ce1e6f9 Clarified documentation regarding Oracle's treatment of nulls and empty strings.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9976 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-05 20:21:22 +00:00
Malcolm Tredinnick 7197a4dcb7 Made it explicit if you accidentally override a Field from a parent model.
This was always not working reliably (model initialization and serialization
were two of the problems). Now, it's an explicit error. Also, documented.

Fixed #10252.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@9974 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-04 10:39:29 +00:00
Malcolm Tredinnick f9c8eeb311 Fixed #10406 -- Fixed some problems with model inheritance and pk fields.
Manually specifying both a OneToOneField(parent_link=True) and separate a
primary key field was causing invalid SQL to be generated. Thanks to Ramiro
Morales for some analysis on this one.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@9971 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-04 07:21:14 +00:00
Malcolm Tredinnick dfd7a6c781 Fixed #10251 -- Fixed model inheritance when there's also an explicit pk field.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9970 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-04 07:20:08 +00:00
Malcolm Tredinnick 0e93f60c7f Fixed #10362 -- An update() that only affects a parent model no longer crashes.
This includes a fairly large refactor of the update() query path (and
the initial portions of constructing the SQL for any query). The
previous code appears to have been only working more or less by accident
and was very fragile.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@9967 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-04 05:34:01 +00:00
Malcolm Tredinnick 14c8e5227a Changed the row count value returned from update queries in some cases.
If an update only affected an ancestor model (not the child), we were
returning 0 for the number of rows updated. This could have been
misleading if the value is used to detect an update occuring. So we now
return the rowcount from the first non-trivial query that is executed
(if any). Still a slight compromise, but better than what we had.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@9966 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-04 05:33:23 +00:00
Malcolm Tredinnick c7a1a9f380 Changed the handling of as_sql() versus _as_sql() in Query/QuerySet from r9928.
This avoids inadvertently hiding AttributeError that is raised for other
reasons.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@9965 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-04 04:56:20 +00:00
Malcolm Tredinnick f5063914b3 Fixed #10381 -- Fixed some a machine-dependent test failure after r9921.
The patch is from Russell, but I'm applying it because I want my tests to pass
again (and he doesn't see the failure).

git-svn-id: http://code.djangoproject.com/svn/django/trunk@9964 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-04 04:53:15 +00:00
Justin Bronn 9b8c712ca7 Fixed #10159 -- `F()` expressions now work on geographic fields. The tests are in `relatedapp`, which has been retrofitted to work with Oracle (minus the prior offending tests). I'm back.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9963 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-03 22:10:15 +00:00
Malcolm Tredinnick 7b55da0501 Final piece (he says, hopefully) of r9945 changes.
This time, "django-admin.py diffsettings" is fixed.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@9961 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-03 02:48:02 +00:00
Malcolm Tredinnick fdca9e55e8 Fixed #10395 -- Fixed more fallout from r9945.
(Simultaneously, stop django.contrib.gis using some internal attribute when
there's a perfectly good public property available to do the same thing.)

git-svn-id: http://code.djangoproject.com/svn/django/trunk@9960 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-03 02:45:15 +00:00
Malcolm Tredinnick 5e8ddd59e2 Minor update to documentation for many-to-many filter() calls.
Removed a potential ambiguity when describing how multiple conditions in one
filter() call are handled.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@9958 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-03 01:40:47 +00:00
Jarek Zgoda d79655bdc9 Updated Czech localflavor in Polish translation
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9955 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-02 08:49:47 +00:00
Malcolm Tredinnick 00d89f80a5 Fixed #10392 -- Fixed an oversight from the refactoring in r9945.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9953 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-02 08:24:14 +00:00
Malcolm Tredinnick dfddf129f0 Fixed #9701 -- Added a "safeseq" template filter.
This is like "safe", except it operates on the individual elements of a
sequence, rather than treating the whole argument as a string.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@9952 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-02 08:16:33 +00:00
Malcolm Tredinnick 851461aa72 Fixed #10181 -- Handle an EmptyResultSet exception case properly in nested querysets.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9951 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-02 06:08:02 +00:00
Malcolm Tredinnick a605a8fe08 Small edit to the caching docs.
Turns out, super-lightning is not faster than normal lightning. :-)

git-svn-id: http://code.djangoproject.com/svn/django/trunk@9949 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-02 05:46:04 +00:00
Malcolm Tredinnick a08267bf6a Removed some import-time dependencies on Django's settings.
Now you can import the file storage stuff and still call settings.configure()
afterwards. There is still one import-time usage of settings in
django.contrib.comments, but that's unavoidable.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@9946 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-02 04:48:47 +00:00
Malcolm Tredinnick cf3071242a Factor out some common pieces of django.conf.LazySettings.
This is in preparation for some reuse elsewhere in the core code.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@9945 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-02 04:48:22 +00:00
Malcolm Tredinnick ec710220dd Fixed some test output in the wake of r9940.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9944 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-02 04:17:00 +00:00
Malcolm Tredinnick 8f28a84a98 The database cache wasn't correctly handling expired keys. Fixed now.
The cache tests have been failing for a long time with the db backend. This
change makes them pass again, so no test changes required here.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@9942 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-02 03:15:27 +00:00
Malcolm Tredinnick e2cb2725eb Fixed #10013 -- Updated French translation.
Thanks, Claude Paroz and Stéphane Raimbault

git-svn-id: http://code.djangoproject.com/svn/django/trunk@9941 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-02 00:33:37 +00:00
Malcolm Tredinnick 79f6cce291 Fixed #10385 -- Fixed a typographical error in the Czech regions list.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9940 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-02 00:26:55 +00:00
Jannis Leidel 2c338d7570 Updated German translation, fixes #10189. Thanks julianb
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9938 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-01 14:23:40 +00:00
Malcolm Tredinnick b740706707 Changed the way cache specifiers are parsed.
Allows us to reuse the same code in multiple places, avoiding new and
interesting bugs (the testing framework had a DIY version that was slightly
wrong, for example). Fixed #9833.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@9936 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-01 08:13:38 +00:00
Malcolm Tredinnick d77236960a Fixed #9548 -- Correctly detect existence of empty sessions with cache backend.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9934 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-01 07:32:41 +00:00
Malcolm Tredinnick 70911bf98d Fixed #8737 -- Made the PostgreSQL version number detection more flexible.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9931 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-01 07:18:57 +00:00
Malcolm Tredinnick 238477f90c Fixed #8706 -- Improved the way we detect available database backends.
Thanks, victor@egenix.com.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@9930 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-01 07:12:38 +00:00
Malcolm Tredinnick 152d517878 Fixed a misnamed test that was inadvertently hiding an earlier one.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9929 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-01 06:54:38 +00:00
Malcolm Tredinnick 3242df16e4 To avoid an unfortunately common user-error, rename QuerySet.as_sql().
This was never a public API method, so this is backwards compatible, unless
you're poking at the internals. Refs #10352.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@9928 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-01 04:12:30 +00:00