Skip to content

What tags deos pongo uses of declared structs struct? #345

Description

@chauhan17nitin

Suppose i have a struct like below

type Person struct {
Name string `json:"name"`
}

Now when wrapping my response in pongo context like below

dataContext := pongo2.Context{
    "person": person,
}

ctx.HTML(200, "user.html", dataContext)

in the HTML

{{person.name}} will not work, only {{person.Name}} works which means pongo using default fields names of struct.

Is there any way i can specify my field name manually for this?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions