Skip to content

help_text for foreign key field being used for field name #308

@mscheper

Description

@mscheper

My model class (only partially shown):

class Profile(models.Model):
    user = models.OneToOneField(
        User,
        null=True,
        blank=True,
        on_delete=models.SET_NULL,
        editable=False,
        help_text="The user associated with this profile, if it is a user profile. This "
        "must be null if a category is set.",
    )

My admin class (also only partially shown):

@admin.register(Profile)
class ProfileAdmin(ImportExportModelAdmin, ReverseModelAdmin):
    inline_type = "stacked"
    inline_reverse = (
        (
            "user",
            {"fields": ("username", "first_name", "last_name", "email", "is_active")},
        ),
    )

How it looks:
Image

Just 'User' would be better. Being able to set the title in some other way would be nice. Displaying the help_text would also be helpful, I suppose, but not like that!

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions