2 from django.conf import settings
3 from django.views.generic import TemplateView
4 from django.views.defaults import page_not_found
5 from pybb.views import ProfileEditView
6 from .forms import AvatarlessEditProfileForm
9 class HomeView(TemplateView):
10 template_name="home.html"
12 def get_context_data(self, **kwargs):
13 context = super(HomeView, self).get_context_data(**kwargs)
14 context['package_url'] = os.path.join(settings.MEDIA_URL, settings.CATALOGUE_PACKAGE)
15 context['package_student_url'] = os.path.join(settings.MEDIA_URL, settings.CATALOGUE_PACKAGE_STUDENT)
19 class MILHomeView(TemplateView):
20 template_name = 'base_mil.html'
22 def mil_404_view(request):
23 return page_not_found(request, '404_mil.html')
25 class AvatarlessProfileEditView(ProfileEditView):
26 form_class = AvatarlessEditProfileForm