Issue
0
`vectorizer = TfidfVectorizer(analyzer='word',norm=None, use_idf=True,smooth_idf=True) tfIdfMat = vectorizer.fit_transform(df['Description']) feature_names = sorted(vectorizer.get_feature_names())
docList=['df.Description'] #skDocsTfIdfdf = pd.DataFrame(tfIdfMat.todense(),index=sorted(docList), columns=feature_names) #print(skDocsTfIdfdf)
for col in tfIdfMat.nonzero()[1]: print (feature_names[col], '-' , tfIdfMat[0, col])`
Solution
The way I would do the title is have something like this in your base.html file
{% if title %}
<title>Home - {{title}}</title>
{%else%}
<title>Home</title>
{%endif%}
And then for each of your routes when you render the template you can set a title, if no title is set then the title will just be Home.
For example
retrun render_template("about.html", title = "About")
Would give you the title "Home - About"
If you want to use your method of doing it, I think what you have done should work, but in the base.html file you can change {% endblock title %}
to just
{%endblock%}
, and do the same in the other html file. Maybe that will solve your issue?
I hope that helps, sorry if I have misunderstood what you wanted.
Answered By - MarcusWilliams
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.