-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 parent
58b263d
commit d16073d
Showing
30 changed files
with
230 additions
and
24 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
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,20 @@ | ||
# Generated by Django 2.0.2 on 2018-02-26 09:38 | ||
|
||
from django.conf import settings | ||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('article', '0009_auto_20180225_2027'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='comment', | ||
name='user', | ||
field=models.ForeignKey(default=0, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL), | ||
), | ||
] |
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 2.0.2 on 2018-02-26 10:07 | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('article', '0010_auto_20180226_1738'), | ||
] | ||
|
||
operations = [ | ||
migrations.RemoveField( | ||
model_name='comment', | ||
name='mail', | ||
), | ||
] |
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 2.0.2 on 2018-02-26 11:35 | ||
|
||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('article', '0011_remove_comment_mail'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='comment', | ||
name='user', | ||
field=models.ForeignKey(default=0, on_delete=django.db.models.deletion.CASCADE, to='userpage.Profile'), | ||
), | ||
] |
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 2.0.2 on 2018-02-26 11:38 | ||
|
||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('article', '0012_auto_20180226_1935'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='article', | ||
name='author_id', | ||
field=models.ForeignKey(default=0, on_delete=django.db.models.deletion.CASCADE, to='userpage.Profile'), | ||
), | ||
] |
Binary file added
BIN
+747 Bytes
article/migrations/__pycache__/0010_auto_20180226_1738.cpython-36.pyc
Binary file not shown.
Binary file added
BIN
+512 Bytes
article/migrations/__pycache__/0011_remove_comment_mail.cpython-36.pyc
Binary file not shown.
Binary file added
BIN
+698 Bytes
article/migrations/__pycache__/0012_auto_20180226_1935.cpython-36.pyc
Binary file not shown.
Binary file added
BIN
+693 Bytes
article/migrations/__pycache__/0013_auto_20180226_1938.cpython-36.pyc
Binary file not shown.
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,56 @@ | ||
{% extends "base.html" %} | ||
|
||
{% block header %} | ||
<title>{{art.title}} - 物志</title> | ||
|
||
{% endblock %} | ||
|
||
|
||
{% block banner %} | ||
<div class="banner" style="background:url(/{{art.cover}}) no-repeat;background-position:center;background-size:cover;"> | ||
<div class="container"> | ||
<h1>{% if art %}{{art.title}}{% endif %} </h1> | ||
</div> | ||
</div> | ||
{% endblock %} | ||
|
||
|
||
{% block content %} | ||
<div class="card margintop"> | ||
<span class="fad">作者:<a href="#"><img src="/static/{{art.author_id.avatar}}" class="avatar-img"> {{art.author}}</a> </span> | ||
| ||
<span class="fad">发表于:{{art.publish_time}}</span> | ||
<span class="sep margintop"></span> | ||
<span class="ad1"> </span> | ||
{{art.detail|safe}} | ||
</div> | ||
|
||
<div class="card"> | ||
<span class="sep"></span> | ||
{% for i in comments %} | ||
<div class="comment row"> | ||
<div class="comment-avatar" style="margin-top:20px;background:url(/static/{{i.user.avatar}}) no-repeat;background-position:center;background-size:cover;"> | ||
<p>{{i.user.username}}</p> | ||
</div> | ||
<div class="comment-info"> | ||
<p></p> | ||
{{i.comment|safe}} | ||
<span class="glyphicon glyphicon-time fad"> </span> <span class="fad">{{i.publish_time}}</span> | ||
<span class="pull-right"> | ||
<a href="#"><span class="glyphicon glyphicon-reply fad"></span></a> <span class="fad">#{{forloop.counter}}</span> | ||
</span> | ||
</div> | ||
</div> | ||
<span class="sep"></span> | ||
{% endfor %} | ||
</div> | ||
|
||
<div class="card"> | ||
<form method="post"> | ||
{% csrf_token %} | ||
{{ comment_form.as_p }} | ||
<button class="btn btn-default pull-right" type="submit">发表</button> | ||
</form> | ||
|
||
</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
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
Binary file not shown.
Binary file not shown.
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Binary file not shown.
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
Binary file not shown.
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,18 @@ | ||
# Generated by Django 2.0.2 on 2018-02-26 11:38 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('userpage', '0002_auto_20180224_1712'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='profile', | ||
name='avatar', | ||
field=models.ImageField(blank=True, null=True, upload_to='static/avatar/'), | ||
), | ||
] |
Binary file added
BIN
+614 Bytes
userpage/migrations/__pycache__/0003_auto_20180226_1938.cpython-36.pyc
Binary file not shown.
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