Ejemplo n.º 1
0
from django.conf.urls import patterns, include, url
from django.contrib import admin
from bookmarks.views import CustomRegistrationView, ListBookmarkView

admin.autodiscover()

urlpatterns = patterns('',
    url(r'^admin/', include(admin.site.urls)),
    url(r'^api/', include('bookmarks_api.urls')),
    url(r'^accounts/register/$', CustomRegistrationView.as_view(), name='register'),
    url(r'^accounts/logout/$', 'django.contrib.auth.views.logout', {'next_page': '/'}, name='logout'),
    url(r'^accounts/', include('registration.backends.simple.urls')),
    url(r'^bookmarks/', include('bookmarks.urls')),
    url(r'^$', ListBookmarkView.as_view())
)
Ejemplo n.º 2
0
from django.conf.urls import patterns, url
from bookmarks.views import CreateBookmarkView, ListBookmarkView, \
    DeleteBookmarkView, EditBookmarkView, BookmarkItemView

urlpatterns = patterns('',
    url(r'^$', ListBookmarkView.as_view(), name='list_bookmarks'),
    url(r'^tag/(?P<tag_slug>[\w-]+)$', ListBookmarkView.as_view(), name='list_bookmarks_by_tag'),
    url(r'^add/$', CreateBookmarkView.as_view(), name='add_bookmark'),
    url(r'^delete/(?P<pk>\d+)$', DeleteBookmarkView.as_view(), name='delete_bookmark'),
    url(r'^edit/(?P<pk>\d+)$', EditBookmarkView.as_view(), name='edit_bookmark'),
    url(r'^view/(?P<pk>\d+)$', BookmarkItemView.as_view(), name='view_bookmark'),
)