Ejemplo n.º 1
0
from django.conf.urls.defaults import *
from django.views.generic.simple import direct_to_template
from django.views.generic import DetailView, ListView, UpdateView, CreateView
from pages.models import Page, PageTable
from django_tables2 import SingleTableView

urlpatterns = patterns(
    "",
    url(
        r'^$',
        SingleTableView.as_view(model=Page,
                                table_class=PageTable,
                                template_name="pages/index.html")),
    url(r'^create/$', CreateView.as_view(model=Page)),
    url(r'^(?P<pk>\d+)/$', UpdateView.as_view(model=Page)),
)
Ejemplo n.º 2
0
from django.conf.urls.defaults import *
from django.views.generic.simple import direct_to_template
from django.views.generic import DetailView, ListView, UpdateView, CreateView
from blogs.models import Blog, BlogTable
from django_tables2 import SingleTableView

urlpatterns = patterns(
    "",
    url(
        r'^$',
        SingleTableView.as_view(model=Blog,
                                table_class=BlogTable,
                                template_name="blogs/index.html")),
    url(r'^create/$', CreateView.as_view(model=Blog)),
    url(r'^(?P<pk>\d+)/$', UpdateView.as_view(model=Blog)),
    url(
        r'^(?P<pk>\d+)/posts$',
        SingleTableView.as_view(model=Blog,
                                table_class=BlogTable,
                                template_name="blogs/index.html")),
    #url(r'^(?P<pk>\d+)/posts/create/$', CreateView.as_view(model=Blog)),
    #url(r'^(?P<pk>\d+)/posts/create/(?P<pk>\d+)/$', UpdateView.as_view(model=Blog)),
)
Ejemplo n.º 3
0
        F('good__article__label', 'Filter name', values_list=[(str(x), x.label) for x in Article.objects.all()]),)

