-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #334 from MAKENTNU/dev
Deployment
- Loading branch information
Showing
55 changed files
with
1,106 additions
and
216 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
19 changes: 19 additions & 0 deletions
19
announcements/migrations/0003_use_timezone_aware_default.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,19 @@ | ||
# Generated by Django 3.0.11 on 2020-11-10 16:21 | ||
|
||
from django.db import migrations, models | ||
import django.utils.timezone | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('announcements', '0002_help_text_and_naming'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='announcement', | ||
name='display_from', | ||
field=models.DateTimeField(default=django.utils.timezone.localtime, help_text='The date from which the announcement will be shown.', verbose_name='Display from'), | ||
), | ||
] |
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
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,5 +1,13 @@ | ||
from django.contrib import admin | ||
|
||
from internal.models import Member | ||
from internal.models import Member, Secret | ||
from web.multilingual.database import MultiLingualFieldAdmin | ||
|
||
|
||
class SecretAdmin(MultiLingualFieldAdmin): | ||
list_display = ('title', 'last_modified') | ||
search_fields = ('title', 'content') | ||
|
||
|
||
admin.site.register(Member) | ||
admin.site.register(Secret, SecretAdmin) |
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,23 @@ | ||
# Generated by Django 3.0.10 on 2020-11-12 15:25 | ||
|
||
from django.db import migrations, models | ||
import web.multilingual.database | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('internal', '0005_remove_member_card_number'), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='Secret', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('title', web.multilingual.database.MultiLingualTextField(max_length=100, unique=True, verbose_name='Title')), | ||
('content', web.multilingual.database.MultiLingualRichTextUploadingField(verbose_name='Description')), | ||
('last_modified', models.DateTimeField(auto_now=True)), | ||
], | ||
), | ||
] |
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,3 @@ | ||
.hidden { | ||
display: none !important; /* Overrides Fomantic UI */ | ||
} |
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,13 @@ | ||
const SECRET_SHOW_DURATION_SECONDS = 10; | ||
|
||
$(".secret-button").click(function () { | ||
const secretButton = $(this); | ||
const secretId = secretButton.data("secret-id"); | ||
const secret = $(`#${secretId}`); | ||
secret.removeClass("hidden"); | ||
secretButton.addClass("hidden"); | ||
setTimeout(() => { | ||
secret.addClass("hidden"); | ||
secretButton.removeClass("hidden"); | ||
}, SECRET_SHOW_DURATION_SECONDS * 1000); | ||
}); |
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.