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
Tags 0.3.3
No related merge requests found
...@@ -2,8 +2,6 @@ ...@@ -2,8 +2,6 @@
from __future__ import unicode_literals from __future__ import unicode_literals
from django.utils.translation import ugettext as _ from django.utils.translation import ugettext as _
from django.db import models
from django.contrib import admin
from cms.plugin_base import CMSPluginBase from cms.plugin_base import CMSPluginBase
from newsbox.models import NewsboxBase from newsbox.models import NewsboxBase
...@@ -17,7 +15,6 @@ class NewsboxPluginBase(CMSPluginBase): ...@@ -17,7 +15,6 @@ class NewsboxPluginBase(CMSPluginBase):
return NewsboxModel.objects.published() return NewsboxModel.objects.published()
def render(self, context, instance, placeholder): def render(self, context, instance, placeholder):
from django.db.models.loading import get_model
NewsboxModel = instance.newsbox_model NewsboxModel = instance.newsbox_model
...@@ -25,7 +22,7 @@ class NewsboxPluginBase(CMSPluginBase): ...@@ -25,7 +22,7 @@ class NewsboxPluginBase(CMSPluginBase):
raise Exception(_("The choosen news type to display is invalid")) raise Exception(_("The choosen news type to display is invalid"))
newsset = self.get_instance_queryset( newsset = self.get_instance_queryset(
instance=instance, instance=instance,
request=context['request']) request=context['request'])
if instance.numitems > 0 : if instance.numitems > 0 :
...@@ -56,13 +53,13 @@ class NewsboxPluginBase(CMSPluginBase): ...@@ -56,13 +53,13 @@ class NewsboxPluginBase(CMSPluginBase):
'newsbox_opts':NewsboxModel._newsbox_meta, 'newsbox_opts':NewsboxModel._newsbox_meta,
'with_pager':with_pager, 'with_pager':with_pager,
}) })
if instance.page_link: if instance.page_link:
context.update({ context.update({
'title_url' : instance.page_link.get_absolute_url(), 'title_url' : instance.page_link.get_absolute_url(),
'all_news_url': instance.page_link.get_absolute_url(), 'all_news_url': instance.page_link.get_absolute_url(),
}) })
return context return context
class Meta: class Meta:
abstract = True 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