2023-06-24
Goal
To fix the different fonts in the DIMMiN App so that posts look more similar.
Pomodoro
None, just troubleshooting today
Notes
The default font is Montserrat, so I'd like all of my posts to have their text in that font. This isn't a default font included in CKeditor, my RichTextEditor used to write my blog posts.
Of course, ChatGPT was a huge help here and recommended I change the static/ckeditor/ckeditor/config.js
file to include:
CKEDITOR.editorConfig = function( config ) {
// Define changes to default configuration here. For example:
// config.language = 'fr';
// config.uiColor = '#AADC6E';
config.font_names = 'Montserrat/Montserrat;' + config.font_names;
config.font_defaultLabel = 'Montserrat';
config.fontSize_defaultLabel = '12px';
};
Then to check and see that the font was added and set to default, I needed to log into the local version of the Admin page. I couldn't remember what accounts I had created so I printed which accounts I had created using the Django shell:
python manage.py shell
>>> from django.contrib.auth.models import User
>>> all_users = User.objects.all()
>>> for user in all_users: print(user.username, user.is_superuser)
This printed me out a list of the dummy accounts I had created and let me know that I had a local version of the BillyDataHayes admin. Interesting because I pulled this from GitHub and wasn't expecting those accounts to transfer over.
Anyways I checked out the Admin page and still couldn't find my new font in the RichTextEditor drop-down menu. I can see in the logs the actual GET requests such as
"GET /static/ckeditor/ckeditor/config.js?t=LAHF HTTP/1.1" 304 0
Which shows me that the config.js
file that I modified is being referenced.
Results
- Based on the
- Wrote the conclusion for Beauty is in the AI of the Beholder