from app import dashboard_modules
from django.utils.translation import ugettext_lazy as _
from jet.dashboard import modules
from jet.dashboard.dashboard import Dashboard


class CustomIndexDashboard(Dashboard):
    columns = 3

    def init_with_context(self, context):
        self.available_children.append(modules.LinkList)
        self.available_children.append(modules.ModelList)
        self.available_children.append(modules.RecentActions)
        self.available_children.append(dashboard_modules.BestReviewers)
        self.available_children.append(dashboard_modules.AppsStats)
        self.children.append(modules.LinkList(
            _('HackUPC URLs'),
            children=[
                {
                    'title': _('HackUPC Landing'),
                    'url': 'https://hackupc.com/',
                    'external': True,
                },
                {
                    'title': _('Sendgrid'),
                    'url': 'https://sendgrid.com',
                    'external': True,
                },
                {
                    'title': _('HackUPC Live'),
                    'url': 'https://hackupc.com/live',
                    'external': True,
                },
            ],
            column=2,
            order=0
        ))
        self.children.append(modules.ModelList(
            _('Models'),
            column=1,
            order=0
        ))
        self.children.append(dashboard_modules.BestReviewers(
            _('Reviewer Leaderboard'),
            column=0, order=0)
        )

@@ -584,702 +584,8 @@
 ts)%0A
-        self.children.append(modules.LinkList(%0A            _('HackUPC URLs'),%0A            children=%5B%0A                %7B%0A                    'title': _('HackUPC Landing'),%0A                    'url': 'https://hackupc.com/',%0A                    'external': True,%0A                %7D,%0A                %7B%0A                    'title': _('Sendgrid'),%0A                    'url': 'https://sendgrid.com',%0A                    'external': True,%0A                %7D,%0A                %7B%0A                    'title': _('HackUPC Live'),%0A                    'url': 'https://hackupc.com/live',%0A                    'external': True,%0A                %7D,%0A            %5D,%0A            column=2,%0A            order=0%0A        ))%0A
     

remove module hackupc urls