Setup for initial html

parent 54fc5450
{% extends 'base.html' %} {% extends 'base.html' %}
{% load static %} {% load static %}
{% block title %}Widget V2{% endblock %}
{% block content %}
<h> Welcome to Widget! </h>
<ul>
{% for object in object_list %}
<li><a href = "{{ object.id }}/details/">{{ object.last_name }} {{ object.first_name }}</a></li>
{% empty %}
<li>No users registered.</li>
{% endfor %}
</ul>
<button onclick="window.location.href='../widgetusers/add';">Add Widget User</button>
<p>
<a href="/Announcement">Announcements</a><br>
<a href="/Forum">Forum</a><br>
<a href="/Assignments">Assignments</a><br>
<a href="/Calendar">Calendar</a>
</p>
{% endblock %}
\ No newline at end of file
{% extends 'base.html' %} {% extends 'base.html' %}
{% load static %} {% load static %}
{% block title %}Add Widget User{% endblock %}
{% block content %}
<form class = "aligned_left_paragraph_small" method="post">
<h> Add a new Widget user: </h>
{% csrf_token %}
{{form.as_p}}
<input type ="submit" value="Add Widget User">
</form>
{% endblock %}
\ No newline at end of file
{% extends 'base.html' %} {% extends 'base.html' %}
{% load static %} {% load static %}
{% block title %}{{user.last_name}}, {{user.first_name}}{% endblock %}
{% block content %}
<h style = "text-transform: uppercase"> {{user.first_name}} {{user.middle_name}} {{user.last_name}} </h>
<p>
<br />{{user.department.dept_name}}
<br />{{user.department.home_unit}}
<button onclick="window.location.href='../../../widgetusers/{{author.id}}/edit/';">Edit Author</button> <br />
</p>
{% endblock %}
\ No newline at end of file
{% extends 'base.html' %} {% extends 'base.html' %}
{% load static %} {% load static %}
{% block title %}Edit Widget User{% endblock %}
{% block content %}
<form class = "aligned_left_paragraph_small" method="post">
<h> Edit Widget User: </h>
{% csrf_token %}
{{form.as_p}}
<input type ="submit" value="Save Changes to Widget User">
</form>
{% endblock %}
\ No newline at end of file
from django.urls import path from django.urls import path
from .views import index from . import views
urlpatterns = [ urlpatterns = [
path('dashboard/', views.dashboard_view, name='dashboard'), path('dashboard/', views.dashboard_view, name='dashboard'),
......
...@@ -4,7 +4,7 @@ from django.shortcuts import render ...@@ -4,7 +4,7 @@ from django.shortcuts import render
from django.views import View from django.views import View
from .models import Department, WidgetUser from .models import Department, WidgetUser
def homepage_view(request): def dashboard_view(request):
return render(request, 'Dashboard/dashboard.html') return render(request, 'Dashboard/dashboard.html')
class userdetails_view(View): class userdetails_view(View):
......
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