from views import DetailTicket, CreateTicket, DeleteTicket
urlpatterns = patterns('',
                       url(r'^test/$',
                           ListView.as_view(
                           queryset=Ticket.objects.select_related(),
                           #            model = Ticket,
                           context_object_name='tickets',
                           paginate_by=10,
                           template_name='finances/index.html')),

                       url(r'^class-based/$',
                           SingleTableView.as_view(
                           table_class=TicketTable,
                           #table_class = TicketTable,
                           queryset=Ticket.objects.select_related(),
                           template_name="finances/index2.html")),

                       url(r'^filter/$',
                           FilteredSingleTableView.as_view(
                           table_class=TicketTable,
                           queryset=Ticket.objects.select_related(),
                           template_name="finances/index2.html")),

#                       url(r'^filter/(?P<pk>\d+)/$',
#                           DetailView.as_view(
 #                          model=Ticket,
#                           template_name='finances/detail.html'), name='filter_detail'),
                       url(r'^filter/(?P<pk>\d+)/$',
                           DetailTicket.as_view(),
Ejemplo n.º 4
0
from django.conf.urls.defaults import *
from django.views.generic.simple import direct_to_template
from django.views.generic import DetailView, ListView, UpdateView, CreateView
from products.models import Product, ProductTable
from django_tables2 import SingleTableView

urlpatterns = patterns("",
    url(r'^$', SingleTableView.as_view(model=Product,table_class=ProductTable,template_name="products/index.html")),
    url(r'^create/$', CreateView.as_view(model=Product)),
    url(r'^(?P<pk>\d+)/$', UpdateView.as_view(model=Product)),

)
Ejemplo n.º 5
0
from django.conf.urls.defaults import *
from django.views.generic.simple import direct_to_template
from django.views.generic import DetailView, ListView, UpdateView, CreateView
from sales.models import Sale, SaleTable
from django_tables2 import SingleTableView

urlpatterns = patterns("",
    url(r'^$', SingleTableView.as_view(model=Sale,table_class=SaleTable,template_name="sales/index.html")),
    url(r'^(?P<pk>\d+)/$', UpdateView.as_view(model=Sale)),

)
Ejemplo n.º 6
0
from django.conf.urls.defaults import *
from django.views.generic.simple import direct_to_template
from django.views.generic import DetailView, ListView, UpdateView, CreateView
from products.models import Product, ProductTable
from django_tables2 import SingleTableView

urlpatterns = patterns(
    "",
    url(
        r'^$',
        SingleTableView.as_view(model=Product,
                                table_class=ProductTable,
                                template_name="products/index.html")),
    url(r'^create/$', CreateView.as_view(model=Product)),
    url(r'^(?P<pk>\d+)/$', UpdateView.as_view(model=Product)),
)
Ejemplo n.º 7
0
from django.conf.urls.defaults import *
from django.views.generic.simple import direct_to_template
from django.views.generic import DetailView, ListView, UpdateView, CreateView
from sales.models import Sale, SaleTable
from django_tables2 import SingleTableView

urlpatterns = patterns(
    "",
    url(
        r'^$',
        SingleTableView.as_view(model=Sale,
                                table_class=SaleTable,
                                template_name="sales/index.html")),
    url(r'^(?P<pk>\d+)/$', UpdateView.as_view(model=Sale)),
)
Ejemplo n.º 8
0
from django.conf.urls.defaults import *
from django.views.generic.simple import direct_to_template
from django.views.generic import DetailView, ListView, UpdateView, CreateView
from pages.models import Page, PageTable
from django_tables2 import SingleTableView

urlpatterns = patterns("",
    url(r'^$', SingleTableView.as_view(model=Page,table_class=PageTable,template_name="pages/index.html")),
    url(r'^create/$', CreateView.as_view(model=Page)),
    url(r'^(?P<pk>\d+)/$', UpdateView.as_view(model=Page)),

)
Ejemplo n.º 9
0
from django.conf.urls.defaults import *
from django.views.generic.simple import direct_to_template
from django.views.generic import DetailView, ListView, UpdateView, CreateView
from members.models import Member, MemberTable
from django_tables2 import SingleTableView

urlpatterns = patterns(
    "",
    url(
        r'^$',
        SingleTableView.as_view(model=Member,
                                table_class=MemberTable,
                                template_name="members/index.html")),
    url(r'^create/$', CreateView.as_view(model=Member)),
    url(r'^(?P<pk>\d+)/$', UpdateView.as_view(model=Member)),
)
Ejemplo n.º 10
0
from django.conf.urls.defaults import *
from django.views.generic.simple import direct_to_template
from django.views.generic import DetailView, ListView, UpdateView, CreateView
from blogs.models import Blog, BlogTable
from django_tables2 import SingleTableView

urlpatterns = patterns("",
    url(r'^$', SingleTableView.as_view(model=Blog,table_class=BlogTable,template_name="blogs/index.html")),
    url(r'^create/$', CreateView.as_view(model=Blog)),
    url(r'^(?P<pk>\d+)/$', UpdateView.as_view(model=Blog)),
    url(r'^(?P<pk>\d+)/posts$', SingleTableView.as_view(model=Blog,table_class=BlogTable,template_name="blogs/index.html")),
    #url(r'^(?P<pk>\d+)/posts/create/$', CreateView.as_view(model=Blog)),
    #url(r'^(?P<pk>\d+)/posts/create/(?P<pk>\d+)/$', UpdateView.as_view(model=Blog)),

)
Ejemplo n.º 11
0
from django.conf.urls.defaults import *
from django.views.generic.simple import direct_to_template
from django.views.generic import DetailView, ListView, UpdateView, CreateView
from members.models import Member, MemberTable
from django_tables2 import SingleTableView

urlpatterns = patterns("",
    url(r'^$', SingleTableView.as_view(model=Member,table_class=MemberTable,template_name="members/index.html")),
    url(r'^create/$', CreateView.as_view(model=Member)),
    url(r'^(?P<pk>\d+)/$', UpdateView.as_view(model=Member)),

)