-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
100 additions
and
22 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Generated by Django 4.2.16 on 2024-11-23 22:54 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('cms', '0003_alter_menuitem_url'), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='FileUpload', | ||
fields=[ | ||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('file', models.FileField(upload_to='uploads/')), | ||
], | ||
), | ||
] |
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
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,21 +1,16 @@ | ||
from rest_framework.routers import DefaultRouter | ||
|
||
from cms import views | ||
from .views import (FileUploadViewSet, InfoBannerViewSet, LogoViewSet, | ||
MenuItemViewSet, MessageTemplateViewSet, PostViewSet) | ||
|
||
app_name = 'cms' | ||
|
||
|
||
# Create a router and register our viewsets with it. | ||
router = DefaultRouter() | ||
router.register(r'post', views.PostViewSet) | ||
router.register(r'menu-item', views.MenuItemViewSet) | ||
router.register(r'info-banner', views.InfoBannerViewSet) | ||
router.register(r'message-template', views.MessageTemplateViewSet) | ||
router.register(r'logo', views.LogoViewSet) | ||
|
||
router.register('post', PostViewSet) | ||
router.register('menu-item', MenuItemViewSet) | ||
router.register('info-banner', InfoBannerViewSet) | ||
router.register('message-template', MessageTemplateViewSet) | ||
router.register('logo', LogoViewSet) | ||
router.register('uploads', FileUploadViewSet) | ||
|
||
urlpatterns = [ | ||
|
||
] | ||
|
||
urlpatterns += router.urls | ||
app_name = 'cms' | ||
urlpatterns = router.urls |
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
30 changes: 30 additions & 0 deletions
30
competition/migrations/0004_alter_problemcorrection_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,30 @@ | ||
# Generated by Django 4.2.16 on 2024-11-23 22:54 | ||
|
||
import base.models | ||
import competition.models | ||
import django.core.files.storage | ||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('competition', '0003_alter_solution_corrected_solution_and_more'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterModelOptions( | ||
name='problemcorrection', | ||
options={'verbose_name': 'Opravenie úlohy', 'verbose_name_plural': 'Opravené úlohy'}, | ||
), | ||
migrations.AlterField( | ||
model_name='solution', | ||
name='corrected_solution', | ||
field=base.models.RestrictedFileField(blank=True, storage=django.core.files.storage.FileSystemStorage(base_url='/protected/', location='/home/mihal/Documents/STROM/webstrom/webstrom-backend/protected_media/'), upload_to=competition.models.get_corrected_solution_path, verbose_name='opravené riešenie'), | ||
), | ||
migrations.AlterField( | ||
model_name='solution', | ||
name='solution', | ||
field=base.models.RestrictedFileField(blank=True, storage=django.core.files.storage.FileSystemStorage(base_url='/protected/', location='/home/mihal/Documents/STROM/webstrom/webstrom-backend/protected_media/'), upload_to=competition.models.get_solution_path, verbose_name='účastnícke riešenie'), | ||
), | ||
] |
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