2018-09-16 16:52:23 +00:00
|
|
|
from django.shortcuts import render
|
2018-10-02 09:56:04 +00:00
|
|
|
from django.http import HttpResponse
|
|
|
|
from postings.models import *
|
2018-09-16 16:52:23 +00:00
|
|
|
|
|
|
|
# Create your views here.
|
2018-10-02 09:56:04 +00:00
|
|
|
|
|
|
|
# The view for the homepage, or index.html
|
|
|
|
def index(request):
|
|
|
|
return render(request, 'postings/index.html')
|
|
|
|
|
|
|
|
def universities(request):
|
|
|
|
universities_list = University.objects.all()
|
|
|
|
context = {'entities': universities_list}
|
|
|
|
return render(request, 'postings/collections/universities.html', context)
|
|
|
|
|
|
|
|
def courses(request):
|
|
|
|
courses_list = Course.objects.all()
|
|
|
|
context = {'entities': courses_list}
|
|
|
|
return render(request, 'postings/collections/courses.html', context)
|