parent
759823b83a
commit
0f417511c1
|
|
@ -2,12 +2,12 @@
|
||||||
{% load static tailwind_tags %} {% block content %}
|
{% load static tailwind_tags %} {% block content %}
|
||||||
<div class="flex flex-col lg:flex-row gap-8">
|
<div class="flex flex-col lg:flex-row gap-8">
|
||||||
<article
|
<article
|
||||||
class="basis-3/5 mb-auto prose max-w-full bg-white shadow-md rounded-md p-4"
|
class="basis-1/2 mb-auto prose max-w-full bg-white shadow-md rounded-md p-4"
|
||||||
>
|
>
|
||||||
<h1>Grand Prix Województwa</h1>
|
<h1>Grand Prix Województwa</h1>
|
||||||
{{ gpw.content | safe }}
|
{{ gpw.content | safe }}
|
||||||
</article>
|
</article>
|
||||||
<div class="flex flex-col items-center gap-4">
|
<div class="basis-1/2 flex flex-col items-center gap-4">
|
||||||
<h1
|
<h1
|
||||||
class="text-[2.25rem] font-medium w-full lg:text-right bg-white shadow-md rounded-md px-4 py-2"
|
class="text-[2.25rem] font-medium w-full lg:text-right bg-white shadow-md rounded-md px-4 py-2"
|
||||||
>
|
>
|
||||||
|
|
@ -15,8 +15,10 @@
|
||||||
</h1>
|
</h1>
|
||||||
<hr class="w-36 border-b border-stone-300 border-dashed" />
|
<hr class="w-36 border-b border-stone-300 border-dashed" />
|
||||||
{% for post in posts %}
|
{% for post in posts %}
|
||||||
<article class="prose max-w-full py-4 bg-white shadow-md rounded-md p-4">
|
<article
|
||||||
<h2 class="text-center">{{ post.title }}</h2>
|
class="prose max-w-full w-full py-4 bg-white shadow-md rounded-md p-4"
|
||||||
|
>
|
||||||
|
<h2 class="text-center font-medium">{{ post.title }}</h2>
|
||||||
<div>{{ post.content | safe }}</div>
|
<div>{{ post.content | safe }}</div>
|
||||||
</article>
|
</article>
|
||||||
{% if not forloop.last %}
|
{% if not forloop.last %}
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ from .models import *
|
||||||
|
|
||||||
@admin.register(Post)
|
@admin.register(Post)
|
||||||
class PostModelAdmin(OrderableAdmin, admin.ModelAdmin):
|
class PostModelAdmin(OrderableAdmin, admin.ModelAdmin):
|
||||||
list_display = ['title', 'ordering']
|
list_display = ['__str__', 'ordering']
|
||||||
list_editable = ['ordering']
|
list_editable = ['ordering']
|
||||||
ordering_field_hide_input = True
|
ordering_field_hide_input = True
|
||||||
exclude = ['ordering']
|
exclude = ['ordering']
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
# Generated by Django 4.0.5 on 2022-07-25 20:26
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('main', '0002_alter_post_options_post_ordering'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterModelOptions(
|
||||||
|
name='post',
|
||||||
|
options={'ordering': ['ordering'], 'verbose_name': 'Aktualność PodlZBS', 'verbose_name_plural': 'Aktualności PodlZBS'},
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='post',
|
||||||
|
name='title',
|
||||||
|
field=models.CharField(blank=True, default='', max_length=250, verbose_name='Tytuł'),
|
||||||
|
),
|
||||||
|
]
|
||||||
|
|
@ -12,7 +12,7 @@ class Post(OrderableModel):
|
||||||
created_at = models.DateTimeField(auto_now_add=True)
|
created_at = models.DateTimeField(auto_now_add=True)
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return self.title
|
return self.title or '(brak tytułu)'
|
||||||
|
|
||||||
class Meta(OrderableModel.Meta):
|
class Meta(OrderableModel.Meta):
|
||||||
verbose_name = 'Aktualność PodlZBS'
|
verbose_name = 'Aktualność PodlZBS'
|
||||||
|
|
|
||||||
|
|
@ -1326,6 +1326,10 @@ select {
|
||||||
flex-basis: 60%;
|
flex-basis: 60%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.basis-1\/2 {
|
||||||
|
flex-basis: 50%;
|
||||||
|
}
|
||||||
|
|
||||||
.border-collapse {
|
.border-collapse {
|
||||||
border-collapse: collapse;
|
border-collapse: collapse;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue