7d4818d7d45214b29acfa1e42ce27238db1e1bba
[edumed.git] / edumed / views.py
1 import os.path
2 from django.conf import settings
3 from django.views.generic import TemplateView
4 from pybb.views import ProfileEditView
5 from .forms import AvatarlessEditProfileForm
6
7
8 class HomeView(TemplateView):
9     template_name="home.html"
10
11     def get_context_data(self, **kwargs):
12         context = super(HomeView, self).get_context_data(**kwargs)
13         context['package_url'] = os.path.join(settings.MEDIA_URL, settings.CATALOGUE_PACKAGE)
14         context['package_student_url'] = os.path.join(settings.MEDIA_URL, settings.CATALOGUE_PACKAGE_STUDENT)
15         return context
16
17
18 class MILHomeView(TemplateView):
19     template_name = 'base_mil.html'
20
21
22 class AvatarlessProfileEditView(ProfileEditView):
23     form_class = AvatarlessEditProfileForm