Commit 33fc23a4 authored by nikkastra's avatar nikkastra

update

parent 3c3200bd
from django.urls import path from django.urls import path
from .views import HomePageView, index_card_view from .views import *
urlpatterns = [ urlpatterns = [
path('', HomePageView.as_view(), name='index'), path('', HomePageView.as_view(), name='index'),
path('home', index_card_view, name = 'home') path('home', index_card_view, name = 'home'),
path('profile', profile, name = 'profile'),
path('key', key, name = 'key'),
path('thisweek', thisweek, name = 'thisweek'),
path('today', today, name = 'today')
] ]
\ No newline at end of file
...@@ -4,10 +4,10 @@ from django.views import View ...@@ -4,10 +4,10 @@ from django.views import View
from .forms import IndexCardForm from .forms import IndexCardForm
class HomePageView(View): class HomePageView(View):
def get(self, request): def get(self, request):
return(HttpResponse("putanginamo")) form = IndexCardForm()
return render(request, 'index.html', {'form': form})
def index_card_view(request): def index_card_view(request):
...@@ -15,10 +15,26 @@ def index_card_view(request): ...@@ -15,10 +15,26 @@ def index_card_view(request):
form = IndexCardForm(request.POST) form = IndexCardForm(request.POST)
if form.is_valid(): if form.is_valid():
return HttpResponse( return HttpResponse(
'Hello, {}! Today is going to be a great day!'.format( 'Hello, {}! Today is gonna be a great day!'.format(
form.cleaned_data['name'] form.cleaned_data['name']
) )
) )
else: else:
form = IndexCardForm() form = IndexCardForm()
return render(request, 'index.html', {'form': form}) return render(request, 'index.html', {'form': form})
def profile(request):
return render(request, 'profile.html')
def key(request):
return render(request, 'key.html')
def thisweek(request):
return render(request, 'thisweek.html')
def today(request):
return render(request, 'today.html')
\ No newline at end of file
...@@ -7,12 +7,13 @@ ...@@ -7,12 +7,13 @@
{% block styles %}{% endblock %} {% block styles %}{% endblock %}
</head> </head>
<body> <body>
{% block content %}{% endblock %} <h1> YOUR BULLET JOURNAL </h1>
<form action="/home" method="post"> <form action="/home" method="post">
{% csrf_token %} {% csrf_token %}
{{form}} {{form}}
<input type="Submit" value="Submit"> <input type="Submit" value="Submit">
</form> </form>
{% block content %}{% endblock %}
{% block scripts %}{% endblock %} {% block scripts %}{% endblock %}
</body> </body>
</html> </html>
\ No newline at end of file
{% extends 'base.html' %} {% extends 'base.html' %}
{% load static %}
{% block title %}Your Bujo{% endblock %} {% load static %}
{% block styles %} {% block styles %}
<link rel="stylesheet" href="{% static 'css/styles.css' %}" type='text/css'> <link rel="stylesheet" href="{% static 'css/styles.css' %}" type='text/css'>
...@@ -9,10 +8,11 @@ ...@@ -9,10 +8,11 @@
{% block content %} {% block content %}
<ul> <ul>
<li> Home </li> <li> <a href="{% url 'home'%}"> Home </a> </li>
<li> Profile </li> <li> <a href="{% url 'profile'%}"> Profile </a> </li>
<li> Key </li> <li> <a href="{% url 'key'%}"> Key </a> </li>
<li> This Week </li> <li> <a href="{% url 'thisweek'%}"> This Week </a> </li>
<li> Today </li> <li> <a href="{% url 'today'%}"> Today </a> </li>
</ul> </ul>
{% include 'profile.html' %}
{% endblock %} {% endblock %}
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name='viewport' content='width=device-width'>
<title>{% block title %}Key{% endblock %}</title>
{% block styles %}{% endblock %}
</head>
<body>
<h1> Key </h1>
<p> ● Tasks: things you have to do </p>
<p> - Notes: things you don't want to forget </p>
<p> ◦ Events: noteworth moments in time </p>
<p> ● Task incomplete </p>
<p> x Task complete </p>
{% block content %}{% endblock %}
{% block scripts %}{% endblock %}
</body>
</html>
\ No newline at end of file
{% load static %}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name='viewport' content='width=device-width'>
<title>{% block title %}Profile{% endblock %}</title>
{% block styles %}{% endblock %}
</head>
<body>
{% block content %}{% endblock %}
<h1> Profile </h1>
<ul>
<li> Franz Leonard Atanacio </li>
<li> "pogi" </li>
<li> di raw masyadong masarap pero pwede na </li>
</ul>
<img src="{% static 'img/picturekoparasalahat.jpg' %}" />
{% block scripts %}{% endblock %}
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name='viewport' content='width=device-width'>
<title>{% block title %}This Week{% endblock %}</title>
{% block styles %}{% endblock %}
</head>
<body>
{% block content %}{% endblock %}
{% block scripts %}{% endblock %}
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name='viewport' content='width=device-width'>
<title>{% block title %}Today{% endblock %}</title>
{% block styles %}{% endblock %}
</head>
<body>
{% block content %}{% endblock %}
{% block scripts %}{% endblock %}
</body>
</html>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment