# -*- coding: utf-8 -*- from django.conf.urls import * from news.views import NewsList, NewsView urlpatterns = patterns( 'news.views', url(r'^$', NewsList.as_view(), name='news_list_url'), url(r'^(?P<slug>[-_\w]+)/$', NewsView.as_view(), name='news_url'), )
from django.conf.urls import * from django.views.generic import ListView from news.views import NewsList, YearNews, MonthNews, NewsDetail, CategoryView from news.feeds import NewsPostsFeed urlpatterns = [ url(r'^(?P<year>[0-9]{4})/(?P<month>[-\w]+)/(?P<day>[0-9]+)/(?P<slug>[-\w]+)/$', NewsDetail.as_view(), name='news_detail'), url(r'^(?P<year>\d{4})/(?P<month>[-\w]+)/$', MonthNews.as_view(), name='news_archive_month'), url(r'^(?P<year>\d{4})/$', YearNews.as_view(), name='news_archive_year'), url(r'^category/(?P<slug>[-\w]+)/', CategoryView.as_view(), name='category_posts'), url(r'^$', NewsList.as_view(template_name='news/post_list.html'), name='news_index'), # Feed url(r'^feed/$', NewsPostsFeed()) ]
company_urls = patterns('', url(r'^/$', CompanyList.as_view(), name='company-list'), url(r'^/(?P<slug>[0-9a-zA-Z_-]+)/actions/$', CompanyActions.as_view(), name='company-actions'), url(r'^/(?P<slug>[0-9a-zA-Z_-]+)/following-companies/$', CompanyFollowingCompanies.as_view(), name='company-following-company'), url(r'^/(?P<slug>[0-9a-zA-Z_-]+)/$', CompanyDetail.as_view(), name='company-detail'), ) image_urls = patterns('', url(r'^/$', ImageList.as_view(), name='image-list'), ) news_urls = patterns('', url(r'^/$', NewsList.as_view(), name='news-list'), ) product_urls = patterns('', url(r'^/(?P<company>[0-9a-zA-Z_-]+)/$', ProductList.as_view(), name='product-list'), url(r'^/(?P<company>[0-9a-zA-Z_-]+)/(?P<product>[0-9a-zA-Z_-]+)/$', ProductDetail.as_view(), name='product-detail') ) value_urls = patterns('', url(r'^/$', ValueList.as_view(), name='value-list'), url(r'^/(?P<slug>[0-9a-zA-Z_-]+)/$', ValueDetail.as_view(), name='value-detail'), ) urlpatterns = patterns('', #url(r'^$', IndexView.as_view(), name='home'), url(r'^api/v1/causes', include(cause_urls)),
"""news URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.11/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-based views 1. Add an import: from other_app.views import Home 2. Add a URL to urlpatterns: url(r'^$', Home.as_view(), name='home') Including another URLconf 1. Import the include() function: from django.conf.urls import url, include 2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls')) """ from django.conf.urls import url from django.contrib import admin from news.views import GetArticlesFromNewsAPI, NewsList, GetJSONArticles urlpatterns = [ url(r'^articles/$', GetArticlesFromNewsAPI.as_view(), name='get_articles_from_newsapi'), url(r'^json_articles/$', GetJSONArticles.as_view(), name='get_json_articles'), url(r'^newslist/$', NewsList.as_view(), name='get_articles_from_newsapi'), #url(r'^admin/', admin.site.urls), ]
from django.urls import path from news.views import NewsList, NewDetail, CreateNew, thanks_view urlpatterns = [ path('', NewsList.as_view(), name='news-list'), path('new/<int:pk>', NewDetail.as_view(), name='new-item'), path('new/create-new', CreateNew.as_view(), name='create-new'), path('new/thanks', thanks_view, name='thanks-view') ]
urlpatterns = [ path('', include('home.urls')), path('docs/', schema_view, name='docs'), path('news/', include('news.urls')), path('paperchit/', include('paperchit.urls')), path('chiters/', include('chiters.urls')), path('admin/', admin.site.urls), path('register/', user_views.register, name='register'), path('profile/', user_views.profile, name='profile'), path('login/', auth_views.LoginView.as_view(template_name='users/login.html'), name='login'), path('logout/', auth_views.LogoutView.as_view(template_name='users/logout.html'), name='logout'), ] api_urlpatterns = [ path('api/chiters/', ChitersList.as_view(), name='chiters_list'), path('api/chiters/<int:pk>/', ChitersDetail.as_view(), name='chiters_detail'), path('api/news/', NewsList.as_view(), name='news'), path('api/news/<int:pk>', NewsDetail.as_view(), name='news-detail'), ] urlpatterns += api_urlpatterns if settings.DEBUG: urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
from django.conf.urls import url from news.views import NewsList, NewsDetail urlpatterns = [ url(r'^$', NewsList.as_view(), name='news'), url(r'^(?P<slug>[-\w]+)/$', NewsDetail.as_view(), name='readevent'), ]
from django.conf.urls import url from news.views import NewsList, NewsDetailView urlpatterns = [ url(r'^$', NewsList.as_view(), name='news_list'), url(r'^(?P<slug>[-\w]+)/$', NewsDetailView.as_view(), name='news_detail'), ]
from django.urls import path from api.views import UserList, UserDetails from news.views import NewsList urlpatterns = [ path('users/', UserList.as_view()), path('users/<pk>/', UserDetails.as_view()), path('news/', NewsList.as_view()), ]
"""newsparser URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/2.2/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-based views 1. Add an import: from other_app.views import Home 2. Add a URL to urlpatterns: path('', Home.as_view(), name='home') Including another URLconf 1. Import the include() function: from django.urls import include, path 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) """ from django.contrib import admin from django.urls import path from news.views import NewsList urlpatterns = [ path('admin/', admin.site.urls), path('posts/', NewsList.as_view(), name='posts'), ]
# -*- coding: utf-8 -*- from django.conf.urls import patterns, include, url from news.views import NewsList urlpatterns = patterns('', url(r'^torvi/?$', 'news.views.index', name='index'), url(r'^torvi/list/$', NewsList.as_view(), name='list'), url(r'^torvi/new/', 'news.views.new', name='new'), url(r'^torvi/edit/(?P<mid>[0-9]+/?)?$', 'news.views.edit', name='edit'), url(r'^torvi/edit/message/', 'news.views.message_json', name='message_json'), url(r'^torvi/facebook/$', 'news.views.FBRenewToken', name='FBRenew'), url(r'^torvi/facebook/token/$', 'news.views.FBGetToken', name='FBGet'), url(r'^torvi/twitter/token/', 'news.views.add_twitter_token', name='add_twitter_token'), url(r'^torvi/twitter/$', 'news.views.getTwitterToken', name='getTwitterToken'), )
"""hypernews URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/2.2/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-based views 1. Add an import: from other_app.views import Home 2. Add a URL to urlpatterns: path('', Home.as_view(), name='home') Including another URLconf 1. Import the include() function: from django.urls import include, path 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) """ from django.contrib import admin from django.urls import path, re_path from news.views import MainView, NewsView, NewsList, CreateView urlpatterns = [ path('admin/', admin.site.urls), re_path("news/(?P<n_chapter>\d+)/", NewsView.as_view()), path("news/", NewsList.as_view()), path("news/create/", CreateView.as_view()), path("", MainView.as_view()) ]
from django.conf.urls import patterns, url from news.views import NewsList, NewsDetail urlpatterns = patterns( '', url(r'^$', NewsList.as_view(), name='list'), url(r'^(?P<slug>[\w+-]*)/$', NewsDetail.as_view(), name='detail'), )