示例#1
0
from django.conf.urls.defaults import patterns, url
from django.views.generic import DetailView, ListView

from models import Post
from views import PostCreateView, PostUpdateView

urlpatterns = patterns('',
    url(r'^$', ListView.as_view( 
            queryset=Post.objects.all(),
        ),
        name='getinvolved_post_list'
    ),

    url(r'^posts/add/$', PostCreateView.as_view(),
        name='getinvolved_post_create'),

    url(r'^posts/(?P<pk>\d+)/edit/$', PostUpdateView.as_view(),
        name='getinvolved_post_update'),

    url(r'^posts/(?P<pk>\d+)/$', DetailView.as_view(
            model=Post,
        ), name='getinvolved_post_detail'
    ),
)
from django.conf.urls import patterns, url
from views import PostCreateView, PostDetailView, PostUpdateView, PostDeleteView

urlpatterns = patterns('',
    url(r'^add/$', PostCreateView.as_view(), name='create'),
    url(r'^(?P<pk>[\w\d]+)/$', PostDetailView.as_view(), name='detail'),
    url(r'^(?P<pk>[\w\d]+)/edit/$', PostUpdateView.as_view(), name='update'),
    url(r'^(?P<pk>[\w\d]+)/delete/$', PostDeleteView.as_view(), name='delete'),
)

示例#3
0
# coding=utf-8
from django.conf.urls import patterns, url

from views import (PostListView, PostCreateView, PostDetailView,
                   PostUpdateView, PostDeleteView)

urlpatterns = patterns(
    '',
    url(r'^$', PostListView.as_view(), name='post_list'),
    url(r'^create$', PostCreateView.as_view(), name='post_create'),
    url(r'^(?P<pk>\d+)/$', PostDetailView.as_view(), name='post_detail'),
    url(r'^(?P<pk>\d+)/edit/$', PostUpdateView.as_view(), name='post_update'),
    url(r'^(?P<pk>\d+)/delete/$', PostDeleteView.as_view(),
        name='post_delete'),
)
示例#4
0
from django.conf.urls import patterns, url, include
from . import views
from views import PostListView, PostDetailView, PostCreateView, PostForm
#from views import *

urlpatterns = patterns('',
    url(r'^$', PostListView.as_view(), name='home'),
    url(r'^post/(?P<pk>\d+)/$', PostDetailView.as_view(), name='post'),
    url(r'^post/new/$', PostCreateView.as_view(), kwargs={'next_page' : 'home'}, name='post_new'),
    url(r'^social/', include('social.apps.django_app.urls', namespace ='social')),
    #url(r'^blog/new/$', views.post_new, name='post_new') 
    #url(r'^social/', include('social.apps.django_app.urls', namespace ='social')),
   

)
示例#5
0
from django.conf.urls import url
from views import PostListView, PostDisplayView, PostCreateView, PostUpdateView, PostDeleteView, homepage, post_comment, post_note

urlpatterns = [
    # url(r'^create$', post_create),
    url(r'^create$', PostCreateView.as_view(), name="post_create"),
    # url(r'^list$', post_list),
    url(r'^list$', PostListView.as_view(), name="post_list"),
    # url(r'^(?P<slug>[\w-]+)$', post_display),
    url(r'^(?P<slug>[\w-]+)$', PostDisplayView.as_view(), name="post_display"),
    # url(r'^(?P<slug>[\w-]+)/edit$', post_edit),
    url(r'^(?P<slug>[\w-]+)/edit$', PostUpdateView.as_view(), name="post_edit"),
    url(r'^(?P<slug>[\w-]+)/delete$', PostDeleteView.as_view(), name="post_delete"),
    url(r'^(?P<slug>[\w-]+)/comment$', post_comment, name="post_comment"),
    url(r'^(?P<slug>[\w-]+)/note$', post_note, name="post_note"),
]
示例#6
0
from django.conf.urls import patterns, url
from views import PostCreateView, PostDetailView, PostUpdateView, PostDeleteView, goServices, goPost
from . import views
from rest_framework.urlpatterns import format_suffix_patterns

