diff --git a/news/__pycache__/urls.cpython-37.pyc b/news/__pycache__/urls.cpython-37.pyc index 51a5583..37fa9fe 100644 Binary files a/news/__pycache__/urls.cpython-37.pyc and b/news/__pycache__/urls.cpython-37.pyc differ diff --git a/news/__pycache__/views.cpython-37.pyc b/news/__pycache__/views.cpython-37.pyc index 568bcc1..6de96f2 100644 Binary files a/news/__pycache__/views.cpython-37.pyc and b/news/__pycache__/views.cpython-37.pyc differ diff --git a/news/static/news/style.css b/news/static/news/style.css new file mode 100644 index 0000000..898a630 --- /dev/null +++ b/news/static/news/style.css @@ -0,0 +1,3 @@ +li a { + color: red; +} diff --git a/news/templates/base.html b/news/templates/base.html new file mode 100644 index 0000000..c4d444f --- /dev/null +++ b/news/templates/base.html @@ -0,0 +1,33 @@ + + +{% load static %} + + +
+ ++ {% if user.is_authenticated %} + Submit + {% else %} + Create account + {% endif %} +
+ +No posts are available.
{% endif %} -Submit +{% endblock content %} diff --git a/news/templates/news/post.html b/news/templates/news/post.html index 059d777..672a037 100644 --- a/news/templates/news/post.html +++ b/news/templates/news/post.html @@ -1,3 +1,8 @@ +{% extends "base.html" %} + +{% block title %}My amazing blog{% endblock %} + +{% block content %}----Body----
@@ -20,3 +25,5 @@{{ error_message }}
{% endif %} {% if user.is_authenticated %} @@ -28,7 +34,7 @@- + @@ -44,3 +50,5 @@ {% else %} Please log in {% endif %} + +{% endblock content %} diff --git a/news/templates/news/submitted.html b/news/templates/news/submitted.html index bf385ca..665eca4 100644 --- a/news/templates/news/submitted.html +++ b/news/templates/news/submitted.html @@ -1,3 +1,11 @@ +{% extends "base.html" %} + +{% block title %}My amazing blog{% endblock %} + +{% block content %} +
Thanks :)
+ +{% endblock content %} diff --git a/news/urls.py b/news/urls.py index 487c1e7..485dbc4 100644 --- a/news/urls.py +++ b/news/urls.py @@ -10,5 +10,6 @@ urlpatterns = [ path('submit', views.submit, name='submit'), path('