Skip to content
This repository has been archived by the owner on Jun 3, 2019. It is now read-only.

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

Open
spitfiredd opened this issue Mar 12, 2018 · 1 comment
Open

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

spitfiredd opened this issue Mar 12, 2018 · 1 comment

Comments

@spitfiredd
Copy link

spitfiredd commented Mar 12, 2018

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.

@MaxHalford
Copy link
Owner

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants