from django.conf.urls.defaults import * from django.contrib.auth.decorators import login_required from views import MyView, AddWishView, RemoveWishView, WishDetailLoginView, WishDetailView, AllLoginView, AllView, AddWishToMyWishListView from dargent.views import login_logout urlpatterns = patterns( '', url( r'^add-wish-to-my-wish-list', login_required( AddWishToMyWishListView.as_view() ) ), url( r'^add', login_required( AddWishView.as_view() ) ), url( r'^remove', login_required( RemoveWishView.as_view() ) ), url( r'^(\d+)', login_logout( WishDetailLoginView.as_view(), WishDetailView.as_view() ) ), url( r'^moi', login_required( MyView.as_view() ) ), url( r'^drugie', login_required( AllLoginView.as_view() ) ), url( r'^', AllView.as_view() ), )
from django.conf.urls.defaults import * from help.views import AddArticleView, EditArticleView, ArticleListLogoutView, ArticleListView, ArticleDetailLogoutView, ArticleDetailView from django.contrib.auth.decorators import login_required from dargent.views import login_logout urlpatterns = patterns( '', url( r'add', login_required( AddArticleView.as_view() ) ), url( r'edit/(\d+)', login_required( EditArticleView.as_view() ) ), url( r'^(\d+)', login_logout( ArticleDetailView.as_view(), ArticleDetailLogoutView.as_view() ) ), url( r'^', login_logout( ArticleListView.as_view(), ArticleListLogoutView.as_view() ) ), )