Esempio n. 1
0
from django.urls import path, re_path

from blog.views import (
    ArticlesView,
    DashboardView,
    AddarticleView,
    ArticleView,
    UpdateView,
    DeleteView,
    CommentView,
    TagView,
)

app_name = 'blog'
urlpatterns = [
    re_path(r'^$', ArticlesView.as_view(), name='articles'),
    re_path(r'^(?P<id>\d+)/$', TagView.as_view(), name='tag'),
    re_path(r'^dashboard/$', DashboardView.as_view(), name='dashboard'),
    re_path(r'^addarticle/$', AddarticleView.as_view(), name='addarticle'),
    re_path(r'^article/(?P<id>\d+)/$', ArticleView.as_view(), name='article'),
    re_path(r'^update/(?P<id>\d+)/$', UpdateView.as_view(), name='update'),
    re_path(r'^delete/(?P<id>\d+)/$', DeleteView.as_view(), name='delete'),
    re_path(r'^comment/(?P<id>\d+)/$', CommentView.as_view(), name='comment'),
]
Esempio n. 2
0
from contacts.views import MailView
from gallery.views import GalleryView
admin.autodiscover()

urlpatterns = patterns('',
    url(r'^$', HomeView.as_view()),
    url(r'^mail/$', MailView.as_view()),
    url(r'^mail/feedback/$', MailView.as_view()),
    url(r'^about/$', AboutView.as_view()),
    url(r'^faqs/$', FaqsView.as_view()),
    url(r'^history/$', HistoryView.as_view()),
    url(r'^index6/$', Index6View.as_view()),
    url(r'^events/$', EventsView.as_view()),
    url(r'^club-events/$', ClubEventsView.as_view()),
    url(r'^events/([0-9a-zA-Z-]+)$', SingleEventView.as_view()),
    url(r'^articles/$', ArticlesView.as_view()),
    url(r'^articles/([0-9a-zA-Z-]+)$', SingleArticleView.as_view()),
    url(r'^lessons/$', LessonsView.as_view()),
    url(r'^lessons/([0-9a-zA-Z-]+)$', SingleLessonView.as_view()),
    url(r'^videos/$', VideosView.as_view()),
    url(r'^videos/([0-9a-zA-Z-]+)$', SingleVideoView.as_view()),
    url(r'^gallery/$', GalleryView.as_view()),
    url(r'^privacy/$', PrivacyView.as_view()),
    url(r'^sitemap.xml$', SitemapView.as_view()),
    url(r'^admin/', include(admin.site.urls)),
    url(r'^i18n/(\w+)/', LocalizationView.as_view()),
    url(r'^ckeditor/', include('ckeditor.urls')),

)

if settings.DEBUG:
Esempio n. 3
0
from django.conf.urls import url

from blog.views import blogs, single_blog, user_articles, like_article, like_article_rest, ArticlesView

urlpatterns = [
    url(r'^$', blogs, name='all_articles'),
    url(r'^single/(?P<article_id>\d+)/$',
        single_blog,
        name='single_article_page'),
    url(r'^single/(?P<article_id>\d+)/like/$',
        like_article,
        name='like_article'),
    url(r'^user/(?P<user_id>\d+)/$', user_articles, name='user_articles'),
    url(r'^like-article-rest/$', like_article_rest, name='like_article_rest'),
    url(r'^articles-rest/$', ArticlesView.as_view()),
    url(r'^articles-rest/(?P<pk>\d+)/$', ArticlesView.as_view()),
]

# /blog/ -> all blogs
# /blog/single/12345/ -> single blog
# /blog/user/123456/ -> single user(with all articles)
Esempio n. 4
0
from django.conf.urls import url
from django.contrib import admin

from blog.views import ArticleFormView, ArticlesView

urlpatterns = [
    url('admin/', admin.site.urls),
    url(r'^$', ArticlesView.as_view(), name='article_list'),
    url(r'article/create/', ArticleFormView.as_view(), name='create_article')
]
Esempio n. 5
0
from django.conf import settings

