Ejemplo n.º 1
0
#encoding: UTF-8
from django.conf.urls import url, patterns
from djangoratings.views import AddRatingFromModel

from .models import CommitteeMeeting
from views import (MeetingsListView, MeetingDetailView, MeetingTagListView,
                   CommitteeListView, CommitteeDetailView, TopicListView,
                   TopicsMoreView, TopicDetailView, delete_topic,
                   delete_topic_rating, meeting_list_by_date, edit_topic)

meetings_list = MeetingsListView.as_view()

committeesurlpatterns = patterns(
    '',
    url(r'^committee/$', CommitteeListView.as_view(), name='committee-list'),
    url(r'^committee/more-topics/$',
        TopicsMoreView.as_view(),
        name='committee-topics-more'),
    url(r'^committee/(?P<pk>\d+)/$',
        CommitteeDetailView.as_view(),
        name='committee-detail'),
    url(r'^committee/all_meetings/$',
        meetings_list,
        name='committee-all-meetings'),
    url(r'^committee/(?P<committee_id>\d+)/all_meetings/$',
        meetings_list,
        name='committee-all-meetings'),
    url(r'^committee/date/(?P<date>[\d\-]+)/$',
        meeting_list_by_date,
        name='committee-meetings-by-date'),
    url(r'^committee/(?P<committee_id>\d+)/date/(?P<date>[\d\-]+)/$',
Ejemplo n.º 2
0
#encoding: UTF-8
from django.conf.urls import url, patterns
from djangoratings.views import AddRatingFromModel
from views import (
    MeetingsListView, MeetingDetailView, MeetingTagListView,
    CommitteeListView, CommitteeDetailView, TopicListView, TopicsMoreView,
    TopicDetailView, delete_topic, delete_topic_rating, meeting_list_by_date,
    edit_topic, CommitteeMMMDocuments)


meetings_list = MeetingsListView.as_view()

committeesurlpatterns = patterns('',
    url(r'^committee/$', CommitteeListView.as_view(), name='committee-list'),
    url(r'^committee/more-topics/$', TopicsMoreView.as_view(), name='committee-topics-more'),
    url(r'^committee/(?P<pk>\d+)/$', CommitteeDetailView.as_view(), name='committee-detail'),
    url(r'^committee/all_meetings/$', meetings_list, name='committee-all-meetings'),
    url(r'^committee/(?P<committee_id>\d+)/all_meetings/$', meetings_list, name='committee-all-meetings'),
    url(r'^committee/date/(?P<date>[\d\-]+)/$', meeting_list_by_date, name='committee-meetings-by-date'),
    url(r'^committee/(?P<committee_id>\d+)/date/(?P<date>[\d\-]+)/$', meeting_list_by_date, name='committee-meetings-by-date'),
    url(r'^committee/(?P<committee_id>\d+)/date/$', meeting_list_by_date, name='committee-meetings-by-date'),
    url(r'^committee/(?P<committee_id>\d+)/topic/$', TopicListView.as_view(), name='committee-topic-list'),
    url(r'^committee/(?P<committee_id>\d+)/topic/add/$',
        edit_topic,
        name='edit-committee-topic'),
    url(r'^committee/(?P<committee_id>\d+)/topic/edit/(?P<topic_id>\d+)/$',
        edit_topic,
        name='edit-committee-topic'),
    url(r'^committee/meeting/(?P<pk>\d+)/$', MeetingDetailView.as_view(), name='committee-meeting'),
    url(r'^committee/meeting/tag/(?P<tag>.*)/$', MeetingTagListView.as_view(),
        name='committeemeeting-tag'),
Ejemplo n.º 3
0
#encoding: UTF-8
from django.conf.urls import url, patterns
from djangoratings.views import AddRatingFromModel
from django.views.decorators.cache import cache_page

cached = cache_page(60 * 15)

from .models import CommitteeMeeting
from views import (
    MeetingsListView, MeetingDetailView, MeetingTagListView,
    CommitteeListView, CommitteeDetailView, TopicListView, TopicsMoreView,
    TopicDetailView, delete_topic, delete_topic_rating, meeting_list_by_date,
    edit_topic)


meetings_list = MeetingsListView.as_view(
    queryset=CommitteeMeeting.objects.all(), paginate_by=20)

committeesurlpatterns = patterns('',
    url(r'^committee/$', cached(CommitteeListView.as_view()), name='committee-list'),
    url(r'^committee/more-topics/$', TopicsMoreView.as_view(), name='committee-topics-more'),
    url(r'^committee/(?P<pk>\d+)/$', CommitteeDetailView.as_view(), name='committee-detail'),
    url(r'^committee/(?P<committee_id>\d+)/all_meetings/$', meetings_list, name='committee-all-meetings'),
    url(r'^committee/(?P<committee_id>\d+)/date/(?P<date>[\d\-]+)/$', meeting_list_by_date, name='committee-meetings-by-date'),
    url(r'^committee/(?P<committee_id>\d+)/date/$', meeting_list_by_date, name='committee-meetings-by-date'),
    url(r'^committee/(?P<committee_id>\d+)/topic/$', TopicListView.as_view(), name='committee-topic-list'),
    url(r'^committee/(?P<committee_id>\d+)/topic/add/$',
        edit_topic,
        name='edit-committee-topic'),
    url(r'^committee/(?P<committee_id>\d+)/topic/edit/(?P<topic_id>\d+)/$',
        edit_topic,
        name='edit-committee-topic'),
Ejemplo n.º 4
0
#encoding: UTF-8
from django.conf.urls.defaults import *
from django.utils.translation import ugettext
from knesset.hashnav import ListView, DetailView
from models import *
from views import MeetingsListView, MeetingDetailView, CommitteeDetailView, meeting_list_by_date

committees_list = ListView(queryset=Committee.objects.all(), paginate_by=20)
committee_detail = CommitteeDetailView.as_view()
meetings_list = MeetingsListView(queryset=CommitteeMeeting.objects.all(),
                                 paginate_by=20)
#meeting_list_by_date = MeetingListByDate(paginate_by=20)
meeting_detail = MeetingDetailView.as_view()

committeesurlpatterns = patterns(
    '',
    url(r'^committee/$', committees_list, name='committee-list'),
    url(r'^committee/(?P<pk>\d+)/$', committee_detail,
        name='committee-detail'),
    url(r'^committee/(?P<committee_id>\d+)/all_meetings/$',
        meetings_list,
        name='committee-all-meetings'),
    url(r'^committee/(?P<committee_id>\d+)/date/(?P<date>[\d\-]+)/$',
        meeting_list_by_date,
        name='committee-meetings-by-date'),
    url(r'^committee/(?P<committee_id>\d+)/date/$',
        meeting_list_by_date,
        name='committee-meetings-by-date'),
    url(r'^committee/meeting/(?P<pk>\d+)/$',
        meeting_detail,
        name='committee-meeting'),