coderedcms
coderedcms copied to clipboard
What files can/should I edit? only the templates directory?
I have added files to the templates directory from the coderedcms source and made a few tweaks to the html. This works fine
I tried to make a few further changes to files not within the templates directory and when I run the project I don't see any changes. I'm a bit confused how my installation pulls from the github source. In the templates directory it seems I can overwrite one of these files -however outside this directory no changes I make seem to take. For example I downloaded the forms.py file and changed some of the wording (text), but when I run my project these changes are not there.
I'm guessing at the permissions and settings here, but I assume I should only edit files in the templates folder? Does something block me from overwriting files in coderedcms directory?
The template overriding behavior is a feature of Django. Any template which shares the same relative name/path in a Django app will override any other templates with the same name/path from other Django apps.
This behavior is exclusive to Django templates only. I'd recommend reading up on it: https://docs.djangoproject.com/en/4.0/howto/overriding-templates/
If you're wanting to override features of Python classes (e.g. forms), you can use standard Python inheritance techniques. I'd recommend starting here to learn how to do that: https://realpython.com/inheritance-composition-python/
Closing due to inactivity. Please re-open if you discover any issues.