Skip to content
Snippets Groups Projects
Commit fa4e57c8 authored by Olivier Le Brouster's avatar Olivier Le Brouster
Browse files

fix: remove useless (and bad) imports

parent ff63e4e1
No related branches found
No related tags found
No related merge requests found
......@@ -2,8 +2,6 @@
from __future__ import unicode_literals
from django.utils.translation import ugettext as _
from django.db import models
from django.contrib import admin
from cms.plugin_base import CMSPluginBase
from newsbox.models import NewsboxBase
......@@ -17,7 +15,6 @@ class NewsboxPluginBase(CMSPluginBase):
return NewsboxModel.objects.published()
def render(self, context, instance, placeholder):
from django.db.models.loading import get_model
NewsboxModel = instance.newsbox_model
......@@ -25,7 +22,7 @@ class NewsboxPluginBase(CMSPluginBase):
raise Exception(_("The choosen news type to display is invalid"))
newsset = self.get_instance_queryset(
instance=instance,
instance=instance,
request=context['request'])
if instance.numitems > 0 :
......@@ -56,13 +53,13 @@ class NewsboxPluginBase(CMSPluginBase):
'newsbox_opts':NewsboxModel._newsbox_meta,
'with_pager':with_pager,
})
if instance.page_link:
context.update({
'title_url' : instance.page_link.get_absolute_url(),
'all_news_url': instance.page_link.get_absolute_url(),
})
return context
class Meta:
abstract = True
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment