-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
huge templates rework, CSS+js styling added, and other small fixes (W…
…ARN: views test is invalid at the moment
- Loading branch information
Showing
79 changed files
with
6,097 additions
and
116 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Binary file not shown.
Binary file not shown.
This file contains 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
This file contains 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 |
---|---|---|
@@ -1,8 +1,11 @@ | ||
"""Url parsing module.""" | ||
from django.contrib import admin | ||
from django.urls import path, include | ||
from django.contrib.staticfiles.urls import staticfiles_urlpatterns | ||
|
||
urlpatterns = [ | ||
path('admin/', admin.site.urls), | ||
path('', include('dot_app.urls')), | ||
] | ||
] | ||
|
||
urlpatterns += staticfiles_urlpatterns() |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains 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,33 @@ | ||
# Generated by Django 4.2.13 on 2024-05-25 19:16 | ||
|
||
from django.db import migrations, models | ||
import django_minio_backend.models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("dot_app", "0007_alter_board_created_alter_board_modified_and_more"), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name="board", | ||
name="datasheet", | ||
field=models.FileField( | ||
blank=True, | ||
null=True, | ||
storage=django_minio_backend.models.MinioBackend(bucket_name="static"), | ||
upload_to=django_minio_backend.models.iso_date_prefix, | ||
), | ||
), | ||
migrations.AddField( | ||
model_name="board", | ||
name="image", | ||
field=models.FileField( | ||
blank=True, | ||
null=True, | ||
storage=django_minio_backend.models.MinioBackend(bucket_name="static"), | ||
upload_to=django_minio_backend.models.iso_date_prefix, | ||
), | ||
), | ||
] |
24 changes: 24 additions & 0 deletions
24
dot_app/migrations/0009_alter_board_options_alter_manufacturer_options_and_more.py
This file contains 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,24 @@ | ||
# Generated by Django 4.2.13 on 2024-05-26 17:48 | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("dot_app", "0008_board_datasheet_board_image"), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterModelOptions( | ||
name="board", | ||
options={"ordering": ["-id"]}, | ||
), | ||
migrations.AlterModelOptions( | ||
name="manufacturer", | ||
options={"ordering": ["-id"]}, | ||
), | ||
migrations.AlterModelOptions( | ||
name="subtype", | ||
options={"ordering": ["-id"]}, | ||
), | ||
] |
Binary file added
BIN
+1.33 KB
dot_app/migrations/__pycache__/0008_board_datasheet_board_image.cpython-311.pyc
Binary file not shown.
Binary file added
BIN
+951 Bytes
.../__pycache__/0009_alter_board_options_alter_manufacturer_options_and_more.cpython-311.pyc
Binary file not shown.
This file contains 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
This file contains 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,22 @@ | ||
from django.db import models | ||
|
||
def create_manager(validators: tuple[tuple[str, callable]]): | ||
class Manager(models.Manager): | ||
@staticmethod | ||
def check_and_validate(kwargs, value, validator): | ||
if value in kwargs.keys(): | ||
validator(kwargs.get(value)) | ||
|
||
def create(self, **kwargs): | ||
for value, validator in validators: | ||
self.check_and_validate(kwargs, value, validator) | ||
return super().create(**kwargs) | ||
return Manager | ||
|
||
def create_save(validators: tuple[tuple[str, callable]]): | ||
def save(self, *args, **kwargs) -> None: | ||
for value, validator in validators: | ||
validator(getattr(self, value)) | ||
return super(self.__class__, self).save(*args, **kwargs) | ||
|
||
return save |
Empty file.
This file was deleted.
Oops, something went wrong.
This file contains 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
This file contains 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
Oops, something went wrong.