Exemplo n.º 1
0
from forum.modules import ui, get_modules_script
from django.utils.translation import ugettext as _
from django.utils.encoding import smart_unicode
from django.core.urlresolvers import reverse
from django.template.defaultfilters import slugify

from forum.models import User
from forum.templatetags.extra_tags import get_score_badge
from forum.utils.html import cleanup_urls
from forum import settings


try:
    from django.template import get_templatetags_modules
    modules_template_tags = get_modules_script('templatetags')
    django_template_tags = get_templatetags_modules()

    for m in modules_template_tags:
        django_template_tags.append(m.__name__)
except:
    pass

ui.register(ui.HEADER_LINKS,
            ui.Link(_('faq'), ui.Url('faq'), weight=400, name='FAQ'),
            ui.Link(_('about'), ui.Url('about'), weight=300, name='ABOUT'),

            ui.Link(
                    text=lambda u, c: u.is_authenticated() and _('logout') or _('login'),
                    url=lambda u, c: u.is_authenticated() and reverse('logout') or reverse('auth_signin'),
                    weight=200, name='LOGIN/OUT'),
Exemplo n.º 2
0
from forum.modules import ui, get_modules_script
from django.utils.translation import ugettext as _
from django.utils.encoding import smart_unicode
from django.core.urlresolvers import reverse
from django.template.defaultfilters import slugify

from forum.templatetags.extra_tags import get_score_badge
from forum.utils.html import cleanup_urls
from forum import settings


try:
    from django.template import get_templatetags_modules
    modules_template_tags = get_modules_script('templatetags')
    django_template_tags = get_templatetags_modules()

    for m in modules_template_tags:
        django_template_tags.append(m.__name__)
except:
    pass

ui.register(ui.HEADER_LINKS,
            ui.Link(_('faq'), ui.Url('faq'), weight=400, name='FAQ'),
            ui.Link(_('about'), ui.Url('about'), weight=300, name='ABOUT'),

            ui.Link(
                    text=lambda u, c: u.is_authenticated() and _('logout') or _('login'),
                    url=lambda u, c: u.is_authenticated() and reverse('logout') or reverse('auth_signin'),
                    weight=200, name='LOGIN/OUT'),

            ui.Link(
Exemplo n.º 3
0
    url(r'^%s%s%s(?P<id>\d+)/$' % (_('admin/'), _('static_pages/'), _('edit/')), app.admin.edit_page, name='admin_edit_page'),
    url(r'^%s%s%s(?P<id>\d+)/$' % (_('admin/'), _('static_pages/'), _('delete/')), app.admin.delete_page, name='admin_delete_page'),

    url(r'^%s%s(?P<name>\w+)/$' % (_('admin/'), _('tools/')), app.admin.tools_page, name='admin_tools'),
    
    url(r'^%s%s(?P<set_name>\w+)/$' % (_('admin/'), _('settings/')), app.admin.settings_set, name='admin_set'),
    
    url(r'%s%s' % (_('admin/'), _('test_email_settings/')), app.admin.test_email_settings, name='test_email_settings'),
    
    url(r'^feeds/rss[/]?$', app.readers.feed, name='latest_questions_feed'),
    
)

from forum.modules import get_modules_script

module_patterns = get_modules_script('urls')

urlpatterns = patterns('')

for pattern_file in module_patterns:
    pattern = getattr(pattern_file, 'urlpatterns', None)
    if pattern:
        urlpatterns += pattern

module_defined = {}

for t in urlpatterns:
    if hasattr(t, 'name') and t.name:
        module_defined[t.name] = True

core_defined = []
Exemplo n.º 4
0
        r"^%s%s%s(?P<id>\d+)/$" % (_("admin/"), _("static_pages/"), _("edit/")),
        app.admin.edit_page,
        name="admin_edit_page",
    ),
    url(r"^%s%s(?P<name>\w+)/$" % (_("admin/"), _("tools/")), app.admin.tools_page, name="admin_tools"),
    url(r"^%s%s(?P<set_name>\w+)/$" % (_("admin/"), _("settings/")), app.admin.settings_set, name="admin_set"),
    url(r"%s%s" % (_("admin/"), _("test_email_settings/")), app.admin.test_email_settings, name="test_email_settings"),
    url(r"^feeds/rss[/]?$", app.readers.feed, name="latest_questions_feed"),
    url(r"%s$" % _("note/allsite/"), app.readers.allsite, name="allsite"),
    url(r"%s$" % _("note/hotquestion/"), app.readers.hotquestion, name="hotquestion"),
    url(r"%s$" % _("note/inbox/"), app.readers.inbox, name="inbox"),
)

