Add object support and add debug toolbar
This commit is contained in:
parent
1de7ad09ec
commit
c84243354e
20
src/core/migrations/0009_alter_post_recipients.py
Normal file
20
src/core/migrations/0009_alter_post_recipients.py
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
# Generated by Django 4.0.6 on 2022-07-26 13:45
|
||||||
|
|
||||||
|
from django.conf import settings
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||||||
|
('core', '0008_alter_post_options'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='post',
|
||||||
|
name='recipients',
|
||||||
|
field=models.ManyToManyField(blank=True, help_text='will be notified when creating or commenting on a post', related_name='subscriptions', to=settings.AUTH_USER_MODEL),
|
||||||
|
),
|
||||||
|
]
|
||||||
17
src/core/migrations/0010_alter_post_options.py
Normal file
17
src/core/migrations/0010_alter_post_options.py
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
# Generated by Django 4.0.6 on 2022-07-26 13:47
|
||||||
|
|
||||||
|
from django.db import migrations
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('core', '0009_alter_post_recipients'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterModelOptions(
|
||||||
|
name='post',
|
||||||
|
options={'ordering': ['-created_at']},
|
||||||
|
),
|
||||||
|
]
|
||||||
@ -150,4 +150,4 @@ class Post(models.Model):
|
|||||||
return self.title
|
return self.title
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
ordering = ['-updated_at', '-created_at']
|
ordering = ['-created_at']
|
||||||
|
|||||||
@ -33,6 +33,7 @@ INSTALLED_APPS = [
|
|||||||
'django.contrib.sites',
|
'django.contrib.sites',
|
||||||
|
|
||||||
# 3rd party
|
# 3rd party
|
||||||
|
'debug_toolbar',
|
||||||
'django_filters',
|
'django_filters',
|
||||||
'compressor',
|
'compressor',
|
||||||
'anymail',
|
'anymail',
|
||||||
@ -44,6 +45,7 @@ INSTALLED_APPS = [
|
|||||||
|
|
||||||
# Middlewares
|
# Middlewares
|
||||||
MIDDLEWARE = [
|
MIDDLEWARE = [
|
||||||
|
'debug_toolbar.middleware.DebugToolbarMiddleware',
|
||||||
'django.middleware.security.SecurityMiddleware',
|
'django.middleware.security.SecurityMiddleware',
|
||||||
'django.contrib.sessions.middleware.SessionMiddleware',
|
'django.contrib.sessions.middleware.SessionMiddleware',
|
||||||
'django.middleware.common.CommonMiddleware',
|
'django.middleware.common.CommonMiddleware',
|
||||||
|
|||||||
@ -11,5 +11,6 @@ urlpatterns = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
if settings.DEBUG:
|
if settings.DEBUG:
|
||||||
|
urlpatterns += [path('__debug__/', include('debug_toolbar.urls'))]
|
||||||
urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
|
urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
|
||||||
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
|
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
|
||||||
|
|||||||
@ -78,6 +78,13 @@ iframe {
|
|||||||
aspect-ratio: 16/9;
|
aspect-ratio: 16/9;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
object {
|
||||||
|
width: 100%;
|
||||||
|
aspect-ratio: 4/3;
|
||||||
|
box-sizing: border-box;
|
||||||
|
border: 1px solid var(--table-border);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Lists
|
/* Lists
|
||||||
========================================================================== */
|
========================================================================== */
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user