mirror of
				https://github.com/django/django.git
				synced 2025-10-26 07:06:08 +00:00 
			
		
		
		
	Fixed #7893 -- Gave fieldsets dictionary options a better visual display to set aside from other options in the ModelAdmin due to some name clashing causing confusion.
				
					
				
			git-svn-id: http://code.djangoproject.com/svn/django/trunk@8706 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
		| @@ -118,8 +118,9 @@ in the same order as the fields are defined in the model. | |||||||
|  |  | ||||||
| The ``field_options`` dictionary can have the following keys: | The ``field_options`` dictionary can have the following keys: | ||||||
|  |  | ||||||
| ``fields`` |     * ``fields`` | ||||||
|     A tuple of field names to display in this fieldset. This key is required. |         A tuple of field names to display in this fieldset. This key is | ||||||
|  |         required. | ||||||
|          |          | ||||||
|         Example:: |         Example:: | ||||||
|          |          | ||||||
| @@ -127,15 +128,15 @@ The ``field_options`` dictionary can have the following keys: | |||||||
|             'fields': ('first_name', 'last_name', 'address', 'city', 'state'), |             'fields': ('first_name', 'last_name', 'address', 'city', 'state'), | ||||||
|             } |             } | ||||||
|              |              | ||||||
|     To display multiple fields on the same line, wrap those fields in their own |         To display multiple fields on the same line, wrap those fields in | ||||||
|     tuple. In this example, the ``first_name`` and ``last_name`` fields will |         their own tuple. In this example, the ``first_name`` and ``last_name`` | ||||||
|     display on the same line:: |         fields will display on the same line:: | ||||||
|  |  | ||||||
|             { |             { | ||||||
|             'fields': (('first_name', 'last_name'), 'address', 'city', 'state'), |             'fields': (('first_name', 'last_name'), 'address', 'city', 'state'), | ||||||
|             } |             } | ||||||
|  |  | ||||||
| ``classes`` |     * ``classes`` | ||||||
|         A list containing extra CSS classes to apply to the fieldset. |         A list containing extra CSS classes to apply to the fieldset. | ||||||
|          |          | ||||||
|         Example:: |         Example:: | ||||||
| @@ -145,13 +146,14 @@ The ``field_options`` dictionary can have the following keys: | |||||||
|             } |             } | ||||||
|  |  | ||||||
|         Two useful classes defined by the default admin-site stylesheet are |         Two useful classes defined by the default admin-site stylesheet are | ||||||
|     ``collapse`` and ``wide``. Fieldsets with the ``collapse`` style will be |         ``collapse`` and ``wide``. Fieldsets with the ``collapse`` style will | ||||||
|     initially collapsed in the admin and replaced with a small "click to expand" |         be initially collapsed in the admin and replaced with a small | ||||||
|     link. Fieldsets with the ``wide`` style will be given extra horizontal space. |         "click to expand" link. Fieldsets with the ``wide`` style will be | ||||||
|  |         given extra horizontal space. | ||||||
|  |  | ||||||
| ``description`` |     * ``description`` | ||||||
|     A string of optional extra text to be displayed at the top of each fieldset, |         A string of optional extra text to be displayed at the top of each | ||||||
|     under the heading of the fieldset. |         fieldset, under the heading of the fieldset. | ||||||
|  |  | ||||||
|         Note that this value is *not* HTML-escaped when it's displayed in |         Note that this value is *not* HTML-escaped when it's displayed in | ||||||
|         the admin interface. This lets you include HTML if you so desire. |         the admin interface. This lets you include HTML if you so desire. | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user