-
Notifications
You must be signed in to change notification settings - Fork 0
To do list #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Tomek93x
wants to merge
30
commits into
main
Choose a base branch
from
dev
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
To do list #1
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 d6f0fc7
Initializa empty django project with todo_list
Tomek93x 26c7a34
Add Task and Tag models with ManyToMany relationship
Tomek93x 13e097e
Register Task and Tag models in admin panel
Tomek93x c866b3d
Create forms for Task and Tag models
Tomek93x 46ed00b
Implement CRUD views for Tasks and Tags
Tomek93x 5431120
Configure URL routing for catalog app
Tomek93x e81b7b1
Include catalog URLs in main project
Tomek93x 1ce25dc
Add catalog app to INSTALLED_APPS
Tomek93x 657d704
Create sidebar template with navigation links
Tomek93x 88d9e0a
Create task list template with CRUD actions
Tomek93x a78950e
Create tag list template with table view
Tomek93x 12e7eb1
Create task form template for add and update
Tomek93x 33c389a
Create tag form template for add and update
Tomek93x a356565
Create task delete confirmation template
Tomek93x 3badceb
Create tag delete confirmation template
Tomek93x 59cc0bd
Configure static files settings
Tomek93x be0f390
Add CSS stylesheet for application styling
Tomek93x 64993a6
Update task list template with improved UI layout
Tomek93x f11cca6
Add .gitignore for Python and Django files
Tomek93x 0ba64db
Add catalog app configuration files
Tomek93x 36a602f
Add inline CSS styling to tag list template
Tomek93x 3388ee1
Update CSS stylesheet with comprehensive styling rules
Tomek93x 9148c6c
Add styled tag deletion confirmation template
Tomek93x 89ca26e
Add styled tag form template for create and update
Tomek93x 3d79a91
Add styled task form template for create and update
Tomek93x d2b5063
Update task list template with inline CSS styling
Tomek93x 085d7b5
Add complete task list template with inline CSS styling
Tomek93x 587beb1
Add datetime widget to task deadline field
Tomek93x 938804b
Add CSS styling to delete confirmation templates
Tomek93x File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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__/ | ||
| *.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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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.
Binary file not shown.
Binary file not shown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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ć.