Example #1
0
from django.conf.urls import patterns, include, url
from django.contrib import admin
from django.views.generic import TemplateView
from mysite.views import Index, ContactUs
from .views import InternshipApplyView

urlpatterns = patterns(
    '',
    # Examples:
    # url(r'^$', 'mysite.views.home', name='home'),
    # url(r'^blog/', include('blog.urls')),
    url(r'^$',
        TemplateView.as_view(template_name='welcome.html'),
        name='welcome'),
    url(r'^home$', Index.as_view(), name='index'),
    url(r'^Contact$', ContactUs.as_view(), name='contact'),
    url(r'^Internship$', InternshipApplyView.as_view(), name='internship'),
    url(r'^grappelli/', include('grappelli.urls')),
    url(r'^admin/', include(admin.site.urls)),
    url(r'^Services/IndustrialTrainingProgram',
        TemplateView.as_view(template_name='services/itprogram.html'),
        name="IndustrialTrainingProgram"),
    url(r'^Services/FinalYearProjectTraining',
        TemplateView.as_view(template_name='services/fyptraining.html'),
        name='finalyearProTraining'),
    url(r'^Services/CorporateTrainingProgram',
        TemplateView.as_view(template_name='services/ctprogram.html'),
        name="CorporateTrainingProgram"),
    url(r'^Services/ITOutsourcing',
        TemplateView.as_view(template_name='services/itoutsourcing.html'),
        name='itoutsourcing'),
Example #2
0
The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/2.0/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, include
from django.conf import settings
from django.conf.urls.static import static
from mysite.views import Index

urlpatterns = [
    path('', Index.as_view()),
    path('photo_gallery/', include('photo_gallery.urls')),
    path('admin/', admin.site.urls),
    path('personal/', include('personal.urls')),
    path('object_detection/', include('object_detection.urls')),
    path('polls/', include('polls.urls')),
]

urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
from django.conf.urls import patterns, include, url
from django.contrib import admin
from django.views.generic import TemplateView
from mysite.views import Index, ContactUs
from .views import InternshipApplyView

urlpatterns = patterns('',
                       # Examples:
                       # url(r'^$', 'mysite.views.home', name='home'),
                       # url(r'^blog/', include('blog.urls')),
                       url(r'^$', TemplateView.as_view(template_name='welcome.html'), name='welcome'),
                       url(r'^home$', Index.as_view(), name='index'),
                       url(r'^Contact$', ContactUs.as_view(), name='contact'),
                       url(r'^Internship$', InternshipApplyView.as_view(), name='internship'),
                       url(r'^grappelli/', include('grappelli.urls')),
                       url(r'^admin/', include(admin.site.urls)),
                       url(r'^Services/IndustrialTrainingProgram',
                           TemplateView.as_view(template_name='services/itprogram.html'),
                           name="IndustrialTrainingProgram"),
                       url(r'^Services/FinalYearProjectTraining',
                           TemplateView.as_view(template_name='services/fyptraining.html'), name='finalyearProTraining'),
                           url(r'^Services/CorporateTrainingProgram',
                               TemplateView.as_view(template_name='services/ctprogram.html'),
                               name="CorporateTrainingProgram"),

                           url(r'^Services/ITOutsourcing',
                               TemplateView.as_view(template_name='services/itoutsourcing.html'), name='itoutsourcing'),
                           url(r'^Training$', TemplateView.as_view(template_name='courses/ittraining.html'),
                               name='training'),
                           url(r'^Training/Foundation/C$', TemplateView.as_view(template_name='courses/C.html'),
                               name='cprogramming'),
Example #4
0
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.conf.urls import url
from django.contrib import admin
from django.urls import path

from api.views import (BlogPostCommentList, CoinbaseTransactionList,
                       DownloadResume, Photos, PostList, UserList)
from mysite.views import Index

urlpatterns = [
    path('', Index.as_view()),
    path('admin/', admin.site.urls),
    # path('personal/', include('personal.urls')),
    path('personal/contact/', Index.as_view()),
    path('api/users', UserList.as_view()),
    path('api/posts', PostList.as_view()),
    path('api/posts/comments', BlogPostCommentList.as_view()),
    path('api/coinbase/transactions', CoinbaseTransactionList.as_view()),
    # path('api/coinbase/prices', CoinbasePriceList.as_view()),
    path('api/photos', Photos.as_view()),
    path('resume', DownloadResume),
    # url(r'^.*', TemplateView.as_view(template_name="home.html"), name="home")
    url(r'^.*', Index.as_view(), name="home")
]