Override brabeion templates path in Django
-
28-06-2021 - |
Question
I'm using brabeion in my project and I noticed that it comes with a urls.py and a views.py files, the problem is that it doesn't come with the respective templates required for the views to work.
I found this in the brabeion's source:
views.py:
return render_to_response("brabeion/badges.html", {
"badges": sorted(badges_dict.items()),
}, context_instance=RequestContext(request))
Since it doesn't come with any template file, how can I make it to use my own?
I've tried creating a template file named "badges.html" and placing it in my template folder, but it was useless. There has to be a way to use the existing views with my own templates.
Thanks!
Solution
Create a folder named brabeion
in your templates directory (templates/brabeion) and then place the requested html files.
Don't forget to set you TEMPLATE_DIRS
variable to point to the templates folder in the settings.py
.