Events und Gallery in einzelne Apps aufgetielt.
Lokalisierung auf einzelne Apps aufgeteilt Mai-Star Ranking in die Navigation integriert
This commit is contained in:
@@ -1,15 +1,17 @@
|
||||
# Create your views here.
|
||||
from . import models, forms
|
||||
from aggregator.models import Feed
|
||||
import os
|
||||
|
||||
from django.conf import settings
|
||||
from django.contrib import comments
|
||||
from django.http import HttpResponse, Http404
|
||||
from django.utils.translation import ugettext as _
|
||||
from django.views import generic
|
||||
from django.shortcuts import get_object_or_404
|
||||
|
||||
from . import models, forms
|
||||
from aggregator.models import Feed
|
||||
from utils.mixins import PermissionRequiredMixin
|
||||
import events.models
|
||||
import os
|
||||
from django.shortcuts import get_object_or_404
|
||||
|
||||
|
||||
class ArticleArchiveMixin(object):
|
||||
@@ -53,7 +55,8 @@ class ArticleYearArchive(ArticleArchiveMixin, generic.YearArchiveView):
|
||||
queryset = generic.YearArchiveView.get_queryset(self)
|
||||
self.category = self.kwargs.get('category')
|
||||
if self.category:
|
||||
self.category = get_object_or_404(models.Category, slug=self.category)
|
||||
self.category = get_object_or_404(models.Category,
|
||||
slug=self.category)
|
||||
queryset = queryset.filter(category=self.category)
|
||||
return queryset
|
||||
|
||||
@@ -98,7 +101,8 @@ class ImageList(generic.View):
|
||||
response = HttpResponse(content_type='text/javascript')
|
||||
response.write('var tinyMCEImageList = new Array(')
|
||||
os.chdir(settings.MEDIA_ROOT)
|
||||
for dirpath, dirnames, filenames in os.walk('images'): # @UnusedVariable @IgnorePep8
|
||||
for dirpath, dirnames, filenames in os.walk(
|
||||
'images'): # @UnusedVariable @IgnorePep8
|
||||
filenames.sort()
|
||||
for filename in filenames:
|
||||
image_list.append('["%(name)s", "%(path)s"]' % {
|
||||
|
||||
Reference in New Issue
Block a user