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 %} + + + + + {% block title %}My amazing site{% endblock %} + + + + +

Poker CC

+ +

+ {% if user.is_authenticated %} + Submit + {% else %} + Create account + {% endif %} +

+ +
+ +
+ {% block content %}{% endblock %} +
+
+ + + diff --git a/news/templates/news/createaccount.html b/news/templates/news/createaccount.html new file mode 100644 index 0000000..e6521a1 --- /dev/null +++ b/news/templates/news/createaccount.html @@ -0,0 +1,24 @@ +{% extends "base.html" %} + +{% block title %}My amazing blog{% endblock %} + +{% block content %} +

Create account

+
+ +

Username

+

+ +

+ +

Password

+

+ + +

+ + + +
+ +{% endblock content %} diff --git a/news/templates/news/index.html b/news/templates/news/index.html index 186e4bd..c3e8bc3 100644 --- a/news/templates/news/index.html +++ b/news/templates/news/index.html @@ -1,5 +1,8 @@ -

Poker CC

+{% extends "base.html" %} +{% block title %}My amazing blog{% endblock %} + +{% block content %} {% if latest_post_list %} + +{% endblock content %} diff --git a/news/templates/news/submission.html b/news/templates/news/submission.html index 0bd8b37..f7bfa51 100644 --- a/news/templates/news/submission.html +++ b/news/templates/news/submission.html @@ -1,3 +1,9 @@ +{% extends "base.html" %} + +{% block title %}My amazing blog{% endblock %} + +{% block content %} + {% if error_message %}

{{ 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 :)

Home

+ +{% 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('/comment', views.comment, name='comment'), path('submitted', views.submitted, name='submitted'), + path('createaccount', views.createaccount, name='createaccount'), ] diff --git a/news/views.py b/news/views.py index 6ffd660..90a5d50 100644 --- a/news/views.py +++ b/news/views.py @@ -20,6 +20,9 @@ def post(request, post_id): def submission(request): return render(request, 'news/submission.html', {}) +def createaccount(request): + return render(request, 'news/createaccount.html', {}) + def submit(request): if 'state' in request.POST: