Esempio n. 1
0
from django.conf.urls import url

from portfolio.views import IndexView, ProjectDetailsView, PortfolioView

urlpatterns = [
    url(r'^$', IndexView.as_view(), name='index'),
    url(r'^portfolio/$', PortfolioView.as_view(), name='portfolio'),
    url(r'^projects/(?P<pid>[0-9]+)/$',
        ProjectDetailsView.as_view(),
        name='project_details'),
]
Esempio n. 2
0
from django.conf.urls import url
from portfolio.views import PortfolioListView, PortfolioView, CustomersListView, CustomersView
from django.urls import path, include

helper_patterns = [
    url(r'^portfolios/$', PortfolioListView.as_view(), name='portfolios'),
    url(r'^portfolios/(?P<pk>[0-9]+)/$',
        PortfolioView.as_view(),
        name='get_portfolio'),
    url(r'^customers/$', CustomersListView.as_view(), name='customers'),
    url(r'^customers/(?P<pk>[0-9]+)/$',
        CustomersView.as_view(),
        name='get_customer'),
]

urlpatterns = helper_patterns
Esempio n. 3
0
from django.conf.urls.defaults import patterns, include, url
from django.conf.urls.static import static
from django.http import HttpResponse
from django.conf import settings
from portfolio.api import ProjectResource
from portfolio.views import PortfolioView, FeaturedPortfolioView

project_resource = ProjectResource();

# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()


urlpatterns = patterns('',
    url(r'^$', FeaturedPortfolioView.as_view()), 
    url(r'^accounts/login/$',  'django.contrib.auth.views.login' ),
    url(r'^accounts/logout/$',  'django.contrib.auth.views.logout', {'next_page':'/'} ),
    url(r'^api/', include(project_resource.urls)),
    url(r'^admin/', include(admin.site.urls)), 
    url(r'^(?P<slug>[\w-]+)/$', PortfolioView.as_view()),
    url(r'^robots\.txt$', lambda r: HttpResponse("User-agent: *\nDisallow: /static/", mimetype="text/plain")),
)


if settings.DEBUG:
    urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
Esempio n. 4
0
from django.urls import path
from django.conf import settings
from django.conf.urls.static import static

from portfolio.views import PortfoliosView, PortfolioView, post  #PortfolioCreateView
from portfolio import views

app_name = 'portfolio'
urlpatterns = [
    path('', PortfoliosView.as_view(), name='portfolio-view-page'),
    path('upload/', views.post, name='upload'),
    path('<slug>/', PortfolioView.as_view(), name='portfolio'),
]
if settings.DEBUG:
    urlpatterns += static(settings.MEDIA_URL,
                          document_root=settings.MEDIA_ROOT)
Esempio n. 5
0
from django.conf.urls import url, include
from rest_framework.routers import DefaultRouter
from portfolio.views_api import PortfolioViewSet
from portfolio.views import (
	DetailPortfolio,
	ListPortfolio,
	CreatePortfolio,
	UpdatePortfolio,
	DeletePortfolio,
	PortfolioView,
)


router = DefaultRouter()
router.register('portfolios', PortfolioViewSet)


urlpatterns = [
	url(r'^$', PortfolioView.as_view(), name='portfolio-index'),
	url(r'^create/$', CreatePortfolio.as_view(), name='create-portfolio'),
	url(r'^update/(?P<pk>[\d]+)/$', UpdatePortfolio.as_view(), name='update-portfolio'),
	url(r'^delete/(?P<pk>[\d]+)/$', DeletePortfolio.as_view(), name='delete-portfolio'),
	url(r'^list/$', ListPortfolio.as_view(), name='portfolio-list'),
	url(r'^(?P<slug>[-\w]+)/$', DetailPortfolio.as_view(), name='portfolio-item'),
	url(r'^api/', include(router.urls), name='portfolio-api')
]
Esempio n. 6
0
from django.urls import include, path
from portfolio.views import PortfolioView, CauseDetailView

urlpatterns = [
    path('', PortfolioView.as_view(), name='portfolio'),
    path('accounts/', include('accounts.urls')),
    path('detail/<int:pk>', CauseDetailView.as_view(), name='cause_detail'),
]



