Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
1e3ab3b
add .gitignore with .idea
Tomek93x Oct 24, 2025
d6f0fc7
Initializa empty django project with todo_list
Tomek93x Oct 24, 2025
26c7a34
Add Task and Tag models with ManyToMany relationship
Tomek93x Oct 24, 2025
13e097e
Register Task and Tag models in admin panel
Tomek93x Oct 24, 2025
c866b3d
Create forms for Task and Tag models
Tomek93x Oct 24, 2025
46ed00b
Implement CRUD views for Tasks and Tags
Tomek93x Oct 24, 2025
5431120
Configure URL routing for catalog app
Tomek93x Oct 24, 2025
e81b7b1
Include catalog URLs in main project
Tomek93x Oct 24, 2025
1ce25dc
Add catalog app to INSTALLED_APPS
Tomek93x Oct 24, 2025
657d704
Create sidebar template with navigation links
Tomek93x Oct 24, 2025
88d9e0a
Create task list template with CRUD actions
Tomek93x Oct 24, 2025
a78950e
Create tag list template with table view
Tomek93x Oct 24, 2025
12e7eb1
Create task form template for add and update
Tomek93x Oct 24, 2025
33c389a
Create tag form template for add and update
Tomek93x Oct 24, 2025
a356565
Create task delete confirmation template
Tomek93x Oct 24, 2025
3badceb
Create tag delete confirmation template
Tomek93x Oct 24, 2025
59cc0bd
Configure static files settings
Tomek93x Oct 24, 2025
be0f390
Add CSS stylesheet for application styling
Tomek93x Oct 24, 2025
64993a6
Update task list template with improved UI layout
Tomek93x Oct 24, 2025
f11cca6
Add .gitignore for Python and Django files
Tomek93x Oct 24, 2025
0ba64db
Add catalog app configuration files
Tomek93x Oct 24, 2025
36a602f
Add inline CSS styling to tag list template
Tomek93x Oct 24, 2025
3388ee1
Update CSS stylesheet with comprehensive styling rules
Tomek93x Oct 24, 2025
9148c6c
Add styled tag deletion confirmation template
Tomek93x Oct 24, 2025
89ca26e
Add styled tag form template for create and update
Tomek93x Oct 24, 2025
3d79a91
Add styled task form template for create and update
Tomek93x Oct 24, 2025
d2b5063
Update task list template with inline CSS styling
Tomek93x Oct 24, 2025
085d7b5
Add complete task list template with inline CSS styling
Tomek93x Oct 24, 2025
587beb1
Add datetime widget to task deadline field
Tomek93x Oct 24, 2025
938804b
Add CSS styling to delete confirmation templates
Tomek93x Oct 24, 2025
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
35 changes: 35 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Utwórz plik .gitignore w głównym katalogu projektu
cat > .gitignore << 'EOF'
# Python
*.py[cod]
*$py.class
*.so
__pycache__/
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

foldery pycache są dalej widoczne w pull requestcie. Musisz się ich pozbyć.

*.egg-info/
dist/
build/

# Django
*.log
db.sqlite3
db.sqlite3-journal
/media
/staticfiles

# IDE
.vscode/
.idea/
*.swp
*.swo
*~

# Environment
.env
venv/
env/
ENV/

# OS
.DS_Store
Thumbs.db
EOF
Empty file added catalog/__init__.py
Empty file.
15 changes: 15 additions & 0 deletions catalog/admin.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
from django.contrib import admin
from .models import Task, Tag


@admin.register(Task)
class TaskAdmin(admin.ModelAdmin):
list_display = ["content", "datetime", "deadline", "is_done"]
list_filter = ["is_done", "tags"]
search_fields = ["content"]


@admin.register(Tag)
class TagAdmin(admin.ModelAdmin):
list_display = ["name"]
search_fields = ["name"]
6 changes: 6 additions & 0 deletions catalog/apps.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from django.apps import AppConfig


class CatalogConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'catalog'
28 changes: 28 additions & 0 deletions catalog/forms.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
from django import forms
from .models import Task, Tag


class TaskForm(forms.ModelForm):
class Meta:
model = Task
fields = ["content", "deadline", "tags"]
widgets = {
'deadline': forms.DateTimeInput(
attrs={
'type': 'datetime-local',
'class': 'form-control'
}
),
'content': forms.Textarea(
attrs={
'rows': 4,
'class': 'form-control'
}
),
}


class TagForm(forms.ModelForm):
class Meta:
model = Tag
fields = ["name"]
32 changes: 32 additions & 0 deletions catalog/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Generated by Django 5.2.7 on 2025-10-24 12:04

from django.db import migrations, models


class Migration(migrations.Migration):

initial = True

dependencies = [
]

operations = [
migrations.CreateModel(
name='Tag',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=30, unique=True)),
],
),
migrations.CreateModel(
name='Task',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('content', models.TextField()),
('datetime', models.DateTimeField(auto_now_add=True)),
('deadline', models.DateTimeField(blank=True, null=True)),
('is_done', models.BooleanField(default=False)),
('tags', models.ManyToManyField(related_name='tasks', to='catalog.tag')),
],
),
]
Empty file added catalog/migrations/__init__.py
Empty file.
Binary file not shown.
Binary file not shown.
19 changes: 19 additions & 0 deletions catalog/models.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
from django.db import models


class Tag(models.Model):
name = models.CharField(max_length=30, unique=True)

def __str__(self):
return self.name


class Task(models.Model):
content = models.TextField()
datetime = models.DateTimeField(auto_now_add=True)
deadline = models.DateTimeField(null=True, blank=True)
is_done = models.BooleanField(default=False)
tags = models.ManyToManyField(Tag, related_name="tasks")

def __str__(self):
return self.content
Loading