Link to love recipients explore page after sending love.#27
Link to love recipients explore page after sending love.#27rockdog wants to merge 1 commit intoYelp:masterfrom
Conversation
rockdog
commented
Mar 10, 2017

| @@ -0,0 +1,11 @@ | |||
| # -*- coding: utf-8 -*- | |||
| from dominate.tags import a | |||
There was a problem hiding this comment.
Do you plan on making more use of this in the future, e.g. for manipulating the DOM? It seems overkill to add the library just to generate <a href="...">...</a>.
There was a problem hiding this comment.
Maybe. I can‘t say right now.
I just didn‘t feel like building tag(s) myself and re-implementing the wheel. And since this lib seems kind of maintained and has no other dependencies I felt okay adding it.
There was a problem hiding this comment.
How are you reimplementing the wheel?
a(employee, href=url_for('explore', user=employee)).render()
'<a href="{}">{}</a>'.format(url_for('explore', user=employee), employee)
I'm generally wary of adding these kinds of dependencies, it's just one more thing to maintain that adds bloat to our project. And it's not like a) we expect changes to how a tags are built that this package will cover for us; or b) that we not already have folders full of HTML. I consider this a general feeling of not wanting to put HTML markup in a "code" file, while the library just hides the fact that you do this.