Commit 8560fa1b authored by Jonathan Talbot's avatar Jonathan Talbot

lab 3 video

parent 49ca8f22
...@@ -14,3 +14,6 @@ ...@@ -14,3 +14,6 @@
## Lab 2: Video link: ## Lab 2: Video link:
### https://drive.google.com/file/d/1JqTDjraUkpCbQ_alrvoAGlDRjvGIuyL4/view?usp=sharing ### https://drive.google.com/file/d/1JqTDjraUkpCbQ_alrvoAGlDRjvGIuyL4/view?usp=sharing
## Lab 3: Video link:
### https://drive.google.com/file/d/1J6YsAXeB6fFtzpXEqnRvbQdeE3p8EkIK/view?usp=sharing
\ No newline at end of file
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
{% if announcements %} {% if announcements %}
<ul> <ul>
{% for announcement in announcements %} {% for announcement in announcements %}
<li><a href="{{ announcement.get_absolute_url }}">{{ announcement.announcement_title }} by {{ announcement.author.first_name }} {{ announcement.author.last_name }} dated {{ announcement.pub_date }}</a></li> <li><a href="{{ announcement.get_absolute_url }}">{{ announcement.announcement_title }} by {{ announcement.author.first_name }} {{ announcement.author.last_name }} dated {{ announcement.pub_date|date:'d/m/Y' }}</a></li>
{% endfor %} {% endfor %}
</ul> </ul>
{% else %} {% else %}
......
No preview for this file type
...@@ -13,6 +13,14 @@ ...@@ -13,6 +13,14 @@
<p>{{user.department.dept_name}}</p> <p>{{user.department.dept_name}}</p>
<p>{{user.department.home_unit}}</p> <p>{{user.department.home_unit}}</p>
<hr> <hr>
<a href="{% url 'widget_user-list' %}">Back to Homepage</a> <a class="back" href="{% url 'widget_user-list' %}">Back to Homepage</a>
</body> </body>
<style>
a{
text-decoration: none;
}
.back:hover{
color: green;
}
</style>
</html> </html>
\ No newline at end of file
...@@ -15,6 +15,14 @@ ...@@ -15,6 +15,14 @@
<input type="submit" value="Save WidgetUser"> <input type="submit" value="Save WidgetUser">
</form> </form>
<hr> <hr>
<a href="{% url 'widget_user-list' %}">Back to Homepage</a> <a class="back" href="{% url 'widget_user-list' %}">Back to Homepage</a>
</body> </body>
<style>
a{
text-decoration: none;
}
.back:hover{
color: green;
}
</style>
</html> </html>
\ No newline at end of file
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<title>User List</title> <title>User List</title>
</head> </head>
<body> <body>
<h1>Welcome to Widget!</h1> <h1 id="heading">Welcome to Widget!</h1>
<hr> <hr>
<p>Widget Users:</p> <p>Widget Users:</p>
{% if object_list %} {% if object_list %}
...@@ -20,6 +20,18 @@ ...@@ -20,6 +20,18 @@
<p>There are no widget users.</p> <p>There are no widget users.</p>
{% endif %} {% endif %}
<hr> <hr>
<a href="{% url 'widget_user-add' %}"><button>Add Widget User</button></a> <a href="{% url 'widget_user-add' %}"><button class="add">Add Widget User</button></a>
</body> </body>
<style>
#heading{
text-decoration: underline;
text-align: center;
}
a{
text-decoration: none;
}
.add{
padding: 5px 10px;
}
</style>
</html> </html>
\ No newline at end of file
...@@ -14,8 +14,6 @@ def UserDetailView(request, pk): ...@@ -14,8 +14,6 @@ def UserDetailView(request, pk):
class UserListView(ListView): class UserListView(ListView):
queryset = WidgetUser.objects.order_by('last_name') # Orders by last name alphabetically queryset = WidgetUser.objects.order_by('last_name') # Orders by last name alphabetically
context_object_name = "post_list"
template_name = "post_list.html"
def addWidgetUser(request): def addWidgetUser(request):
form = WidgetUserForm() form = WidgetUserForm()
......
...@@ -112,7 +112,7 @@ AUTH_PASSWORD_VALIDATORS = [ ...@@ -112,7 +112,7 @@ AUTH_PASSWORD_VALIDATORS = [
LANGUAGE_CODE = 'en-us' LANGUAGE_CODE = 'en-us'
TIME_ZONE = 'UTC' TIME_ZONE = 'Asia/Manila'
USE_I18N = True USE_I18N = True
......
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