diff --git a/SinkDark/article/models.py b/SinkDark/article/models.py index 51b826d..74dae34 100644 --- a/SinkDark/article/models.py +++ b/SinkDark/article/models.py @@ -21,7 +21,7 @@ class ArticleInfo(models.Model): author = models.ForeignKey(MyUser, on_delete=models.CASCADE, verbose_name='用户') title = models.CharField('标题', max_length=200) content = RichTextUploadingField(verbose_name='内容') - rendered = RichTextUploadingField(verbose_name='最终内容') + rendered = RichTextUploadingField(verbose_name='最终内容', default='

默认内容

') articlephoto = models.ImageField('文章图片', blank=True, upload_to='images/article/') reading = models.IntegerField('阅读量', default=0) liking = models.IntegerField('点赞量', default=0) diff --git a/SinkDark/publicStatic/css/base.css b/SinkDark/publicStatic/css/base.css index b38ca05..5181f09 100644 --- a/SinkDark/publicStatic/css/base.css +++ b/SinkDark/publicStatic/css/base.css @@ -47,12 +47,12 @@ article { position: relative; z-index: 1 } -.r_box { +.m_box { /* 主体CSS样式规则 */ float: center; /* 让这个aside元素向右浮动 */ width: 60%; /* 设置宽度为父容器的20% */ background-color: #f0f0f0; /* 设置背景颜色为浅灰色 */ - margin-left: 100px; /* 设置右边距为20px */ + margin-left: 1000px; /* 设置右边距为20px */ overflow: hidden; display: block; position: relative; diff --git a/SinkDark/templates/article.html b/SinkDark/templates/article.html index 58e2e87..28c430e 100644 --- a/SinkDark/templates/article.html +++ b/SinkDark/templates/article.html @@ -2,7 +2,7 @@ {% load static %} {% block content %} -
+
{% for list in pageInfo.object_list %}
  • @@ -15,7 +15,7 @@

    {{ list.title }}

    -

    {{ list.content|safe }}

    +

    {{ list.rendered|safe }}

  • {% endfor %} diff --git a/SinkDark/templates/detail.html b/SinkDark/templates/detail.html index 3b67385..fa1468c 100644 --- a/SinkDark/templates/detail.html +++ b/SinkDark/templates/detail.html @@ -20,7 +20,7 @@
    - {{ ats.content|safe }} + {{ ats.rendered|safe }}