from django.conf.urls.static import static

from django.contrib import admin

admin.autodiscover()

urlpatterns = patterns(
    "",
    # Examples:
    # url(r'^$', 'personal.views.home', name='home'),
    # url(r'^blog/', include('blog.urls')),
    url(r"^$", IndexView.as_view(), name="index"),
    url(r"^index.*$", IndexView.as_view(), name="index"),
    url(r"^about/", AboutView.as_view(), name="about"),
    url(r"^project/((?P<slug>[-\w]+))/(?P<id>\d+)/$", ProjectView.as_view(), name="project"),
    url(r"^projects/$", ProjectsView.as_view(), name="projects"),
    url(r"^article/(?P<id>\d+)/$", ArticleView.as_view(), name="article"),
    url(r"^article/(?P<slug>[-\w]+)/(?P<id>\d+)/$", ArticleView.as_view(), name="article"),
    url(r"^articles/$", ArticlesView.as_view(), name="articles"),
    url(r"^articles/(?P<slug>[-\w]+)/(?P<id>\d+)/$", ArticlesView.as_view(), name="articles"),
    url(r"^resources/$", ResourcesView.as_view(), name="resources"),
    url(r"^code_snippets/$", CodeSnippetsView.as_view(), name="code_snippets"),
    url(r"^publications/$", PublicationsView.as_view(), name="publications"),
    url(r"^admin/", include(admin.site.urls)),
    url(r"^grappelli/", include("grappelli.urls")),  # grappelli URLS
    url(r"^media/(?P<path>.*)$", "django.views.static.serve", {"document_root": settings.MEDIA_ROOT}),
    # url(r'^static/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.STATIC_ROOT, 'show_indexes': True}),
) + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
Esempio n. 6
0
from django.urls import path
from blog.views import ArticlesView, article_view, tag_view

urlpatterns = [
    path('', ArticlesView.as_view(), name='articles'),
    path('articles/<int:article_id>', article_view, name='article_view'),
    path('tags/<uuid:tag_id>', tag_view, name='tag_view')
]
Esempio n. 7
0
from app.views import IndexView, ProfileView, SearchView
from blog.views import StoriesView, StoryView, StoryArchiveView, ArticleView, ArticlesView, ArticleArchiveView,\
ArticlesCommentView, StoriesCommentView

from nonhumanuser import settings

urlpatterns = [
    url(r'^$', IndexView.as_view(), name='index'),
    url(r'^admin/', admin.site.urls),
    url(r'^blog/', include('blog.urls')),
    url(r'^stories/$', StoriesView.as_view(), name="stories"),
    url(r'^stories/story_archive/$', StoryArchiveView.as_view(), name="story-archive"),
    url(r'^stories/(?P<slug>[\w-]+)/$', StoryView.as_view(), name="story"),
    url(r'^stories/(?P<slug>[\w-]+)/comment/$', StoriesCommentView.as_view(), 
        name='story comment'),
    url(r'^articles/$', ArticlesView.as_view(), name="articles"),
    url(r'^articles/article_archive/$', ArticleArchiveView.as_view(), name="article-archive"),
    url(r'^articles/(?P<slug>[\w-]+)/$', ArticleView.as_view(), name="article"),
    url(r'^articles/(?P<slug>[\w-]+)/comment/$', ArticlesCommentView.as_view(), 
        name='article comment'),
    url(r'^media/library/', include('library.urls')),
    url(r'^library/', include('library.urls')),
    url(r'^media/actual_play/', include('actual_play.urls')),
    url(r'^actual_play/', include('actual_play.urls')),
    url(r'^members/', include('django.contrib.auth.urls')),
    url(r'^markdown/', include('django_markdown.urls')),
    url(r'^accounts/', include('registration.backends.hmac.urls')),
    url(r'^accounts/profile/(?P<slug>[\-\w]+)/$', ProfileView.as_view(), 
        name='update_user'),
    url(r'^search/(?P<q>.*)$', SearchView.as_view(), name='search'),
]