Exemple #1
0
# -*- coding: utf-8 -*-
from django.conf.urls import patterns, url
from packages.views import PackagesListView, PackageDetailView, create_user_package, pay_with_robokassa
from django.contrib.auth.decorators import login_required


urlpatterns = patterns('',
    url(r'^packages$', PackagesListView.as_view(), name='packages_list'),
    url(r'^package/create/(?P<pk>\d+)$', login_required(create_user_package), name='create_user_package'),
    url(r'^package/pre-create/(?P<pk>\d+)$', PackageDetailView.as_view(), name='pre_crete_user_package_detail'),
    url(r'^package/pay/$', pay_with_robokassa, name='robokassa'),
)
Exemple #2
0
# -*- encoding: utf-8 -*-
# vim: ts=4 sw=4 expandtab ai
#
# This file is part of Pylyglot.
#
# Pylyglot is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Pylyglot 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 General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Pylyglot.  If not, see <http://www.gnu.org/licenses/>.

from django.conf.urls import patterns, include, url
from packages.views import (PackageListView, PackageDetailView,
    PackageTranslationsListView)

urlpatterns = patterns('packages.views',
        url(r'^$', PackageListView.as_view(), name='package_list'),
        url(r'^(?P<slug>[\w-]+)/$', PackageDetailView.as_view(),
            name='package_detail'),
        url(r'^(?P<name>[\w-]+)/(?P<language>[\w@-]+)/$', PackageTranslationsListView.as_view(),
            name='package_translations_list'),
        url(r'^translation_packages/$', 'translation_packages', name='translation_packages'),
)
from django.conf.urls import patterns, include, url

from packages.views import PackageList, PackageDetailView, VersionDetailView
"""
Lifted directly from https://github.com/refreshoxford/django-cbv-inspector/blob/master/inspector/cbv/urls.py

URL variations:
project
project/version
project/version/module
project/version/module/class

e.g.
django
django/1.41a
django/1.41a/core
django/1.41a/core/DjangoRuntimeWarning

"""

urlpatterns = patterns('',
    url(r'^$', PackageList.as_view(), name='package_list'),
    url(r'^(?P<package>[a-zA-Z_-]+)/$', PackageDetailView.as_view(), name='package-detail'),
    url(r'^(?P<package>[a-zA-Z_-]+)/(?P<version>[^/]+)/$', VersionDetailView.as_view(), name='version-detail'),
#     url(r'^(?P<package>[a-zA-Z_-]+)/(?P<version>[^/]+)/(?P<module>[\.A-Za-z_-]+)/$', ModuleDetailView.as_view(), name='module-detail'),
#     url(r'^(?P<package>[a-zA-Z_-]+)/(?P<version>[^/]+)/(?P<module>[\.A-Za-z_-]+)/(?P<klass>[A-Za-z_-]*)/$', KlassDetailView.as_view(), name='klass-detail'),
)