Beispiel #1
0
from django.conf.urls.defaults import patterns, url
from views import HomepageView, TalkDetailView, TalkListView

urlpatterns = patterns('core.views',
    url(r'^$', HomepageView.as_view(), name='homepage'),
    url(r'^palestras/$', TalkListView.as_view(), name='talks'),
    url(r'^palestras/(\d+)/$', 'talk_detail', name='talk_detail'),
    url(r'^palestrante/([-\w]+)/$', 'speaker_detail', name='speaker_detail'),
)
Beispiel #2
0
from django.conf.urls import patterns, url
from django.utils import timezone
from django.views.generic import DetailView, ListView, UpdateView
from models import Album, Artist, AlbumReview
from forms import ArtistForm, AlbumForm, AlbumReviewForm
from views import HomepageView, AlbumListView, AlbumReviewCreate, ReviewListView, ReviewDelete, LoginRequiredCheckIsOwnerUpdateView, AlbumDetail, AlbumReviewDetail, APIAlbumList, APIAlbumDetail, APIAlbumReviewList, APIAlbumReviewDetail
from django.views.generic.base import RedirectView
from django.contrib.auth.decorators import login_required
from rest_framework.urlpatterns import format_suffix_patterns

urlpatterns = [
    url(r'^$', HomepageView.as_view()),

    #Llistes
    url(r'^albums/$', AlbumListView.as_view(), name = 'album_list',),
    url(r'^reviews/$', ReviewListView.as_view(), name = 'review_list',),

    #Tractament de reviews
    url(r'^albums/(?P<pk>\d+)/reviews/create/$', AlbumReviewCreate.as_view(), name = 'review_create',),
    url(r'^albums/(?P<pkr>\d+)/reviews/(?P<pk>\d+)/delete/$', ReviewDelete.as_view(), name='review_delete'),
    url(r'^albums/(?P<pkr>\d+)/reviews/(?P<pk>\d+)/edit/$',
        LoginRequiredCheckIsOwnerUpdateView.as_view(
            model=AlbumReview,
           template_name='form.html',
           success_url='/waifufm/reviews',
            form_class=AlbumReviewForm),
        name='review_edit'),

    #Detalls
    url(r'^albums/(?P<pk>\d+)/$', AlbumDetail.as_view(), name='album_detail'),
    url(r'^albums/(?P<pkr>\d+)/reviews/(?P<pk>\d+)/$',
Beispiel #3
0
from django.conf.urls.defaults import url, patterns, include

from views import HomepageView, OrderListView, UserOrderView, TodaysOrdersView

urlpatterns = (
    url(r'^$', HomepageView.as_view(), name='url_homepage'),
    url(r'^orders/$', OrderListView.as_view(), name='url_orders'),
    url(r'^orders/user/(?P<username>\w+)/$',
        UserOrderView.as_view(),
        name='url_user_orders'),
    url(r'^orders/today/$',
        TodaysOrdersView.as_view(),
        name='url_todays_orders'),
    #url(r'^orders/items/(?P<pk>\d+)/$', view, name='url_item_orders'),
)
Beispiel #4
0
from content.api import ItemResource, RelationResource
from views import HomepageView


def google_webmaster_view(request):
    return HttpResponse(
        "google-site-verification: google009a062b2cd3a7e6.html")


v1_api = Api(api_name='v1')
v1_api.register(ItemResource())
v1_api.register(RelationResource())

urlpatterns = patterns(
    "",
    url(r"^$", HomepageView.as_view(), {"choose_community": True},
        name="home"),
    url(r"^(?P<cat>products|questions)$", HomepageView.as_view(), name="home"),
    url(r"^(?P<cat>products|questions)/(?P<filter>last|popular|unanswered)$",
        HomepageView.as_view(),
        name="home"),
    url(r"^content$", HomepageView.as_view(), name="item_index"),
    url(r"^admin/", include(admin.site.urls)),
    url(r"^admin_tools/", include("admin_tools.urls")),
    url(r"^about/", include("about.urls")),
    url(r"^account/", include("custaccount.urls")),
    # url(r"^announcements/", include("announcements.urls")),
    url(r"^content/", include("items.urls")),
    url(r"^dashboard", include("dashboard.urls")),
    url(r"^content2/", include("content.urls")),
    url(r'^api/', include(v1_api.urls)),
Beispiel #5
0
"""london_cafes 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
from django.contrib import admin

from views import HomepageView

urlpatterns = [
    url(r'^admin/', admin.site.urls),
    url(r'^$', HomepageView.as_view(), name="index"),
]
Beispiel #6
0
from django.conf.urls.defaults import *
from views import HomepageView

urlpatterns = patterns(
    '',
    url(r'^$',
        HomepageView.as_view(template_name='homepage.html', ),
        name='homepage'),
)
Beispiel #7
0
from django.conf.urls.defaults import *
from views import HomepageView

urlpatterns = patterns('',
    url(r'^$',
        HomepageView.as_view(
            template_name='homepage.html',
        ), name='homepage'),
)