db_parameters should respect an already existing db_type method and
return that as its type string. In particular, this was causing some
fields from gis to not be generated.
Thanks to @bigsassy and @blueyed for their work on the patch.
Also fixed#22260
Since d2e242d16c6dde6f4736086fb38057424bed3edb made isinstance()
calls work correctly on LazyObject, we can simplify the
implementation of is_local_storage added in
7e27885c6e.
By removing the absolute positioning of the usertools div and using
float positioning, the #header div will expand based on the height of
its content.
Thanks EvilDMP for the report.
Added the following scripts:
* Lithuanian (thanks to petraszd for the patch)
* Serbian (thanks to offy)
* Azerbajani (thanks to Ali Ismayilov)
Fixed the following issues:
* In Polish character map, some uppercase letters were
converted to a lowercase ascii equivalent.
* The letter Y with a diaeresis had a lowercase version but no uppercase.
The code was also simplified and cleaned up:
* Use of `var` statements everywhere
* Systematic use of semicolons
* Proper looping over arrays and objects.
Thanks to @oinopion for his help in getting the javascript
into proper shape.
Fixes#8561, #11035.
GenericRelation now supports an optional related_query_name argument.
Setting related_query_name adds a relation from the related object back to
the content type for filtering, ordering and other query operations.
Thanks to Loic Bistuer for spotting a couple of important issues in
his review.
Allows custom behavior for setting initial form data in ModelAdmin.
By default, initial data is set via GET params. The new method allows
this behavior to be overridden.
Thanks egasimus for the suggestion.
This option is not actually very useful in the general case
because it doesn't override sys.stdin.
It's still marginally useful for testing some features of
the createsuperuser command so it was moved there.
This commit also makes the detection of a TTY in createsuperuser
a bit more robust, after a suggestion of appolo13.
Flatten a level of sublists before checking for duplicate fields.
When given sublists such as:
```python
class FooAdmin(admin.ModelAdmin):
fields = ('one', ('one', 'two'))
```
The previous code did not correctly detect the duplicated 'one' field.
Thanks to jwa for the report.
Commit 4523fcd introduces _actions_icnt to the local scope,
which overrides the value set in the HTML.
The admin would incorrectly show selected rows in a change list
as "1 of undefined selected".
Before 4befb30 the detection was broken because we used isinstance
against a LazyObject rather than against a Storage class. That commit
fixed it by looking directly at the object wrapped by LazyObject.
This could however be a problem to anyone who subclasses the
collectstatic management Command and directly supplies a Storage class.
Refs #21581.
ForeignKey or ManyToManyField attribute ``limit_choices_to`` can now
be a callable that returns either a ``Q`` object or a dict.
Thanks michael at actrix.gen.nz for the original suggestion.