Commit 33fc23a4 authored by nikkastra's avatar nikkastra

update

parent 3c3200bd
from django.urls import path
from .views import HomePageView, index_card_view
from .views import *
urlpatterns = [
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
from .forms import IndexCardForm
class HomePageView(View):
def get(self, request):
return(HttpResponse("putanginamo"))
form = IndexCardForm()
return render(request, 'index.html', {'form': form})
def index_card_view(request):
......@@ -15,10 +15,26 @@ def index_card_view(request):
form = IndexCardForm(request.POST)
if form.is_valid():
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']
)
)
else:
form = IndexCardForm()
return render(request, 'index.html', {'form': form})
\ No newline at end of file
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 @@
{% block styles %}{% endblock %}
</head>
<body>
{% block content %}{% endblock %}
<h1> YOUR BULLET JOURNAL </h1>
<form action="/home" method="post">
{% csrf_token %}
{{form}}
<input type="Submit" value="Submit">
</form>
{% block content %}{% endblock %}
{% block scripts %}{% endblock %}
</body>
</html>
\ No newline at end of file
{% extends 'base.html' %}
{% load static %}
{% block title %}Your Bujo{% endblock %}
{% load static %}
{% block styles %}
<link rel="stylesheet" href="{% static 'css/styles.css' %}" type='text/css'>
......@@ -9,10 +8,11 @@
{% block content %}
<ul>
<li> Home </li>
<li> Profile </li>
<li> Key </li>
<li> This Week </li>
<li> Today </li>
<li> <a href="{% url 'home'%}"> Home </a> </li>
<li> <a href="{% url 'profile'%}"> Profile </a> </li>
<li> <a href="{% url 'key'%}"> Key </a> </li>
<li> <a href="{% url 'thisweek'%}"> This Week </a> </li>
<li> <a href="{% url 'today'%}"> Today </a> </li>
</ul>
{% include 'profile.html' %}
{% 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