30 lines
694 B
Python
30 lines
694 B
Python
# coding: utf-8
|
|
|
|
# django
|
|
from django.shortcuts import render_to_response
|
|
from django.template import RequestContext
|
|
|
|
# project
|
|
from fmartingrcom.apps._core.views import View
|
|
from fmartingrcom.apps.config.models import SiteConfiguration
|
|
|
|
# app
|
|
from . import models
|
|
|
|
config = SiteConfiguration.objects.get()
|
|
|
|
|
|
class ListView(View):
|
|
section = 'projects'
|
|
template = 'projects/list.jinja'
|
|
|
|
def get(self, request, page_number=1):
|
|
|
|
data = {
|
|
'section': self.section,
|
|
'groups': models.Group.objects.all().order_by('order'),
|
|
}
|
|
|
|
context = RequestContext(request, data)
|
|
return render_to_response(self.template, context_instance=context)
|