urlpatterns = patterns(
    '', url(r'^add/$', PostCreateView.as_view(), name='create'),
    url(r'^(?P<pk>[\w\d]+)/$', PostDetailView.as_view(), name='detail'),
    url(r'^(?P<pk>[\w\d]+)/edit/$', PostUpdateView.as_view(), name='update'),
    url(r'^(?P<pk>[\w\d]+)/delete/$', PostDeleteView.as_view(), name='delete'),
    url(r'^post/list$', views.post_list, name='post_list'),
    url(r'^post/guardar$', views.guardar_post, name='guardar_post'),
    url(r'^Services$', views.goServices, name='mostrar'),
    url(r'^Google$', views.goapiGoogle, name='goapiGoogle'),
    url(r'^Post$', views.goPost, name='goPost'),
    url(r'^Hostoria$', views.goHistoria, name='goHistoria'),
    url(r'^Gallery$', views.goGallery, name='goGallery'))

urlpatterns = format_suffix_patterns(urlpatterns)
示例#7
0
from django.conf.urls import patterns, url
from django.contrib.auth.decorators import login_required

from views import CategoryListView, ForumDetailView, TopicDetailView, TopicCreateView, PostCreateView


urlpatterns = patterns('',
    url(r'^$', CategoryListView.as_view(), name='overview'),
    url(r'^(?P<pk>\d+)/$', ForumDetailView.as_view(), name='forum'),
    url(r'^(?P<forum_id>\d+)/create/$', login_required(TopicCreateView.as_view()), name='topic_create'),
    url(r'^topic/(?P<pk>\d+)/$', TopicDetailView.as_view(), name='topic'),
    url(r'^topic/(?P<pk>\d+)/create/$', login_required(PostCreateView.as_view()), name='post_create'),
)
示例#8
0
    PostEditView,
    PostDeleteView,
    UserProfileView,
    UserProfileUpdateView,
    UserProfileCreateView,
    LoginView,
    RegisterView,
    LogoutView,
    UploadImage,
    
)

urlpatterns = [
    url(r'^$', index, name='index'),
    url(r'^login/$', LoginView.as_view(), name='login'),
    url(r'^register/$', RegisterView.as_view(), name='register'),
    url(r'^logout/$', LogoutView.as_view(), name='logout'),
    url(r'^$', PostListView.as_view(), name='post_list'),
    url(r'^post/(?P<pk>[0-9]+)/create$', PostCreateView.as_view(), name='post_create'),
    url(r'^post/(?P<pk>[0-9]+)/edit$', PostEditView.as_view(), name='post_edit'),
    url(r'^post/(?P<pk>[0-9]+)$', post_detail, name='post_detail'),
    url(r'^post/(?P<pk>[0-9]+)/delete$', PostDeleteView.as_view(), name='post_delete'),
    url(r'^post/(?P<pk>[0-9]+)/comment/create$', CommentCreateView.as_view(), name='comment_create'),
    url(r'^userprofile/(?P<pk>[0-9]+)$', UserProfileView.as_view(), name='user_profile'),
    url(r'^userprofile/(?P<pk>[0-9]+)/edit$', UserProfileUpdateView.as_view(),name='profile_edit'),
     url(r'^userprofile/(?P<pk>[0-9]+)/create$', UserProfileCreateView.as_view(),
        name='user_profile_create'),
    url(r'^post/(?P<pk>[0-9]+)/comment/(?P<pk_comment>[0-9]+)/edit$', CommentEditView.as_view(), name='comment_edit'),
    url(r'^post/(?P<pk>[0-9]+)/comment/(?P<pk_comment>[0-9]+)/delete$', CommentDeleteView.as_view(), name='comment_delete'),
    url(r'^post/(?P<pk>[0-9]+)/image/create$', UploadImage.as_view(), name='upload_image'),
] + static(settings.STATIC_URL, document_root = settings.STATIC_ROOT) + static(settings.MEDIA_URL, document_root = settings.MEDIA_ROOT) 
示例#9
0
from django.conf.urls import patterns, url
from views import PostCreateView, PostDetailView, PostUpdateView, PostDeleteView, TagListView

urlpatterns = patterns(
    "",
    url(r"^tags/$", TagListView.as_view(), name="tag-list"),
    url(r"^add/$", PostCreateView.as_view(), name="post-create"),
    url(r"^(?P<pk>[\w\d]+)/$", PostDetailView.as_view(), name="post-detail"),
    url(r"^(?P<pk>[\w\d]+)/edit/$", PostUpdateView.as_view(), name="post-update"),
    url(r"^(?P<pk>[\w\d]+)/delete/$", PostDeleteView.as_view(), name="post-delete"),
)