2024-12-04-Wednesday
created: 2024-12-04 06:03 tags: - daily-notes
Wednesday, December 04, 2024
<< Timestamps/2024/12-December/2024-12-03-Tuesday|Yesterday | Timestamps/2024/12-December/2024-12-05-Thursday|Tomorrow >>
🎯 Goal
- [x] Move the BigBrain App to be within the
apps/
directory of the DIMMiN App
🌟 Results
- Moved the BigBrain App to the
apps/
directory - Updated the Django Admin views for a number of other apps including Taskmaster App, Blog App, Accounts App, and BigBrain App
- Added tags to the BigBrain App
🌱 Next Time
- Move the Taskmaster App to the
apps/
folder OR - Learn how to Django Bulk Upload your ideas into the BigBrain App OR
- Looks like Taskmaster App hasn't actually been updating with its historical task since April, should fix this ASAP
📝 Notes
I started off today by adding two quick adjustments to the BookNook App - I added a way to access it via the header:
--redacted--
And I added the workbook
category designation for the Book
Django Model. This is mostly because I'm anticipating workbooks to take longer to get through than books that are just read through. Similar to textbooks, but when I mark a Book
as a workbook
it means I'm going to be actively solving the problems it poses (i.e in Overcoming Gravity, developing an exercise routine). The BookProgress
Django Model could be a great place to write down my answers to those workbooks too.
Today I wanted to move the BigBrain App to the apps/
folder as well as maybe make some feature updates to it. This was super easy, I just needed to move bigbrain
to be apps/bigbrain
then adjust the apps/bigbrain/apps.py
file's config to have the name 'apps.bigbrain'
and everything worked smoothly. No database issues or conflicts here.
Next I wanted to improve some of the Django Models and accessibility in the admin panel for the BigBrain App.
First I updated the admin panel to be similar to the BookNook App, where now I can search through my different Project
and Idea
Django Models by not only their names, but also their tags or descriptions. This looks so nice that I might also update my Blog App to do the same.
Then I updated some of the Django Model fields to be more appropriate for their data type (i.e results
of a project as a CKeditor field instead of a raw text field). This deletes some of the data such as the tags. However, I can just save the ones I had before and assign them to my projects accordingly:
web dev
, fitness
, blogging
, productivity
, data collection
, LLMs
, startup
, career
, professional
, networking
, community building
, ultralearning
I went on to update the Django Admin views of the Taskmaster App, Blog App, and Accounts App as well as removed any redundant / unnecessary features (such as the Blog App's num_comments
feature). I also learned how to merge in GitHub via the CLI by
git push origin update-admin-views
git checkout master
git pull
git merge update-admin-views
git push origin master
aaaaaaaand I crashed my site. Whoops. This was because I removed the "num_comments" variable I was using and instead now calculate the likes directly via Django QuerySets such as
# Get other lists efficiently
context['least_popular_posts'] = (
Post.objects.filter(is_active=True)
.exclude(id=current_post.id)
.annotate(like_count_annotated=db.models.Count('likes'))
.order_by('like_count_annotated')[:10] # Limit to 10 for efficiency
)
Where I use .annotate()
to execute a command on the database to count the likes and call that output like_count_annotated
. Either way this was a good excuse to practice my Git Merge skills again:
git push origin fix-blog-views
git checkout master
git pull
git merge fix-blog-views
git push
Notes created today
List FROM "" WHERE file.cday = date("2024-12-04") SORT file.ctime asc
Notes last touched today
List FROM "" WHERE file.mday = date("2024-12-04") SORT file.mtime asc