Exemplo n.º 1
0
from django.core.urlresolvers import reverse
from django.utils.translation import ugettext_lazy as _
from django.template.response import TemplateResponse
from oioioi.base.main_page import register_main_page_view
from oioioi.szkopul.menu import navbar_links_registry

navbar_links_registry.register(
    name='problemset',
    text=_('Problemset'),
    url_generator=lambda request: reverse('problemset_main'),
    order=100,
)

navbar_links_registry.register(
    name='task_archive',
    text=_('Task archive'),
    # TODO Change the following URL when the Task Archive
    #      gets moved from the global portal on Szkopul.
    url_generator=lambda request:
        'https://szkopul.edu.pl/portal/problemset' +
        ('_eng' if request.LANGUAGE_CODE != 'pl' else ''),
    order=200,
)

# TODO Add Portals main page to the menu:
# navbar_links_registry.register(
#     name='portals',
#     text=_('Portals'),
#     ...
# )
Exemplo n.º 2
0
from django.conf import settings
from django.core.urlresolvers import reverse
from django.utils.translation import ugettext_lazy as _
from django.template.response import TemplateResponse
from oioioi.base.main_page import register_main_page_view
from oioioi.szkopul.menu import navbar_links_registry
from oioioi.contests.utils import visible_contests
from oioioi.contests.controllers import submission_template_context
from oioioi.contests.models import Submission
from oioioi.contests.processors import recent_contests

navbar_links_registry.register(
    name='contests_list',
    text=_('Contests'),
    url_generator=lambda request: reverse('select_contest'),
    order=100,
)

navbar_links_registry.register(
    name='problemset',
    text=_('Problemset'),
    url_generator=lambda request: reverse('problemset_main'),
    order=200,
)

navbar_links_registry.register(
    name='task_archive',
    text=_('Task archive'),
    url_generator=lambda request: reverse('task_archive'),
    order=300,
)
Exemplo n.º 3
0
from django.conf import settings
from django.core.urlresolvers import reverse
from django.utils.translation import ugettext_lazy as _
from django.template.response import TemplateResponse
from oioioi.base.main_page import register_main_page_view
from oioioi.szkopul.menu import navbar_links_registry
from oioioi.contests.utils import visible_contests
from oioioi.contests.controllers import submission_template_context
from oioioi.contests.models import Submission
from oioioi.contests.processors import recent_contests

navbar_links_registry.register(
    name='contests_list',
    text=_('Contests'),
    url_generator=lambda request: reverse('select_contest'),
    order=100,
)

navbar_links_registry.register(
    name='problemset',
    text=_('Problemset'),
    url_generator=lambda request: reverse('problemset_main'),
    order=200,
)

navbar_links_registry.register(
    name='task_archive',
    text=_('Task archive'),
    # TODO Change the following URL when the Task Archive
    #      gets moved from the global portal on Szkopul.
    url_generator=lambda request: reverse(