Exemple #1
0
from django.conf.urls import patterns

from about.views import AboutView

urlpatterns = patterns(
    '',
    (r'^$', AboutView.as_view(), {
        'slug': 'index'
    }),
    (r'^/(?P<slug>.+)$', AboutView.as_view()),
)
Exemple #2
0
from django.conf.urls import url
from about.views import AboutView

urlpatterns = [
    url(r'^$', AboutView.as_view()),
]
Exemple #3
0
from django.conf.urls import patterns, include, url
from django.conf import settings
from django.conf.urls.static import static

from django.contrib import admin
admin.autodiscover()

from about.views import AboutView
from contacts.views import ContactsView
from howtobuy.views import HowToBuyView

urlpatterns = patterns(
    '',
    url(r'^admin/', include(admin.site.urls)),
    url(r'^login/', "django.contrib.auth.views.login", name="login"),
    url(r'^logout/', "django.contrib.auth.views.logout", name="logout"),
    url(r'^$', include('main.urls')),
    url(r'^guestbook/', include('guestbook.urls')),
    url(r'^news/', include('news.urls')),
    url(r'^imagepool/', include('imagepool.urls')),
    url(r'^categories/', include('categories.urls')),
    url(r'^goods/', include('goods.urls')),
    url(r'^comments/', include("django.contrib.comments.urls")),
    url(r'^blog/', include('blog.urls')),
    url(r'^about/', AboutView.as_view(), name="about"),
    url(r'^contacts/', ContactsView.as_view(), name="contacts"),
    url(r'^howtobuy/', HowToBuyView.as_view(), name="howtobuy"),
)

urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
Exemple #4
0
 path('main/districts/',
      BlockDistrictsViewSetAPI.as_view(),
      name='main-districts-list'),
 path('main/flagmans/',
      BlockFlagmansViewSetAPI.as_view(),
      name='main-flagmans-list'),
 path('main/news/', BlockNewsViewSetAPI.as_view(), name='main-news-list'),
 path('main/media/', BlockMediaViewSetAPI.as_view(),
      name='main-media-list'),
 path('main/opportunities/',
      BlockOpportunitiesViewSetAPI.as_view(),
      name='main-opportunities-list'),
 path('districts/<int:pk>',
      DistrictDetail.as_view(),
      name='district-detail'),
 path('about/', AboutView.as_view(), name='about-us'),
 path('flagships/active/<int:page>',
      FlagmansActiveViewSet.as_view(),
      name='flagmans-active-list'),
 path('flagships/completed/<int:page>',
      FlagmansCompletedViewSet.as_view(),
      name='flagmans-completed-list'),
 path('opportunities/active/list/<int:page>',
      OpportunitiesActiveViewSet.as_view(),
      name='opportunities-active-list'),
 path('opportunities/completed/list/<int:page>',
      OpportunitiesCompletedViewSet.as_view(),
      name='opportunities-completed-list'),
 path('opportunities/all/list/<int:page>',
      OpportunitiesAllViewSet.as_view(),
      name='opportunities-all-list'),
Exemple #5
0
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, include
from . import views
from contact.views import ContactView
from about.views import AboutView
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.conf import settings
from django.conf.urls.static import static

urlpatterns = [
    path('geetechlab@admin/', admin.site.urls),
    path('', views.HomeView.as_view(), name='home'),
    path('contact', ContactView.as_view(), name='contact'),
    path('about', AboutView.as_view(), name='about'),
]

urlpatterns += staticfiles_urlpatterns()
# Remove this conditional check if you want to upload to Heroku
if settings.DEBUG:
    urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
Exemple #6
0
from django.conf.urls import url
from about.views import AboutView

urlpatterns = [
    url(r'^$', AboutView.as_view(), name='about'),
]
Exemple #7
0
from howtobuy.views import HowToBuyView
from news.views import RssNewsListFeed, AtomNewsListFeed
from goods.views import RssGoodListFeed, AtomGoodsListFeed

