Questions tagged [template-inheritance]
59 questions
0
votes
2 answers
Flask template inheritance - not executing but no errors
I'm learning about template inheritance and I'm a little confused. When I navigate to index.html, I want the title to appear on the tab in my browser. And I want this functionality to be built into the base.html file, which I'm inheriting from, such…

jbuddy_13
- 902
- 2
- 12
- 34
0
votes
1 answer
How to print html form details on the same page after submit in flask?
The empty form without select values is displayed when I click submit. How to retain both image and select option with option list on the same page even after clicking submit. I have provided as much details as I could. Thanks in advance!!
This is…

Mansi Dhingra
- 39
- 1
- 9
0
votes
2 answers
jinja2.exceptions.TemplateSyntaxError in flask
I can't get rid of this exception and I have no idea what's wrong. Thanks for everything.
This is my python file
app = Flask(__name__)
@app.route("/login")
def login():
return render_template("login.html")
And this is my login.html
{% extends…

Oliver Hnat
- 797
- 4
- 19
0
votes
1 answer
Create different template class according to the basic type of the template
I will try to explain my problem with a simple example:
class Runnable
{
protected:
virtual bool Run() { return true; };
};
class MyRunnable : Runnable
{
protected:
bool Run()
{
//...
return true;
}
};
class…

Parminder Singh
- 145
- 8
0
votes
1 answer
Call a static method of a class derived from template without specifying template
I will try to explain my problem with a simple example:
class UselessClass {};
template
class Task : public RUNNABLE
{
public:
static void StartScheduler()
{
//Start system scheduler
…

Parminder Singh
- 145
- 8
0
votes
0 answers
leaflet_map not working when used in a extended template django
I am using django-leaflet to display on my website and It works fine and displays the map on browser when I include the leaflet_map in the base template but when I use leaflet_map on a template that extends that base template then map doesn't appear…

vikram
- 361
- 5
- 15
0
votes
2 answers
Populating foreign key fields in Django
In my first app (course) I'm creating courses. Each course has number of chapters and each chapter has quiz. I'm trying to create quiz using second app (quiz). models.py (quiz) :
class Quiz(models.Model):
coursechapter =…

ssapp
- 313
- 1
- 5
- 13
0
votes
1 answer
Inherit template in Django
I am able to render the home.html
and it prints Mary had a little lamb which is sitetitle
Here is the code for home.html
{{sitetitle}}
{% block fun %} {% endblock %}
But it is not rendering the fun…
Yugandhar Chaudhari
- 3,831
- 3
- 24
- 40
0
votes
1 answer
Inherit dynamic template in Phalcon Volt
I need to load a page, that will be "inserted" in a template - as I read it, Volt's Template Inheritance should do the trick and it does... kinda. Hardcoded values, as shown in the examples, work fine - the following example works: