Made migrations for model changes and created admin panel option for Course

parent 6f3d3d33
from django.contrib import admin from django.contrib import admin
from .models import Event, Location from .models import Event, Course, Location
class EventAdmin(admin.ModelAdmin): class EventAdmin(admin.ModelAdmin):
model = Event model = Event
class CourseAdmin(admin.ModelAdmin):
model = Course
class LocationAdmin(admin.ModelAdmin): class LocationAdmin(admin.ModelAdmin):
model = Location model = Location
admin.site.register(Event, EventAdmin) admin.site.register(Event, EventAdmin)
admin.site.register(Course, CourseAdmin)
admin.site.register(Location, LocationAdmin) admin.site.register(Location, LocationAdmin)
\ No newline at end of file
{% extends 'base.html' %} {% extends 'base.html' %}
{% load static %} {% load static %}
{% block title %}Widget's Calendar of Activities{% endblock %} {% block title %}{{ event.activity }}{% endblock %}
{% block content %} {% block content %}
<h2>Widget's Calendar of Activities</h2> <h2>{{ event.activity }}</h2>
{% for event in events %} <h3>Date and Time: {{ event.target_datetime }}</h3>
<a href="{{ event.get_absolute_url }}">{{event.activity}}</a><br> <h3>{{ department.home_unit }}</h3>
{% endfor %}
<br> <br>
<a href="{% url 'widget_calendar:event-add' %}" class="button"> New Activity </a><br> <form action='edit'>
<a href="{% url 'dashboard:pageview' %}">Dashboard</a><br> <input type="submit" value="Edit Widget User"/>
<a href="{% url 'announcements:pageview' %}">Announcements</a><br> </form>
<a href="{% url 'forum:pageview' %}">Forum</a><br>
<a href="{% url 'assignments:pageview' %}">Assignments</a><br>
{% endblock %} {% endblock %}
\ 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