Skip to content
This repository was archived by the owner on Mar 27, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@
`makemigrations name` - create a new SQL migration based on model file
`sqlmigrate blog 001` - open a SQL migration blog number 001
`migrate` - apply migrations
`dumpdata --indent=2 --output=mysite_data.json` - export data from a database
`loaddata mysite_data.json` - import data into database
29 changes: 10 additions & 19 deletions Now.md
Original file line number Diff line number Diff line change
@@ -1,38 +1,29 @@
This is a [now](https://nownownow.com/about) page, and if you have your own site, you ~~should~~ can make one, too.

Updated September 9, 2025 from Brzezina, Poland
Updated October 8, 2025 from Brzezina, Poland

---

## Nitrodigest CLI
## Preparing for 10k run

I'm finishing the Nitrodigest CLI by adding documentation for summarizing web pages, Slack messages, and GitHub pull requests. My goal is to create an automated information summarizing system by combining Nitrodigest with other tools.
Finally, after many trials and tribulations, I was able to get back into running. I started with something relatively simple: the 10km Independence Run. I'm aiming to beat my personal best: 45 minutes. I train with Jeff, and he's really pushing me.

---

## Garden furniture refinishing
## Learning Django

I'm restoring a wooden garden table and chairs. This involves sanding off old paint and applying a new coat of stain.
I regret that I don't enjoy C# programming as much as I would like, I do hoping that I will not to do it forever, and I started learning Django. I'm working through the book "Django 5 by Example" by Antonio Mele, and so far I really like it.

---

## NextCloud PI setup

I'm migrating my photos from Apple and Google to a self-hosted NextCloud instance on a Raspberry PI. I've already moved the photos to my local computer and am now transferring them to the server.
It's a great starting point when you can create a working frontend view and backend with a database in just a few lines of code. It's amazing how simple web development can be.

---

## Blog writing
## Studying

I'm restarting my blog, drawing content ideas from these projects.
October means returning to my studies. It looks promising: deep learning, natural language analysis methods, and an artificial intelligence project. Additionally, I believe it's time to select a topic for my master's thesis.

---

## History

Below you can find my historical now pages. Date along the title means a day when a page was moved to the history.
## Exploring NextCloud and Raspberry PI

- [4. 08-09-2025](4.%2008-09-2025.md)
- [3. 16-07-2025](3.%2016-07-2025.md)
- [2. 06-06-2025](2.%2006-06-2025.md)
- [1. 25-03-2025](1.%2025-03-2025.md)
I recently successfully launched NextCloud on my PI, but I haven't fully enjoyed it yet. I'm finishing up my photo migration and enjoying exploring the features of NextCloud.
37 changes: 0 additions & 37 deletions Now/History/1. 25-03-2025.md

This file was deleted.

65 changes: 0 additions & 65 deletions Now/History/2. 06-06-2025.md

This file was deleted.

28 changes: 0 additions & 28 deletions Now/History/3. 16-07-2025.md

This file was deleted.

19 changes: 0 additions & 19 deletions Now/History/4. 08-09-2025.md

This file was deleted.

4 changes: 4 additions & 0 deletions Projects/Testtrack/M1 - Django Learning/mysite/.env.example
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
EMAIL_HOST_USER=
EMAIL_HOST_PASSWORD=
DEFAULT_FROM_EMAIL=
DB_NAME=blog
DB_USER=blog
DB_PASSWORD=admin
DB_HOST=localhost
4 changes: 4 additions & 0 deletions Projects/Testtrack/M1 - Django Learning/mysite/blog/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,7 @@ class CommentForm(forms.ModelForm):
class Meta:
model = Comment
fields = ('name', 'email', 'body')


class SearchForm(forms.Form):
query = forms.CharField()
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{% extends "blog/base.html" %}
{% load blog_tags %}

{% block title %}Search{% endblock %}

{% block content %}
{% if query %}
<h1>Search results for {{ query }}</h1>
<h3>
{% with results.count as total_results %}
Found {{ total_results }} result{{ total_results|pluralize }}
{% endwith %}
</h3>
{% for post in results %}
<h4>
<a href="{{ post.get_absolute_url }}">{{ post.title }}</a>
</h4>
{{ post.body|markdown|truncatewords_html:12 }}
{% empty %}
<p>No results found.</p>
{% endfor %}
{% else %}
<h1>Please enter a search term.</h1>
<form method="get">
{{ form.as_p}}
<input type="submit" value="Search">
</form>
{% endif %}
{% endblock %}
3 changes: 2 additions & 1 deletion Projects/Testtrack/M1 - Django Learning/mysite/blog/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,6 @@
views.post_comment,
name='post_comment'
),
path('feed/', LatestPostsFeed(), name='post_feed')
path('feed/', LatestPostsFeed(), name='post_feed'),
path('search/', views.post_search, name='post_search')
]
35 changes: 34 additions & 1 deletion Projects/Testtrack/M1 - Django Learning/mysite/blog/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,14 @@
from django.views.generic import ListView, DetailView
from django.views.decorators.http import require_POST
from django.core.mail import send_mail
from django.contrib.postgres.search import (
SearchVector,
SearchQuery,
SearchRank
)
from taggit.models import Tag
from .models import Post
from .forms import EmailPostForm, CommentForm
from .forms import EmailPostForm, CommentForm, SearchForm


class PostListView(ListView):
Expand Down Expand Up @@ -119,3 +124,31 @@ def post_comment(request, post_id):
'blog/post/comment.html',
{'post': post, 'form': form, 'comment': comment}
)


def post_search(request):
form = SearchForm()
query = None
results = []

if 'query' in request.GET:
form = SearchForm(request.GET)
if form.is_valid():
query = form.cleaned_data['query']
search_vector = SearchVector(
'title', weight='A') + SearchVector('body', weight='B')
search_query = SearchQuery(query)
results = Post.published.annotate(
search=search_vector,
rank=SearchRank(search_vector, search_query)
).filter(rank__gte=0.3).order_by('-rank')

return render(
request,
'blog/post/search.html',
{
'form': form,
'query': query,
'results': results
}
)
16 changes: 16 additions & 0 deletions Projects/Testtrack/M1 - Django Learning/mysite/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
services:
db:
image: postgres:latest
container_name: django_blog_postgres
restart: always
environment:
POSTGRES_DB: blog
POSTGRES_USER: blog
POSTGRES_PASSWORD: admin
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data

volumes:
postgres_data:
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.postgres',
'django.contrib.sites',
'django.contrib.sitemaps',
'taggit',
Expand Down Expand Up @@ -80,8 +81,11 @@

DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': BASE_DIR / 'db.sqlite3',
'ENGINE': 'django.db.backends.postgresql',
'NAME': config('DB_NAME'),
'USER': config('DB_USER'),
'PASSWORD': config('DB_PASSWORD'),
'HOST': config('DB_HOST', default='localhost'),
}
}

Expand Down
Loading
Loading