Skip to content
This repository was archived by the owner on Sep 18, 2022. It is now read-only.
This repository was archived by the owner on Sep 18, 2022. It is now read-only.

Deprecate HTML() in favor of TemplateInclude() #101

@phretor

Description

@phretor

The HTML() element is dangerous because it goes beyond the boundaries of clean Django/Python coding and, more importantly, it has nothing to do with the layout stuff.

We all know it comes very handy sometimes when you have to add a small piece of text, but one day one could be very well type HTML("<input ... />").

I propose the following:

  • remove HTML() and replace it with Text("hey daddy!", attrs={'class': 'foo'}) (which renders to <p class="foo">hey daddy!</p>)
  • introduce TemplateInclude("foo/snippet.html") that does exactly what it says, it adds the equivalent of {% include 'foo/snippet.html' %} during template rendering.

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