Beispiel #1
0
from misago.core.apirouter import MisagoApiRouter

from ..api import auth, captcha
from ..api.ranks import RanksViewSet
from ..api.usernamechanges import UsernameChangesViewSet
from ..api.users import UserViewSet

urlpatterns = [
    url(r'^auth/$', auth.gateway, name='auth'),
    url(r'^auth/criteria/$', auth.get_criteria, name='auth-criteria'),
    url(r'^auth/send-activation/$',
        auth.send_activation,
        name='send-activation'),
    url(r'^auth/send-password-form/$',
        auth.send_password_form,
        name='send-password-form'),
    url(r'^auth/change-password/(?P<pk>\d+)/(?P<token>[a-zA-Z0-9]+)/$',
        auth.change_forgotten_password,
        name='change-forgotten-password'),
    url(r'^captcha-question/$', captcha.question, name='captcha-question'),
]

router = MisagoApiRouter()
router.register(r'ranks', RanksViewSet)
router.register(r'users', UserViewSet)
router.register(r'username-changes',
                UsernameChangesViewSet,
                base_name='usernamechange')
urlpatterns += router.urls
Beispiel #2
0
from django.conf.urls import patterns, url
from misago.core.apirouter import MisagoApiRouter
from misago.users.api.ranks import RanksViewSet
from misago.users.api.users import UserViewSet
from misago.users.api.usernamechanges import UsernameChangesViewSet


urlpatterns = patterns('misago.users.api.auth',
    url(r'^auth/$', 'gateway', name='auth'),
    url(r'^auth/send-activation/$', 'send_activation', name='send_activation'),
    url(r'^auth/send-password-form/$', 'send_password_form', name='send_password_form'),
    url(r'^auth/change-password/(?P<user_id>\d+)/(?P<token>[a-zA-Z0-9]+)/$', 'change_forgotten_password', name='change_forgotten_password'),
)

urlpatterns += patterns('misago.users.api.captcha',
    url(r'^captcha-question/$', 'question', name='captcha_question'),
)

router = MisagoApiRouter()
router.register(r'ranks', RanksViewSet)
router.register(r'users', UserViewSet)
router.register(r'username-changes', UsernameChangesViewSet)
urlpatterns += router.urls
Beispiel #3
0
from django.conf.urls import patterns, url
from misago.core.apirouter import MisagoApiRouter
from misago.users.api.users import UserViewSet
from misago.users.api.usernamechanges import UsernameChangesViewSet


urlpatterns = patterns(
    "misago.users.api.auth",
    url(r"^auth/$", "gateway"),
    url(r"^auth/send-activation/$", "send_activation"),
    url(r"^auth/activate-account/(?P<user_id>\d+)/(?P<token>[a-zA-Z0-9]+)/$", "activate_account"),
    url(r"^auth/send-password-form/$", "send_password_form"),
    url(r"^auth/change-password/(?P<user_id>\d+)/(?P<token>[a-zA-Z0-9]+)/$", "change_forgotten_password"),
)

urlpatterns += patterns(
    "misago.users.api.captcha", url(r"^captcha-questions/(?P<question_id>\d+)/$", "question", name="captcha_question")
)

router = MisagoApiRouter()
router.register(r"users", UserViewSet)
router.register(r"username-changes", UsernameChangesViewSet)
urlpatterns += router.urls
Beispiel #4
0
from misago.core.apirouter import MisagoApiRouter

from ..api import CategoryViewSet


router = MisagoApiRouter()
router.register(r'categories', CategoryViewSet, base_name='category')
urlpatterns = router.urls
Beispiel #5
0
from misago.core.apirouter import MisagoApiRouter

from ..api.attachments import AttachmentViewSet
from ..api.threadpoll import ThreadPollViewSet
from ..api.threadposts import PrivateThreadPostsViewSet, ThreadPostsViewSet
from ..api.threads import PrivateThreadViewSet, ThreadViewSet

router = MisagoApiRouter()

router.register(r'attachments', AttachmentViewSet, base_name='attachment')

router.register(r'threads', ThreadViewSet, base_name='thread')
router.register(r'threads/(?P<thread_pk>[^/.]+)/posts',
                ThreadPostsViewSet,
                base_name='thread-post')
router.register(r'threads/(?P<thread_pk>[^/.]+)/poll',
                ThreadPollViewSet,
                base_name='thread-poll')

router.register(r'private-threads',
                PrivateThreadViewSet,
                base_name='private-thread')
router.register(r'private-threads/(?P<thread_pk>[^/.]+)/posts',
                PrivateThreadPostsViewSet,
                base_name='private-thread-post')

urlpatterns = router.urls
Beispiel #6
0
from misago.core.apirouter import MisagoApiRouter

from ..api.attachments import AttachmentViewSet
from ..api.threadpoll import ThreadPollViewSet
from ..api.threadposts import PrivateThreadPostsViewSet, ThreadPostsViewSet
from ..api.threads import PrivateThreadViewSet, ThreadViewSet


router = MisagoApiRouter()

router.register(r'attachments', AttachmentViewSet, base_name='attachment')

router.register(r'threads', ThreadViewSet, base_name='thread')
router.register(r'threads/(?P<thread_pk>[^/.]+)/posts', ThreadPostsViewSet, base_name='thread-post')
router.register(r'threads/(?P<thread_pk>[^/.]+)/poll', ThreadPollViewSet, base_name='thread-poll')

router.register(r'private-threads', PrivateThreadViewSet, base_name='private-thread')
router.register(r'private-threads/(?P<thread_pk>[^/.]+)/posts', PrivateThreadPostsViewSet, base_name='private-thread-post')

urlpatterns = router.urls
Beispiel #7
0
from misago.core.apirouter import MisagoApiRouter

from ..api.threadposts import ThreadPostsViewSet
from ..api.threads import ThreadViewSet

router = MisagoApiRouter()
router.register(r'threads', ThreadViewSet, base_name='thread')
router.register(r'threads/(?P<thread_pk>[^/.]+)/posts',
                ThreadPostsViewSet,
                base_name='thread-post')
urlpatterns = router.urls
Beispiel #8
0
from misago.core.apirouter import MisagoApiRouter

from onlinejudge.api.problems import ProblemsViewSet

urlpatterns = []

router = MisagoApiRouter()
router.register(r'problems', ProblemsViewSet, base_name='problems')
urlpatterns += router.urls
Beispiel #9
0
from misago.core.apirouter import MisagoApiRouter

from ..api.threadposts import ThreadPostsViewSet
from ..api.threads import ThreadViewSet


router = MisagoApiRouter()
router.register(r'threads', ThreadViewSet, base_name='thread')
router.register(r'threads/(?P<thread_pk>[^/.]+)/posts', ThreadPostsViewSet, base_name='thread-post')
urlpatterns = router.urls
Beispiel #10
0
from django.conf.urls import url

from misago.core.apirouter import MisagoApiRouter
from misago.users.api import auth, captcha, mention
from misago.users.api.ranks import RanksViewSet
from misago.users.api.usernamechanges import UsernameChangesViewSet
from misago.users.api.users import UserViewSet


urlpatterns = [
    url(r'^auth/$', auth.gateway, name='auth'),
    url(r'^auth/criteria/$', auth.get_criteria, name='auth-criteria'),
    url(r'^auth/send-activation/$', auth.send_activation, name='send-activation'),
    url(r'^auth/send-password-form/$', auth.send_password_form, name='send-password-form'),
    url(
        r'^auth/change-password/(?P<pk>\d+)/(?P<token>[a-zA-Z0-9]+)/$',
        auth.change_forgotten_password,
        name='change-forgotten-password'
    ),
    url(r'^captcha-question/$', captcha.question, name='captcha-question'),
    url(r'^mention/$', mention.mention_suggestions, name='mention-suggestions'),
]

router = MisagoApiRouter()
router.register(r'ranks', RanksViewSet)
router.register(r'users', UserViewSet)
router.register(r'username-changes', UsernameChangesViewSet, base_name='usernamechange')
urlpatterns += router.urls
Beispiel #11
0
from misago.core.apirouter import MisagoApiRouter
from misago.threads.api.threads import ThreadViewSet


router = MisagoApiRouter()
router.register(r'threads', ThreadViewSet, base_name='thread')
urlpatterns = router.urls
Beispiel #12
0
from misago.core.apirouter import MisagoApiRouter
from misago.threads.api.threads import ThreadViewSet

router = MisagoApiRouter()
router.register(r'threads', ThreadViewSet, base_name='thread')
urlpatterns = router.urls
Beispiel #13
0
from misago.core.apirouter import MisagoApiRouter

from ..api import CategoryViewSet

router = MisagoApiRouter()
router.register(r'categories', CategoryViewSet, base_name='category')
urlpatterns = router.urls
Beispiel #14
0
from django.conf.urls import patterns, url
from misago.core.apirouter import MisagoApiRouter
from misago.users.api.users import UserViewSet
from misago.users.api.usernamechanges import UsernameChangesViewSet

urlpatterns = patterns(
    'misago.users.api.auth',
    url(r'^auth/$', 'gateway'),
    url(r'^auth/send-activation/$', 'send_activation'),
    url(r'^auth/activate-account/(?P<user_id>\d+)/(?P<token>[a-zA-Z0-9]+)/$',
        'activate_account'),
    url(r'^auth/send-password-form/$', 'send_password_form'),
    url(r'^auth/change-password/(?P<user_id>\d+)/(?P<token>[a-zA-Z0-9]+)/$',
        'change_forgotten_password'),
)

urlpatterns += patterns(
    'misago.users.api.captcha',
    url(r'^captcha-questions/(?P<question_id>\d+)/$',
        'question',
        name='captcha_question'),
)

router = MisagoApiRouter()
router.register(r'users', UserViewSet)
router.register(r'username-changes', UsernameChangesViewSet)
urlpatterns += router.urls