Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <h1>1</h1> <p>I think you're getting too picky here. If you absolutely need control over such minute details you should create your own views instead of using the admin. Otherwise stacked is what you want because tabular doesn't make much sense for one-to-one relations.</p> <h1>2</h1> <p>I've been able to use fieldsets in user profiles. The only difference between my code and yours seems to be that I'm using tuple's instead of dict's. Here's mine for comparison:</p> <pre><code>class UserProfileInline(admin.StackedInline): model = UserProfile class MyUserAdmin(UserAdmin): inlines = [UserProfileInline] fieldsets = ( (None, {'fields': ('username', 'password')}), (_('Personal info'), {'fields': ('first_name', 'last_name', 'email')}), (_('Permissions'), {'fields': ('is_staff', 'is_active', 'is_superuser')}), (_('Important dates'), {'fields': ('last_login', 'date_joined')}), (_('Groups'), {'fields': ('groups',)}), ) exclude = ['user_permissions'] </code></pre> <p><strong>EDIT</strong>:</p> <p>I just did a quick check and the "#1" is coming from the admin template.</p> <p>This means you can easily remove it by overriding the stock admin template, although this will affect all your inlines including ones that are one-to-many.</p> <p>The stacked inline template can be found in <code>django/contrib/admin/templates/admin/edit_inline/stacked.html</code></p> <p>This means you can copy the template to your own templates directory as <code>templates/admin/edit_inline/stacked.html</code> and this will be loaded by Django at run time instead of the stock template.</p> <p>After copying edit your local copy to remove <code>#{{ forloop.counter }}</code> on line 9.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload