Example #1
0
The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/3.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 include, path
from projects.views import (
    ActivityView,
    ActivitiesView,
    ProjectView,
    ProjectsView,
)

urlpatterns = [
    path('api/projects', ProjectsView.as_view()),
    path('api/projects/<int:project_id>/activities/<int:id>/finish',
         ActivityView.as_view()),
    path('api/projects/<int:project_id>/activities', ActivitiesView.as_view()),
    path('api/projects/<int:id>', ProjectView.as_view()),
    path('admin/', admin.site.urls),
]
Example #2
0
from django.contrib import admin
from django.core.urlresolvers import reverse
from django.conf.urls.static import static
from django.views.generic import RedirectView

from django.conf import settings
from projects.views import IndexView, ProjectView, AboutView, ContactView, SitemapView, BingView
from blog.views import ArticleView, ArticleListView, BlogTagView, BlogCategoryView, BlogIndexView

urlpatterns = patterns('',
    url(r'^$', IndexView.as_view(), name='home'),
    # url(r'^blog/', include('blog.urls')),


    url(r'^admin/', include(admin.site.urls)),
    url(r'^projects/(?P<slug>[A-Za-z0-9_\-]+)/$', ProjectView.as_view(), name='project'),
    url(r'^about/$', AboutView.as_view(), name='about'),
    url(r'^contact/$', ContactView.as_view(), name='contact'),
    url(r'^sitemap\.xml$', SitemapView.as_view(), name='sitemap'),
    url(r'^BingSiteAuth\.xml$', BingView.as_view(), name='bing'),
    # url(r'^blog/$', BlogIndexView.as_view(), name='article_list'),
    # url(r'^blog/articles/(?P<category_slug>[A-Za-z0-9_\-]+)/(?P<slug>[A-Za-z0-9_\-]+)/$', ArticleView.as_view(), name='article'),
    # url(r'^blog/categories/(?P<slug>[A-Za-z0-9_\-]+)/$', BlogCategoryView.as_view(), name='category'),
    # url(r'^blog/tags/(?P<slug>[A-Za-z0-9_\-]+)/$', BlogTagView.as_view(), name='tag'),
    url(r'^ckeditor/', include('ckeditor_uploader.urls')),
)

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

# Resume redirect from old site's URL to home
urlpatterns += url(r'^kenneth_roraback_resume.pdf$', RedirectView.as_view(url=reverse('home')), name="resume_redirect"),
Example #3
0
"""projects URL Configuration
"""
from projects.views import ChipTagView, ProjectView
from django.urls import path

urlpatterns = [
    path("", ProjectView.as_view()),
    path("tags/", ChipTagView.as_view()),
]
Example #4
0
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path, re_path

from projects.views import AddOriginatorView, AddProjectDetailView, SummaryView, EditProjectDetailView, \
    EditOriginatorView, ProjectView, ProjectDetailView, AddCostView, LoginView, LogoutView, VoteView, VoteConfirmView

urlpatterns = [
    path('admin/', admin.site.urls),
    path('add_project/', AddOriginatorView.as_view(), name='add_project'),
    path('edit_project/', EditOriginatorView.as_view(), name='edit_project'),
    path('add_project/details/',
         AddProjectDetailView.as_view(),
         name='add_project_details'),
    path('edit_project/details/',
         EditProjectDetailView.as_view(),
         name='edit_project_details'),
    path('add_project/costs/', AddCostView.as_view(),
         name='add_project_costs'),
    path('add_project/summary/', SummaryView.as_view(), name='summary_view'),
    path('projects', ProjectView.as_view(), name='projects'),
    re_path(r'project/(?P<id>(\d)+)',
            ProjectDetailView.as_view(),
            name='project_detail'),
    path('login', LoginView.as_view(), name='login'),
    path('logout', LogoutView.as_view(), name='logout'),
    path('vote', VoteView.as_view(), name='vote'),
    path('vote/confirm', VoteConfirmView.as_view(), name='vote_confirm'),
]
Example #5
0
from django.contrib import admin
from django.urls import path, include
from projects.views import ProjectView, CredentialsListView, DeleteCredentialView

app_name = "projects"

urlpatterns = [
    path('', CredentialsListView.as_view(), name="list_credentials"),
    path('<int:credential_id>/delete/',
         DeleteCredentialView.as_view(),
         name="delete_credentials"),
    path('new/', ProjectView.as_view(), name="project"),
]
Example #6
0
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 django.conf.urls import include, url
from projects.views import ProjectView, BaseRedirect, SearchProjects
from .views import ProjectsViewSetPaginated
from rest_framework.routers import DefaultRouter

router = DefaultRouter()
router.register(r'projects',
                ProjectsViewSetPaginated,
                basename='list-projects')

urlpatterns = [
    path(r'all-projects/page=<int:pageNum>/',
         ProjectView.as_view(),
         name="allProjects"),
    path(r'search/page=<int:pageNum>/',
         SearchProjects.as_view(),
         name="searchProject"),
    path(r'api-projects/', include(router.urls)),
]
Example #7
0
from django.conf.urls import url
from projects.views import ProjectView, CategoryView

urlpatterns = [
    url(r'^(?P<category_sname>[a-zA-Z-0-9]*)/$', CategoryView.as_view(), name='category'),
    url(r'^(?P<category_sname>[a-zA-Z-0-9]*)/(?P<project_sname>[a-zA-Z-0-9]*)/$', ProjectView.as_view(), name='project'),
]
Example #8
0
from .views import HomeView

urlpatterns = [
    # Admin App
    url(r'^admin/', include(admin.site.urls)),
    #Sentiment App
    url(r'^sentiment/(?P<slug>[-\w]+)/delete/$', SentimentDelete.as_view(), name="sent_delete"),
    url(r'^sentiment/(?P<slug>[-\w]+)/update/$', SentimentUpdate.as_view(), name="sent_update"),
    url(r'^sentiment/create/$', SentimentCreate.as_view(), name="sent_create"),
    url(r'^sentiment/(?P<slug>[-\w]+)/$', SentimentDetail.as_view(), name="sent_detail"),
    url(r'^sentiment/$', SentimentList.as_view(), name="sent_list"),
    #Email or Contact URL
    url(r'^contact/$', EmailCreate.as_view(), name="email_create"),
    url(r'^contact/thanks/$', NewsletterView.as_view(), name="contact_thanks"),
    # Project Page
    url(r'^projects/$', ProjectView.as_view(), name="projects"),
    # Comming Soon
    url(r'^comming-soon/$', TemplateView.as_view(template_name='coming-soon.html'), name="soon"),
    #About
    url(r'^about/$', AboutView.as_view(), name="about"),
    #HireMe
    url(r'^hireme/$', HireView.as_view(), name="hireme"),
    
    #url(r'^feed/$', LatestPosts(), name='feed'),
    #url(r'^(?P<slug>\S+)$', BlogDetail.as_view(), name='blog_detail'),
    #url(r'^blog/$', include(blog_urls)),
    #url(r'^messages/$', include(mess_urls)),
    url(r'^markdown/', include("django_markdown.urls")),
    # Home Page
    #url(r'^$', TemplateView.as_view(template_name = 'vitali/index.html'), name='home'),
    url(r'^$', HomeView.as_view(), name='home'),