-
Notifications
You must be signed in to change notification settings - Fork 1
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
11 changed files
with
122 additions
and
43 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,5 +42,4 @@ <h1 class="text-4xl text-white font-bold my-5">Gwardia Hub</h1> | |
</div> | ||
</div> | ||
</div> | ||
|
||
{% endblock %} |
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
17 changes: 17 additions & 0 deletions
17
gwardia/migrations/0004_rename_date_of_meeting_nextmeeting_date.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,17 @@ | ||
# Generated by Django 5.0.4 on 2024-04-19 12:33 | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("gwardia", "0003_rename_nextmeeting_meeting"), | ||
] | ||
|
||
operations = [ | ||
migrations.RenameField( | ||
model_name="meeting", | ||
old_name="date_of_meeting", | ||
new_name="date", | ||
), | ||
] |
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,10 +1,14 @@ | ||
from django.db import models | ||
from django.utils import timezone | ||
|
||
|
||
class Meeting(models.Model): | ||
title = models.CharField(max_length=150) | ||
description = models.TextField() | ||
date_of_meeting = models.DateTimeField("Date of meeting") | ||
date = models.DateTimeField("Date of meeting") | ||
|
||
def is_archival(self): | ||
return self.date < timezone.now() | ||
|
||
def __str__(self): | ||
return f"{self.title} - {self.description:<50}" |
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 @@ | ||
<h2 class="text-2xl text-white text-center font-bold mt-8 mb-4">{{ title }} spotkania</h2> | ||
<ul> | ||
{% if events %} | ||
{% for event in events %} | ||
<li class="js-meeting-container flex flex-col items-center border-solid border-gray-500 border-2 p-5 w-full mb-1 rounded-2xl cursor-pointer {% if event.is_archival %}bg-orange-500 bg-opacity-25{% endif %}"> | ||
{% if event.is_archival %} | ||
<p class="text-orange-300 text-right w-full ">Archiwalne</p> | ||
{% endif %} | ||
<p class="w-full"> | ||
<span class="break-words font-bold">{{ event.title }}</span> | ||
<span class="float-right">{{ event.date }}</span> | ||
</p> | ||
<p class="js-meeting-description border-gray-500 pt-5 w-full break-words border-t-2 hidden"> | ||
{{ event.description|linebreaksbr }} | ||
</p> | ||
</li> | ||
{% endfor %} | ||
{% else %} | ||
<li class="flex flex-col items-center border-solid border-gray-500 border-2 w-full mb-1 rounded-2xl text-center"> | ||
Brak spotkań! | ||
</li> | ||
{% endif %} | ||
</ul> |
Empty file.
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,8 @@ | ||
from django import template | ||
|
||
register = template.Library() | ||
|
||
|
||
@register.inclusion_tag("gwardia/list_events.html") | ||
def list_events(events, title): | ||
return {"events": events, "title": title} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// Used for custom styles in templates | ||
|
||
tailwind.config = { | ||
theme: { | ||
extend: { | ||
borderWidth: { | ||
'12': '12px', | ||
}, | ||
}, | ||
}, | ||
} |