from django.urls import re_path

from portfolio.views import PortfolioView


urlpatterns = [
    re_path(r'^$', PortfolioView.as_view(), name='index'),
]
Esempio n. 8
0
from django.urls import path
from . import views
from portfolio.views import PortfolioView
"""portfolioweb URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/3.1/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'))
"""

urlpatterns = [path('portfolio/', PortfolioView.as_view(), name='portfolio')]
Esempio n. 9
0
File: urls.py Progetto: Enois/timtec
    url(r'^empty/', TemplateView.as_view(template_name="empty.html")),
    url(r'^contact/?$', ContactView.as_view(), name="contact"),

    # Services
    url(r'^api/', include(router.urls)),

    # Forum
    url(r'^forum/(?P<course_slug>[-a-zA-Z0-9_]+)/$', CourseForumView.as_view(), name='forum'),
    url(r'^forum/question/(?P<slug>[-a-zA-Z0-9_]+)/$', QuestionView.as_view(), name='forum_question'),
    url(r'^forum/question/add/(?P<course_slug>[-a-zA-Z0-9_]+)/$', QuestionCreateView.as_view(), name='forum_question_create'),

    # Portfolio
    url(r'^trampos/$',
        PortfoliosView.as_view(), name='portfolios'),
    url(r'^trampos/(?P<pk>[1-9][0-9]*)/$',
        PortfolioView.as_view(), name='portfolio_view'),
    url(r'^trampos/(?P<pk>[1-9][0-9]*)/editar$',
        UpdatePortfolioView.as_view(), name='portfolio_edit'),
    url(r'^trampos/(?P<pk>[1-9][0-9]*)/deletar$',
        DeletePortfolioView.as_view(), name='portfolio_delete'),
    url(r'^meus-trampos/$',
        UserPortfoliosView.as_view(), name='user_portfolios'),
    url(r'^meus-trampos/novo/$',
        CreatePortfolioView.as_view(), name='portfolio_new'),

    # Teachers
    url(r'^mentores', TeachersView.as_view(), name='teachers'),

    # Course Material
    url(r'^curso/(?P<slug>[-a-zA-Z0-9_]+)/material/file_upload/$', FileUploadView.as_view(), name='file_upload'),
    url(r'^curso/(?P<slug>[-a-zA-Z0-9_]+)/material/$', CourseMaterialView.as_view(), name='course_material'),
Esempio n. 10
0
     PostYearArchiveView, PostMonthArchiveView
from portfolio.views import PortfolioView
from projects.views import ProjectsView
## Sitemaps
from core.sitemap import SitemapStatic
from blog.sitemap import SitemapBlog
## Feeds
from blog.feeds import RssBlogNewsFeed, AtomBlogNewsFeed


sitemaps = {'main': SitemapStatic, 'blog': SitemapBlog}


urlpatterns = patterns('',
    url('^$', BlogView.as_view(), name='blog'),
    url('^portfolio/$', PortfolioView.as_view(), name='portfolio'),
    url('^projects/$', ProjectsView.as_view(), name='project'),
    url('^about/$', TemplateView.as_view(template_name='about.html'),
        name='about'),
    url('^themes/(?P<theme>[^/]+)/$', ThemeView.as_view(), name='theme'),
    url('^(?P<year>\d{4})/$', PostYearArchiveView.as_view(),
        name='year_archive'),
    url('^(?P<year>\d{4})/(?P<month>\d+)/$',
        PostMonthArchiveView.as_view(month_format='%m'),
        name='month_archive'),
    url('^(?P<year>\d{4})/(?P<month>\d{1,2})/(?P<slug>[\w-]+)/$',
        PostView.as_view(), name='post'),
    url('^feeds/rss/$', RssBlogNewsFeed(), name='rssfeed'),
    url('^feeds/atom/$', AtomBlogNewsFeed(), name='atomfeed'),
    url('^sitemap\.xml$', 'django.contrib.sitemaps.views.sitemap',
        {'sitemaps': sitemaps}, name='sitemap'),