コード例 #1
0
ファイル: routing.py プロジェクト: imclab/mediagoblin
def get_url_map():
    add_route('index', '/', 'mediagoblin.views:root_view')
    mount('/auth', auth_routes)
    mount('/a', admin_routes)

    import mediagoblin.submit.routing
    import mediagoblin.user_pages.routing
    import mediagoblin.edit.routing
    import mediagoblin.webfinger.routing
    import mediagoblin.listings.routing

    for route in PluginManager().get_routes():
        add_route(*route)

    return url_map
コード例 #2
0
def get_url_map():
    add_route('index', '/', 'mediagoblin.views:root_view')
    mount('/auth', auth_routes)
    mount('/a', admin_routes)

    import mediagoblin.submit.routing
    import mediagoblin.user_pages.routing
    import mediagoblin.edit.routing
    import mediagoblin.webfinger.routing
    import mediagoblin.listings.routing
    import mediagoblin.notifications.routing
    import mediagoblin.oauth.routing

    for route in PluginManager().get_routes():
        add_route(*route)

    return url_map
コード例 #3
0
def get_url_map():
    add_route('index', '/', 'mediagoblin.views:root_view')
    add_route('terms_of_service','/terms_of_service',
        'mediagoblin.views:terms_of_service'),
    mount('/auth', auth_routes)
    mount('/mod', moderation_routes)

    import mediagoblin.submit.routing
    import mediagoblin.user_pages.routing
    import mediagoblin.edit.routing
    import mediagoblin.listings.routing
    import mediagoblin.notifications.routing
    import mediagoblin.oauth.routing
    import mediagoblin.federation.routing

    for route in PluginManager().get_routes():
        add_route(*route)

    return url_map
コード例 #4
0
def get_url_map():
    add_route('index', '/', 'mediagoblin.views:root_view')
    add_route('terms_of_service', '/terms_of_service',
              'mediagoblin.views:terms_of_service'),
    mount('/auth', auth_routes)
    mount('/mod', moderation_routes)

    import mediagoblin.submit.routing
    import mediagoblin.user_pages.routing
    import mediagoblin.edit.routing
    import mediagoblin.listings.routing
    import mediagoblin.notifications.routing
    import mediagoblin.oauth.routing
    import mediagoblin.federation.routing

    for route in PluginManager().get_routes():
        add_route(*route)

    return url_map
コード例 #5
0
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

from mediagoblin.tools.routing import add_route

add_route('mediagoblin.user_pages.user_home',
          '/u/<string:user>/', 'mediagoblin.user_pages.views:user_home')

add_route('mediagoblin.user_pages.media_home',
          '/u/<string:user>/m/<string:media>/',
          'mediagoblin.user_pages.views:media_home')

add_route('mediagoblin.user_pages.media_confirm_delete',
          '/u/<string:user>/m/<int:media_id>/confirm-delete/',
          'mediagoblin.user_pages.views:media_confirm_delete')

# Submission handling of new comments. TODO: only allow for POST methods
add_route('mediagoblin.user_pages.media_post_comment',
          '/u/<string:user>/m/<int:media_id>/comment/add/',
          'mediagoblin.user_pages.views:media_post_comment')

add_route('mediagoblin.user_pages.media_preview_comment',
コード例 #6
0
ファイル: routing.py プロジェクト: RichoHan/MediaGoblin
# GNU MediaGoblin -- federated, autonomous media hosting
# Copyright (C) 2011, 2012 MediaGoblin contributors.  See AUTHORS.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

from mediagoblin.tools.routing import add_route

add_route('mediagoblin.import_flickr.start',
    '/import_flickr/', 'mediagoblin.import_flickr.views:submit_start')
#add_route('mediagoblin.import_flickr.collection', '/import_flickr/collection', 'mediagoblin.import_flickr.views:add_collection')
コード例 #7
0
ファイル: routing.py プロジェクト: ausbin/mediagoblin
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

from mediagoblin.tools.routing import add_route

# client registration & oauth
add_route(
        "mediagoblin.oauth.client_register",
        "/api/client/register",
        "mediagoblin.oauth.views:client_register"
        )

add_route(
        "mediagoblin.oauth.request_token",
        "/oauth/request_token",
        "mediagoblin.oauth.views:request_token"
        )

add_route(
        "mediagoblin.oauth.authorize",
        "/oauth/authorize",
        "mediagoblin.oauth.views:authorize",
        )
コード例 #8
0
ファイル: routing.py プロジェクト: RichoHan/MediaGoblin
# GNU MediaGoblin -- federated, autonomous media hosting
# Copyright (C) 2011, 2012 MediaGoblin contributors.  See AUTHORS.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

from mediagoblin.tools.routing import add_route

add_route('mediagoblin.listings.tags_listing',
          "/tag/<string:tag>/",
          "mediagoblin.listings.views:tag_listing")

# Atom feeds:
add_route('mediagoblin.listings.tag_atom_feed', "/tag/<string:tag>/atom/",
    "mediagoblin.listings.views:atom_feed")

# The all new entries feed
add_route('mediagoblin.listings.atom_feed', '/atom/',
    "mediagoblin.listings.views:atom_feed")
コード例 #9
0
# GNU MediaGoblin -- federated, autonomous media hosting
# Copyright (C) 2011, 2012 MediaGoblin contributors.  See AUTHORS.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

from mediagoblin.tools.routing import add_route

add_route('mediagoblin.notifications.subscribe_comments',
          '/u/<string:user>/m/<string:media>/notifications/subscribe/comments/',
          'mediagoblin.notifications.views:subscribe_comments')

add_route('mediagoblin.notifications.silence_comments',
          '/u/<string:user>/m/<string:media>/notifications/silence/',
          'mediagoblin.notifications.views:silence_comments')
コード例 #10
0
ファイル: routing.py プロジェクト: vasilenkomike/mediagoblin
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

from mediagoblin.tools.routing import add_route

add_route("mediagoblin.user_pages.user_home", "/u/<string:user>/", "mediagoblin.user_pages.views:user_home")

add_route(
    "mediagoblin.user_pages.media_home", "/u/<string:user>/m/<string:media>/", "mediagoblin.user_pages.views:media_home"
)

add_route(
    "mediagoblin.user_pages.media_home.report_media",
    "/u/<string:user>/m/<string:media>/report/",
    "mediagoblin.user_pages.views:file_a_report",
)

add_route(
    "mediagoblin.user_pages.media_confirm_delete",
    "/u/<string:user>/m/<int:media_id>/confirm-delete/",
    "mediagoblin.user_pages.views:media_confirm_delete",
コード例 #11
0
ファイル: routing.py プロジェクト: eliroca/mediagoblin-mirror
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

from mediagoblin.tools.routing import add_route

add_route('mediagoblin.user_pages.user_home', '/u/<string:user>/',
          'mediagoblin.user_pages.views:user_home')

add_route('mediagoblin.user_pages.media_home',
          '/u/<string:user>/m/<string:media>/',
          'mediagoblin.user_pages.views:media_home')

add_route('mediagoblin.user_pages.media_home.report_media',
          '/u/<string:user>/m/<string:media>/report/',
          'mediagoblin.user_pages.views:file_a_report')

add_route('mediagoblin.user_pages.media_confirm_delete',
          '/u/<string:user>/m/<int:media_id>/confirm-delete/',
          'mediagoblin.user_pages.views:media_confirm_delete')

add_route('mediagoblin.user_pages.activity_view',
          '/<string:username>/activity/<string:id>/',
コード例 #12
0
# GNU MediaGoblin -- federated, autonomous media hosting
# Copyright (C) 2011, 2012 MediaGoblin contributors.  See AUTHORS.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

from mediagoblin.tools.routing import add_route

add_route('mediagoblin.webfinger.host_meta', '/.well-known/host-meta',
    'mediagoblin.webfinger.views:host_meta')

add_route('mediagoblin.webfinger.xrd', '/webfinger/xrd',
        'mediagoblin.webfinger.views:xrd')
コード例 #13
0
ファイル: routing.py プロジェクト: RichoHan/MediaGoblin
# GNU MediaGoblin -- federated, autonomous media hosting
# Copyright (C) 2011, 2012 MediaGoblin contributors.  See AUTHORS.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

from mediagoblin.tools.routing import add_route

add_route('mediagoblin.submit.start',
    '/submit/', 'mediagoblin.submit.views:submit_start')
add_route('mediagoblin.submit.collection', '/submit/collection', 'mediagoblin.submit.views:add_collection')
コード例 #14
0
ファイル: routing.py プロジェクト: eliroca/mediagoblin-mirror
# GNU MediaGoblin -- federated, autonomous media hosting
# Copyright (C) 2011, 2012 MediaGoblin contributors.  See AUTHORS.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

from mediagoblin.tools.routing import add_route

add_route('mediagoblin.notifications.subscribe_comments',
          '/u/<string:user>/m/<string:media>/notifications/subscribe/comments/',
          'mediagoblin.notifications.views:subscribe_comments')

add_route('mediagoblin.notifications.silence_comments',
          '/u/<string:user>/m/<string:media>/notifications/silence/',
          'mediagoblin.notifications.views:silence_comments')

add_route('mediagoblin.notifications.mark_all_comment_notifications_seen',
          '/notifications/comments/mark_all_seen/',
          'mediagoblin.notifications.views:mark_all_comment_notifications_seen')
コード例 #15
0
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

from mediagoblin.tools.routing import add_route

# client registration & oauth
add_route("mediagoblin.oauth", "/api/client/register",
          "mediagoblin.oauth.views:client_register")

add_route("mediagoblin.oauth", "/oauth/request_token",
          "mediagoblin.oauth.views:request_token")

add_route(
    "mediagoblin.oauth",
    "/oauth/authorize",
    "mediagoblin.oauth.views:authorize",
)

add_route("mediagoblin.oauth", "/oauth/access_token",
          "mediagoblin.oauth.views:access_token")
コード例 #16
0
ファイル: routing.py プロジェクト: imclab/mediagoblin
# GNU MediaGoblin -- federated, autonomous media hosting
# Copyright (C) 2011, 2012 MediaGoblin contributors.  See AUTHORS.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

from mediagoblin.tools.routing import add_route

add_route('mediagoblin.edit.profile', '/edit/profile/',
    'mediagoblin.edit.views:edit_profile')
add_route('mediagoblin.edit.account', '/edit/account/',
    'mediagoblin.edit.views:edit_account')
コード例 #17
0
ファイル: routing.py プロジェクト: eliroca/mediagoblin-mirror
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

from mediagoblin.tools.routing import add_route

# Add user profile
add_route(
    "media.api.user",
    "/api/user/<string:username>/",
    "mediagoblin.api.views:user_endpoint",
    match_slash=False
)

add_route(
    "mediagoblin.api.user.profile",
    "/api/user/<string:username>/profile/",
    "mediagoblin.api.views:profile_endpoint",
    match_slash=False
)

# Inbox and Outbox (feed)
add_route(
    "mediagoblin.api.feed",
    "/api/user/<string:username>/feed/",
    "mediagoblin.api.views:feed_endpoint",
コード例 #18
0
ファイル: routing.py プロジェクト: praveen97uma/goblin
# GNU MediaGoblin -- federated, autonomous media hosting
# Copyright (C) 2011, 2012 MediaGoblin contributors.  See AUTHORS.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

from mediagoblin.tools.routing import add_route

add_route('mediagoblin.search.search', '/search/',
    'mediagoblin.search.views:search')

add_route('mediagoblin.search.index', '/search/index/',
    'mediagoblin.search.views:gen_media_index')
コード例 #19
0
ファイル: routing.py プロジェクト: spaetz/mediagoblin_blog
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

from mediagoblin.tools.routing import add_route

add_route('mediagoblin.edit.profile', '/u/<string:user>/edit/',
    'mediagoblin.edit.views:edit_profile')
add_route('mediagoblin.edit.legacy_edit_profile', '/edit/profile/',
    'mediagoblin.edit.views:legacy_edit_profile')
add_route('mediagoblin.edit.account', '/edit/account/',
    'mediagoblin.edit.views:edit_account')
add_route('mediagoblin.edit.delete_account', '/edit/account/delete/',
    'mediagoblin.edit.views:delete_account')
add_route('mediagoblin.edit.pass', '/edit/password/',
    'mediagoblin.edit.views:change_pass')
add_route('mediagoblin.edit.verify_email', '/edit/verify_email/',
    'mediagoblin.edit.views:verify_email')
add_route('mediagoblin.edit.email', '/edit/email/',
    'mediagoblin.edit.views:change_email')
コード例 #20
0
# GNU MediaGoblin -- federated, autonomous media hosting
# Copyright (C) 2011, 2012 MediaGoblin contributors.  See AUTHORS.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

from mediagoblin.tools.routing import add_route

add_route('mediagoblin.submit.start', '/submit/',
          'mediagoblin.submit.views:submit_start')
add_route('mediagoblin.submit.collection', '/submit/collection',
          'mediagoblin.submit.views:add_collection')
コード例 #21
0
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

from mediagoblin.tools.routing import add_route

# Add user profile
add_route("mediagoblin.federation.user", "/api/user/<string:username>/",
          "mediagoblin.federation.views:user")

add_route("mediagoblin.federation.user.profile",
          "/api/user/<string:username>/profile",
          "mediagoblin.federation.views:profile")

# Inbox and Outbox (feed)
add_route("mediagoblin.federation.feed", "/api/user/<string:username>/feed",
          "mediagoblin.federation.views:feed")

add_route("mediagoblin.federation.user.uploads",
          "/api/user/<string:username>/uploads",
          "mediagoblin.federation.views:uploads")

add_route("mediagoblin.federation.inbox", "/api/user/<string:username>/inbox",
          "mediagoblin.federation.views:feed")
コード例 #22
0
ファイル: routing.py プロジェクト: praveen97uma/goblin
# GNU MediaGoblin -- federated, autonomous media hosting
# Copyright (C) 2011, 2012 MediaGoblin contributors.  See AUTHORS.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

from mediagoblin.tools.routing import add_route

add_route('mediagoblin.edit.profile', '/u/<string:user>/edit/',
    'mediagoblin.edit.views:edit_profile')
add_route('mediagoblin.edit.legacy_edit_profile', '/edit/profile/',
    'mediagoblin.edit.views:legacy_edit_profile')
add_route('mediagoblin.edit.account', '/edit/account/',
    'mediagoblin.edit.views:edit_account')
add_route('mediagoblin.edit.delete_account', '/edit/account/delete/',
    'mediagoblin.edit.views:delete_account')
コード例 #23
0
ファイル: routing.py プロジェクト: incorpusyehtee/mediagoblin
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

from mediagoblin.tools.routing import add_route

# Add user profile
add_route(
    "mediagoblin.federation.user",
    "/api/user/<string:username>/",
    "mediagoblin.federation.views:user"
)

add_route(
    "mediagoblin.federation.user.profile",
    "/api/user/<string:username>/profile",
    "mediagoblin.federation.views:profile"
)

# Inbox and Outbox (feed)
add_route(
    "mediagoblin.federation.feed",
    "/api/user/<string:username>/feed",
    "mediagoblin.federation.views:feed"
)
コード例 #24
0
ファイル: routing.py プロジェクト: sherlockliu/mediagoblin
# GNU MediaGoblin -- federated, autonomous media hosting
# Copyright (C) 2011, 2012 MediaGoblin contributors.  See AUTHORS.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

from mediagoblin.tools.routing import add_route

add_route('mediagoblin.edit.profile', '/u/<string:user>/edit/',
          'mediagoblin.edit.views:edit_profile')
add_route('mediagoblin.edit.legacy_edit_profile', '/edit/profile/',
          'mediagoblin.edit.views:legacy_edit_profile')
add_route('mediagoblin.edit.account', '/edit/account/',
          'mediagoblin.edit.views:edit_account')
add_route('mediagoblin.edit.delete_account', '/edit/account/delete/',
          'mediagoblin.edit.views:delete_account')
add_route('mediagoblin.edit.verify_email', '/edit/verify_email/',
          'mediagoblin.edit.views:verify_email')
add_route('mediagoblin.edit.email', '/edit/email/',
          'mediagoblin.edit.views:change_email')
コード例 #25
0
ファイル: routing.py プロジェクト: ausbin/mediagoblin
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

from mediagoblin.tools.routing import add_route

add_route('mediagoblin.user_pages.user_home',
          '/u/<string:user>/', 'mediagoblin.user_pages.views:user_home')

add_route('mediagoblin.user_pages.media_home',
          '/u/<string:user>/m/<string:media>/',
          'mediagoblin.user_pages.views:media_home')

add_route('mediagoblin.user_pages.media_home.report_media',
          '/u/<string:user>/m/<string:media>/report/',
          'mediagoblin.user_pages.views:file_a_report')

add_route('mediagoblin.user_pages.media_confirm_delete',
          '/u/<string:user>/m/<int:media_id>/confirm-delete/',
          'mediagoblin.user_pages.views:media_confirm_delete')

add_route('mediagoblin.user_pages.activity_view',
          '/<string:username>/activity/<string:id>/',
コード例 #26
0
# GNU MediaGoblin -- federated, autonomous media hosting
# Copyright (C) 2011, 2012 MediaGoblin contributors.  See AUTHORS.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

from mediagoblin.tools.routing import add_route

add_route('mediagoblin.listings.tags_listing', "/tag/<string:tag>/",
          "mediagoblin.listings.views:tag_listing")

# Atom feeds:
add_route('mediagoblin.listings.tag_atom_feed', "/tag/<string:tag>/atom/",
          "mediagoblin.listings.views:atom_feed")

# The all new entries feed
add_route('mediagoblin.listings.atom_feed', '/atom/',
          "mediagoblin.listings.views:atom_feed")
コード例 #27
0
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

from mediagoblin.tools.routing import add_route

# Add user profile
add_route(
    "mediagoblin.federation.user",
    "/api/user/<string:username>/",
    "mediagoblin.federation.views:user_endpoint"
)

add_route(
    "mediagoblin.federation.user.profile",
    "/api/user/<string:username>/profile",
    "mediagoblin.federation.views:profile_endpoint"
)

# Inbox and Outbox (feed)
add_route(
    "mediagoblin.federation.feed",
    "/api/user/<string:username>/feed",
    "mediagoblin.federation.views:feed_endpoint"
)