flask-boilerplate icon indicating copy to clipboard operation
flask-boilerplate copied to clipboard

Why are you hard coding the urls in layout.html?

Open spitfiredd opened this issue 6 years ago • 1 comments

Hey, I really like this boilerplate for far. I've made a few changes to it but overall it was exactly what I was looking for.

One question I've had is there a reason you chose to hardcode the user blueprint urls over using jinga's url_for?

For example you have:

<!-- layout.html -->
# stuff
{% if current_user.is_authenticated %}
<div class="item">
    <a class="ui primary button" href="/user/account">{{ current_user.full_name }}</a>
</div>

Which I changed to

<div class="item">
    <a class="ui primary button" href="{{ url_for('userbp.account') }}">{{ current_user.full_name }}</a>
</div>

It gets the same results, but not sure why you chose one way over the other.

spitfiredd avatar Mar 12 '18 01:03 spitfiredd

Because I did this years ago! Live and learn :). I have to get back to this repo and clean it up. I've been really busy with other projects.

MaxHalford avatar Jun 04 '18 09:06 MaxHalford