from forum.modules import get_modules_script

module_patterns = get_modules_script("urls")

urlpatterns = patterns("")

for pattern_file in module_patterns:
    pattern = getattr(pattern_file, "urlpatterns", None)
    if pattern:
        urlpatterns += pattern

module_defined = {}

for t in urlpatterns:
    if hasattr(t, "name") and t.name:
        module_defined[t.name] = True

core_defined = []
Exemplo n.º 5
0
import forum.badges

from forum.modules import get_modules_script

get_modules_script('settings')
Exemplo n.º 6
0
Arquivo: startup.py Projeto: jun9/iCQA
import sys
import os

sys.path.append(os.path.join(os.path.dirname(__file__), "markdownext"))

from forum.modules import get_modules_script

get_modules_script("settings")
get_modules_script("startup")


import forum.badges
import forum.subscriptions
import forum.registry
Exemplo n.º 7
0
import sys
import os
sys.path.append(os.path.join(os.path.dirname(__file__),'markdownext'))

import forum.views

import forum.badges
import forum.subscriptions

from forum.modules import get_modules_script

get_modules_script('settings')
get_modules_script('startup')
Exemplo n.º 8
0
import sys
import os

from forum.modules import get_modules_script

get_modules_script('settings')
get_modules_script('startup')


import forum.badges
import forum.subscriptions
import forum.registry
get_modules_script('registry')



Exemplo n.º 9
0
from forum.modules import get_modules_script

get_modules_script('management')
Exemplo n.º 10
0
import sys
import os
sys.path.append(os.path.join(os.path.dirname(__file__), 'markdownext'))

from forum.modules import get_modules_script

get_modules_script('settings')
get_modules_script('startup')

import forum.badges
import forum.subscriptions
import forum.registry
Exemplo n.º 11
0
        name='admin_edit_page'),
    url(r'^%s%s(?P<name>\w+)/$' % (_('admin/'), _('tools/')),
        app.admin.tools_page,
        name='admin_tools'),
    url(r'^%s%s(?P<set_name>\w+)/$' % (_('admin/'), _('settings/')),
        app.admin.settings_set,
        name='admin_set'),
    url(r'%s%s' % (_('admin/'), _('test_email_settings/')),
        app.admin.test_email_settings,
        name='test_email_settings'),
    url(r'^feeds/rss[/]?$', app.readers.feed, name='latest_questions_feed'),
)

from forum.modules import get_modules_script

module_patterns = get_modules_script('urls')

urlpatterns = patterns('')

for pattern_file in module_patterns:
    pattern = getattr(pattern_file, 'urlpatterns', None)
    if pattern:
        urlpatterns += pattern

module_defined = {}

for t in urlpatterns:
    if hasattr(t, 'name') and t.name:
        module_defined[t.name] = True

core_defined = []
Exemplo n.º 12
0
from forum.modules import get_modules_script

get_modules_script('badges')

from base import BadgesMeta

Exemplo n.º 13
0
import sys
import os
sys.path.append(os.path.join(os.path.dirname(__file__), 'markdownext'))

from forum.modules import get_modules_script

get_modules_script('settings')
get_modules_script('startup')

import forum.badges
import forum.subscriptions
import forum.registry
get_modules_script('registry')
Exemplo n.º 14
0
import forum.activity
import forum.reputation
import forum.badges
import forum.subscriptions

from forum.modules import get_modules_script

get_modules_script('settings')