urlpatterns = [
    path('admin/', admin.site.urls),
    re_path(r'login/', login_view, name='login'),
    re_path(r'logout/', logout_view, name='logout'),
    re_path(r'^', include('main.urls')),
    re_path(r'^guestbook/', include('guestbook.urls')),
    re_path(r'^news/', include('news.urls')),
    re_path(r'^imagepool/', include('imagepool.urls')),
    re_path(r'^categories/', include('categories.urls')),
    re_path(r'goods/', include('goods.urls')),
    re_path(r'comment/', include('django_comments.urls')),
    re_path(r'^blog/', include('blog.urls')),
    re_path(r'^about/', AboutView.as_view(), name='about'),
    re_path(r'^contacts/', ContactsView.as_view(), name='contacts'),
    re_path(r'^howtobuy/', HowToBuyView.as_view(), name='howtobuy'),
    re_path(r'^feed/rss/', RssNewsListFeed(), name='news_feed_rss'),
    re_path(r'^feed/atom/', AtomNewsListFeed(), name='news_feed_atom'),
    re_path(r'^(?P<pk>\d+)/feed/rss/',
            RssGoodListFeed(),
            name='goods_feed_rss'),
    re_path(r'^(?P<pk>\d+)/feed/atom/',
            AtomGoodsListFeed(),
            name='goods_feed_atom')
]

urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
from django.conf.urls import url

from about.views import AboutView

urlpatterns = [
    url(r'^$', AboutView.as_view(), {'slug': 'index'}),
    url(r'^/(?P<slug>.+)$', AboutView.as_view()),
]
Exemple #9
0
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path
from post.views import PostList, PostDetail, PostListView, PostAddView, PostEditView, PostListByAuthor, PostListByYear, PostListByMonth, PostListByDay
from home.views import HomeView
from about.views import AboutView
from contact.views import ContactAdd
from sitesetting.views import SiteSettingEdit
from djadmin.views import Dashboard
from django.contrib.auth.views import LoginView, LogoutView
from django.contrib.auth.decorators import login_required

urlpatterns = [
    path('', HomeView.as_view(), name="home-page"),
    path('about/', AboutView.as_view(), name="about-page"),
    path('admin/', admin.site.urls),
    path('contact/', ContactAdd.as_view(), name="contact-page"),
    path('posts/', PostList.as_view(), name='post-list'),
    path('posts/author/<username>/',
         PostListByAuthor.as_view(),
         name='post-author'),
    path('posts/<int:year>/<int:month>/<int:day>/<slug:slug>/',
         PostDetail.as_view(),
         name='post-detail'),
    path('posts/<int:year>/<int:month>/<int:day>/',
         PostListByDay.as_view(),
         name='post-detail'),
    path('posts/<int:year>/<int:month>/',
         PostListByMonth.as_view(),
         name='post-detail'),
Exemple #10
0
"""DjangoBlog URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/1.9/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, include
from django.contrib import admin
from django.conf.urls.static import static
from django.conf import settings

from about.views import AboutView

urlpatterns = [
    url(r'^', include('blog.urls')),
    url(r'^about/', AboutView.as_view(), name="about"),
    url(r'^admin/', include(admin.site.urls)),
    url(r'^ckeditor/', include('ckeditor_uploader.urls')),
]

if settings.DEBUG:
    urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
Exemple #11
0
from django.conf import settings
from django.conf.urls import include, url
from django.conf.urls.static import static
from django.contrib import admin
from about.views import AboutView
from contacts.views import ContactsView
from howtobuy.views import HowToBuyView

urlpatterns = [
    url(r'^admin/', include(admin.site.urls)),
    url(r'^login/', 'django.contrib.auth.views.login', name='login'),
    url(r'^logout/', 'django.contrib.auth.views.logout', name='logout'),
    url(r'^$', include('main.urls')),
    url(r'^guestbook/', include('guestbook.urls')),
    url(r'^news/', include('news.urls')),
    url(r'^imagepool/', include('imagepool.urls')),
    url(r'^categories/', include('categories.urls')),
    url(r'^goods/', include('goods.urls')),
    url(r'^comments/', include("django_comments.urls")),
    url(r'^blog/', include("blog.urls")),
]

urlpatterns += [
    url(r'^about/', AboutView.as_view(), name='about'),
    url(r'^contacts/', ContactsView.as_view(), name='contacts'),
    url(r'^howtobuy/', HowToBuyView.as_view(), name='howtobuy'),
]

urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)