Compare commits
2 Commits
bef63db9d1
...
9873a7db28
| Author | SHA1 | Date |
|---|---|---|
|
|
9873a7db28 | |
|
|
bdc8451f22 |
Binary file not shown.
|
|
@ -126,5 +126,5 @@ MEDIA_ROOT = os.path.join(BASE_DIR + '/media')
|
|||
MEDIA_URL = '/media/'
|
||||
|
||||
CRISPY_TEMPLATE_PACK = 'bootstrap4'
|
||||
LOGIN_REDIRECT_URL = 'Home'
|
||||
LOGIN_REDIRECT_URL = 'News'
|
||||
LOGIN_URL = 'Login'
|
||||
|
|
|
|||
Binary file not shown.
BIN
db.sqlite3
BIN
db.sqlite3
Binary file not shown.
|
|
@ -29,6 +29,11 @@
|
|||
<div class="justify-content-center" id="navbarNav">
|
||||
<ul class="navbar-nav">
|
||||
{% if user.is_authenticated %}
|
||||
<li class="nav-item">
|
||||
{% if user.is_staff %}
|
||||
<a class="nav-link" href="{% url 'BlogCreate' %}">Post</a>
|
||||
{% endif %}
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<form action="{% url 'Logout' %}" method="post">
|
||||
{% csrf_token %}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
{% csrf_token %}
|
||||
<div class="card mb-4">
|
||||
<div class="card-header">
|
||||
Create a Blog
|
||||
Create a New Blog Article
|
||||
</div>
|
||||
<div class="card-body">
|
||||
{{ form | crispy }}
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
<p class="card-text">{{ object.content | markdown | safe }}</p>
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
By <cite title="{{ object.author }}"><a href="#">{{ object.author }}</a></cite> on <cite title="{{ object.date_posted }}">{{ object.date_posted|date:"M j, o" }}</cite>
|
||||
By <cite title="{{ object.author }}"><a href="#" class="link text-dark">{{ object.author }}</a></cite> on <cite title="{{ object.date_posted }}">{{ object.date_posted|date:"M j, o" }}</cite>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue