コード例 #1
0
ファイル: urls.py プロジェクト: fragaria/ella-toolkit
from django.conf.urls.defaults import url, patterns
from django.utils.translation import ugettext_lazy as _
from django.template.defaultfilters import slugify

from ella.core.custom_urls import resolver

urlpatterns = patterns('ella_toolkit.publishable.send_email.views',
    # send information about article to e-mail
    url(r'^%s/$' % slugify(_('send by email')), 'send_by_email', name='send_by_email'),
    url(r'^%s/%s/$' % (slugify(_('send by email')), slugify(_('done'))), 'send_by_email_success', name='send_by_email_success'),
)

resolver.register(urlpatterns)
コード例 #2
0
from django.utils.translation import ugettext
from django.template.defaultfilters import slugify
from django.conf.urls.defaults import patterns, url

from ella.core.custom_urls import resolver
from ella.interviews.views import unanswered, reply, detail, QuestionForm, QuestionFormPreview, list_questions
from ella.interviews.models import Interview

urlpatterns = patterns(
    '',
    url('^%s/$' % slugify(ugettext('unanswered')),
        unanswered,
        name='interview-unanswered'),
    url('^%s/$' % slugify(ugettext('reply')),
        list_questions, {},
        name='interview-list-questions'),
    url('^%s/(\d+)/$' % slugify(ugettext('reply')),
        reply, {},
        name='interview-reply'),
    url('^%s/$' % slugify(ugettext('ask')),
        QuestionFormPreview(QuestionForm),
        name='interview-ask'),
)
# add Interview-specific functionality
resolver.register(urlpatterns, model=Interview)

# override Interview's detail view
resolver.register_custom_detail(Interview, detail)
コード例 #3
0
from django.template.defaultfilters import slugify
from django.utils.translation import ugettext as _
from django.conf.urls.defaults import patterns, url

from ella.core.custom_urls import resolver
from ella.oldcomments.views import new_comment, CommentFormPreview, list_comments
from ella.oldcomments.forms import CommentForm

urlpatterns = patterns(
    '',
    url(r'^$', list_comments, name='comments-list'),
    url(r'^%s/(?P<reply>\d+)/$' % slugify(_('reply')),
        new_comment,
        name='comments-reply'),
    url(r'^%s/$' % slugify(_('new')), new_comment, name='comments-new'),
    url(r'^%s/$' % slugify(_('preview')),
        CommentFormPreview(CommentForm),
        name='comments-reply'),
)

resolver.register(urlpatterns, prefix=slugify(_('comments')))
コード例 #4
0
ファイル: urls.py プロジェクト: ella/ella-comments
from django.template.defaultfilters import slugify
from django.utils.translation import ugettext as _
try:
    from django.conf.urls import patterns, url
except ImportError:
    from django.conf.urls.defaults import patterns, url

from ella.core.custom_urls import resolver
from ella_comments.views import list_comments, post_comment, update_comment, comment_detail

urlpatterns = patterns('',
    url(r'^$', list_comments, name='comments-list'),
    url(r'^(?P<comment_id>\d+)/$', comment_detail, name='comment-detail'),
    url(r'^%s/(?P<comment_id>\d+)/$' % slugify(_('update')), update_comment, name='comments-update'),
    url(r'^%s/$' % slugify(_('new')), post_comment, name='comments-new'),
    url(r'^%s/(?P<parent_id>\d+)/$' % slugify(_('new')), post_comment, name='comments-reply'),
)

resolver.register(urlpatterns, prefix=slugify(_('comments')))

コード例 #5
0
ファイル: urls.py プロジェクト: whit/ella
    # SURVEY - vote to survey
    url(r'^survey/(?P<survey_id>\d+)/vote/$',
        survey_vote,
        name="polls_survey_vote"),

    # CONTEST - vote to contest
    #url(r'^contest/(?P<contest_id>\d+)/vote/$', contest_vote, name="polls_contest_vote"),
    # QUIZ - votes to quiz
    #url(r'^quiz/(?P<quiz_id>\d+)/vote/$', quiz_vote, name="polls_quiz_vote"),
)

resolver.register_custom_detail(Quiz, quiz)
resolver.register_custom_detail(Contest, contest)

resolver.register(patterns(
    '',
    url('^%s/$' % slugify(_('results')),
        result_details,
        name='polls-quiz-result')),
                  model=Quiz)
resolver.register(patterns(
    '',
    url('^%s/$' % slugify(_('result')),
        contest_result,
        name='polls-contest-result'),
    url('^%s/$' % slugify(_('conditions')),
        contest_conditions,
        name='polls-contest-conditions')),
                  model=Contest)
コード例 #6
0
ファイル: register.py プロジェクト: ella/ella-wiki
from ella.core.custom_urls import resolver

from .models import Wiki
from .urls import custom_url_patterns

resolver.register(custom_url_patterns, model=Wiki)

コード例 #7
0
from django.conf.urls.defaults import patterns, url
from django.template.defaultfilters import slugify
from django.utils.translation import ugettext as _

from ella.core.custom_urls import resolver
from ella.sendmail import views

urlpatterns = patterns('',
    url(r'^$', views.new_mail, name='sendmail-new'),
    url(r'^%s/$' % slugify(_('preview')), views.mail_preview, name='sendmail-preview'),
    url(r'^%s/$' % slugify(_('success')), views.mail_success, name='sendmail-success'),
    url(r'^%s/$' % slugify(_('error')), views.mail_error, name='sendmail-error'),
    url(r'^%s/$' % slugify(_('xml')), views.xml_sendmail_view, name='sendmail-xml'),
)

resolver.register(urlpatterns, prefix=slugify(_('send mail')))
コード例 #8
0
ファイル: urls.py プロジェクト: fragaria/ella-toolkit
'''
Created on 17.10.2011

@author: xaralis
'''
from django.conf.urls.defaults import patterns, url

from ella.articles.models import Article
from ella.core.custom_urls import resolver

from .views import article_detail, article_page

# List this only to enable inclusion from base urls.py DO NOT DELETE
urlpatterns = patterns('iw.iwapp.views',)

browse_article_patterns = patterns('iw.iwapps.views',
    url(r'^strana/(?P<page>\d+)/$', article_page, name="article_page")
)

resolver.register(browse_article_patterns, model=Article)
resolver.register_custom_detail(Article, article_detail)
コード例 #9
0
ファイル: urls.py プロジェクト: Almad/ella
from django.conf.urls.defaults import patterns, url

from ella.core.custom_urls import resolver
from ella.media.views import player_playlist_for_id, player_playlist

urlpatterns = patterns(
    "",
    url(r"^$", player_playlist, name="ella-media-playlist"),
    url(r"^(?P<embed>embed)/$", player_playlist, name="ella-media-playlist"),
    url(r"^playlist/(\d+)/$", player_playlist_for_id, name="ella-media-playlist-for-id"),
)

resolver.register(urlpatterns, prefix="playlist")
コード例 #10
0
ファイル: urls.py プロジェクト: whit/ella
from django.conf.urls.defaults import patterns, url

from ella.core.custom_urls import resolver
from ella.media.views import player_playlist_for_id, player_playlist

urlpatterns = patterns(
    '',
    url(r'^$', player_playlist, name='ella-media-playlist'),
    url(r'^(?P<embed>embed)/$', player_playlist, name='ella-media-playlist'),
    url(r'^playlist/(\d+)/$',
        player_playlist_for_id,
        name='ella-media-playlist-for-id'),
)

resolver.register(urlpatterns, prefix='playlist')
コード例 #11
0
ファイル: urls.py プロジェクト: SanomaCZ/ella-polls
    url(r'^poll/(?P<poll_id>\d+)/vote/$', poll_vote, name="polls_poll_vote"),

    # SURVEY - vote to survey
    url(r'^survey/(?P<survey_id>\d+)/vote/$', survey_vote, name="polls_survey_vote"),

    # CONTEST - vote to contest
    #url(r'^contest/(?P<contest_id>\d+)/vote/$', contest_vote, name="polls_contest_vote"),
    # QUIZ - votes to quiz
    #url(r'^quiz/(?P<quiz_id>\d+)/vote/$', quiz_vote, name="polls_quiz_vote"),
)


resolver.register_custom_detail(Quiz, quiz)
resolver.register_custom_detail(Contest, contest)

resolver.register(
    patterns('',
        url('^%s/$' % slugify(_('results')), result_details, name='polls-quiz-result')
    ),
    model=Quiz
)
resolver.register(
    patterns('',
        url('^%s/$' % slugify(_('result')), contest_result, name='polls-contest-result'),
        url('^%s/$' % slugify(_('conditions')), contest_conditions, name='polls-contest-conditions')
    ),
    model=Contest
)


コード例 #12
0
ファイル: urls.py プロジェクト: whit/ella
from django.utils.translation import ugettext as _
from django.template.defaultfilters import slugify
from django.conf.urls.defaults import patterns, url

from ella.core.custom_urls import resolver
from ella.ratings.views import rate

resolver.register(patterns(
    '',
    url('^$', rate, name='ratings-rate'),
),
                  prefix=slugify(_('rate')))
コード例 #13
0
ファイル: urls.py プロジェクト: Almad/ella
from django.utils.translation import ugettext as _
from django.template.defaultfilters import slugify
from django.conf.urls.defaults import patterns, url

from ella.core.custom_urls import resolver
from ella.ratings.views import rate

resolver.register(
    patterns('',
        url('^$', rate, name='ratings-rate'),
    ), prefix=slugify(_('rate'))
)
コード例 #14
0
from django.template.defaultfilters import slugify
from django.utils.translation import ugettext as _

from ella.core.custom_urls import resolver

from ella_quizzes.urls import urlpatterns
from ella_quizzes.models import Quiz

# register custom url patterns
resolver.register(urlpatterns, prefix=slugify(_('results')), model=Quiz)
コード例 #15
0
ファイル: register.py プロジェクト: ella/ella-quizzes
from django.template.defaultfilters import slugify
from django.utils.translation import ugettext as _

from ella.core.custom_urls import resolver

from ella_quizzes.urls import urlpatterns
from ella_quizzes.models import Quiz

# register custom url patterns
resolver.register(urlpatterns, prefix=slugify(_("results")), model=Quiz)
コード例 #16
0
ファイル: urls.py プロジェクト: whit/ella
from django.template.defaultfilters import slugify
from django.utils.translation import ugettext
from django.conf.urls.defaults import patterns, url

from ella.galleries.views import gallery_item_detail
from ella.galleries.models import Gallery
from ella.core.custom_urls import resolver


urlpatterns = patterns('',
    url(r'^(?P<item_slug>[\w-]+)/$', gallery_item_detail, name='gallery-item-detail'),
)

resolver.register(urlpatterns, prefix=slugify(ugettext('Item')), model=Gallery)
resolver.register_custom_detail(Gallery, gallery_item_detail)
コード例 #17
0
ファイル: urls.py プロジェクト: MichalMaM/ella-galleries
from django.template.defaultfilters import slugify
from django.utils.translation import ugettext
from django.conf.urls import url

from ella.core.custom_urls import resolver

from ella_galleries.views import gallery_item_detail
from ella_galleries.models import Gallery

urlpatterns = [
    url(r'^(?P<item_slug>[\w-]+)/(?P<url_remainder>.+/)$', gallery_item_detail, name='gallery-item-detail-custom'),
    url(r'^(?P<item_slug>[\w-]+)/$', gallery_item_detail, name='gallery-item-detail'),
]

resolver.register(urlpatterns, prefix=slugify(ugettext('Item')), model=Gallery)
resolver.register_custom_detail(Gallery, gallery_item_detail)
コード例 #18
0
ファイル: register.py プロジェクト: SanomaCZ/ella-contests
from ella.core.custom_urls import resolver

from ella_contests.urls import urlpatterns
from ella_contests.views import contest_detail
from ella_contests.models import Contest


# register custom url patterns
resolver.register(urlpatterns, model=Contest)
#resolver.register_custom_detail(Contest, contest_detail)