简体   繁体   中英

Django: How to use local copy of base theme?

I am working in Django 1.10, and have inherited a project. The base.html template extends a theme template that is not included in the project:

{% extends "theme_base.html" %}

It seems there is another base theme repo, which is specified via a github URL in the requirements file. This all works seamlessly.

I now want to make a minor text change to the base theme, but I'm not sure how to do this and test the change locally.

I have checked out a copy of the theme repo locally, and installed it with:

pip install -U -e ../dc_base_theme

But when I make changes in that local repo, they don't appear in my running Django site on localhost.

How do I make sure my Django repo is pointing to that local copy of the theme?

is the theme_base.html file in the project folder correclty? for example, if you have a subfolders you shoud use it like:

{% extends 'template/theme_base.html' %}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM