Exemplo n.º 1
0
from django.conf.urls import include
from django.contrib import admin
from django.contrib.auth import views
from .models import Archive
from hrmsapp.views import ArchiveMonthArchiveView

#from .import views
'''
urlpatterns = patterns('',
    url(r'^login/$',auth_views.login,name='login',kwargs={'template_name':'hrmsapp/login.html'}),
    url(r'^logout/$',auth_views.logout,name='logout',kwargs={'name':'/'}),
    url(r'^password_change$',auth_views.password_change,name='password_change',kwargs={'template_name': 'hrmsapp/password_change_form.html','post_change_redirect':'hrmsapp:password_change_done',}),
    url(r'^password_change_done$',auth_views.password_change_done,name='password_change_done',kwargs={'template_name': 'hrmsapp/password_change_done.html'}),
    
)
'''
urlpatterns = [
    url(r'^admin/', include(admin.site.urls)),
    #url(r'', include('hrmsapp.urls')),
    url(r'^login/$', views.login, {'template_name': 'login.html'}),
    url(r'^archive/$',
        ArchiveIndexView.as_view(model=Archive, date_field="pub_date"),
        name="archive"),
    url(r'^archive/(?P<year>[0-9]{4})/(?P<month>[-\w]+)/$',
        ArchiveMonthArchiveView.as_view(),
        name="archive_month"),
    url(r'^archive/(?P<year>[0-9]{4})/(?P<month>[0-9]+)/$',
        ArchiveMonthArchiveView.as_view(month_format='%m'),
        name="archive_month_numeric"),
]
Exemplo n.º 2
0
from . import models
from . import feeds

app_name = "blog"

urlpatterns = [
    url(r'^$', views.blogindexView, name='home_list'),
    url(r'^(?P<selected_page>\d+)/?$', views.blogindexView, name='home_list'),
    url(r'^(?P<year>\d{4})/(?P<month>\d{2})/(?P<day>\d{2})/(?P<slug>[-\w]+)/$',
        views.entryView,
        name='entry'),
    url(r'^categories/(?P<slug>[-\w]+)/$',
        views.categorylistView,
        name="category_list"),
    url(r'^categories/(?P<slug>[-\w]+)/(?P<selected_page>\d+)/?$',
        views.categorylistView,
        name="category_list"),
    url(r'^categories/$', views.categoriesView, name="categories"),
    url(r'^tags/(?P<slug>[-\w]+)/$',
        views.taglistView.as_view(),
        name="tag_list"),
    url(r'^tags/$', views.tagsView, name="tags"),
    url(r'^archive/',
        ArchiveIndexView.as_view(model=models.Entry, date_field="pub_date"),
        name="entry_archive"),
    url(r'^feed/$', feeds.LatestEntriesFeed()),
]

if settings.DEBUG is True:
    urlpatterns += static(settings.MEDIA_URL,
                          document_root=settings.MEDIA_ROOT)
Exemplo n.º 3
0
from django.conf.urls.defaults import *
from models import Entry, Tag
from django.views.generic.dates import ArchiveIndexView, DateDetailView
from django.views.generic import TemplateView

urlpatterns = patterns(
    '',
    url(r'^/?$',
        ArchiveIndexView.as_view(model=Entry, date_field="published_on"),
        name="news-main"),
    # url(r'^(?P<year>\d{4})/(?P<month>\d{1,2})/(?P<day>\d{1,2})/(?P<slug>[0-9A-Za-z-]+)/$', 'date_based.object_detail', dict(entry_dict, slug_field='slug', month_format='%m'),name="news-detail"),
    url(r'^(?P<year>\d+)/(?P<month>[-\w]+)/(?P<day>\d+)/(?P<pk>\d+)/$',
        DateDetailView.as_view(model=Entry, date_field="published_on"),
        name="news_detail"),
    url(r'^about/$',
        TemplateView.as_view(template_name='news/about.html'),
        name='news-about'),
)
Exemplo n.º 4
0
from .views import PostListView, PostDetailView, PostCreateView, PostUpdateView, PostDeleteView, PostYearArchiveView
from django.views.generic.dates import ArchiveIndexView
from blog.models import Post

urlpatterns = [
    path('', views.index, name='index'),
    path('business', PostListView.as_view(), name='business'),
    path('register/', user_views.register, name='register'),
    path('login/',
         auth_views.LoginView.as_view(template_name='users/login.html'),
         name='login'),
    path('logout/',
         auth_views.LogoutView.as_view(template_name='users/logout.html'),
         name='logout'),
    path('profile/', user_views.profile, name='profile'),
    path('post/<int:pk>/', PostDetailView.as_view(), name='post-detail'),
    path('post/new/', PostCreateView.as_view(), name='post-create'),
    path('post/<int:pk>/update', PostUpdateView.as_view(), name='post-update'),
    path('post/<int:pk>/delete', PostDeleteView.as_view(), name='post-delete'),
    path('archive/',
         ArchiveIndexView.as_view(model=Post, date_field='date_posted'),
         name='post_archive'),
    path('<int:year>/',
         PostYearArchiveView.as_view(),
         name='post_year_archive'),
    path('about/', views.about, name='about'),
]

if settings.DEBUG:
    urlpatterns += static(settings.MEDIA_URL,
                          document_root=settings.MEDIA_ROOT)
Exemplo n.º 5
0
from django.conf.urls.defaults import *
from django.views.generic.dates import ArchiveIndexView, YearArchiveView, MonthArchiveView, DayArchiveView, DateDetailView
from coltrane.models import Link

link_info_dict = {
    'model': Link,
    'queryset': Link.objects.all(),
    'date_field': 'pub_date',
}

# Views for the Link Model
urlpatterns = patterns('',
    url(r'^$', ArchiveIndexView.as_view(**link_info_dict), name='coltrane_link_archieve_index'),
    url(r'^(?P<year>\d{4})/$', YearArchiveView.as_view(make_object_list = True, allow_future = True, **link_info_dict), name='coltrane_link_archieve_year'),
    url(r'^(?P<year>\d{4})/(?P<month>\w{3})/$', MonthArchiveView.as_view(**link_info_dict), name='coltrane_link_archive_month'),
    url(r'^(?P<year>\d{4})/(?P<month>\w{3})/(?P<day>\d{2})/$', DayArchiveView.as_view(**link_info_dict), name='coltrane_link_archive_day'),
    url(r'^(?P<year>\d{4})/(?P<month>\w{3})/(?P<day>\d{2})/(?P<slug>[-\w]+)/$', DateDetailView.as_view(**link_info_dict), name='coltrane_link_detail'),

)
Exemplo n.º 6
0
 #        model=Blog,
 #    name='blog_detail'),
 url(r'^category/$',
     ListView.as_view(queryset=Category.objects.all(),
                      context_object_name='latest_blog_list',
                      paginate_by=3),
     name='category_list'),
 url(r'^category/(?P<slug>[-\w]+)/$',
     DetailView.as_view(
         model=Category,
         context_object_name='category',
     ),
     name='category_detail'),
 url(r'^archive/$',
     ArchiveIndexView.as_view(
         queryset=Blog.objects.all(),
         date_field='pub_date',
     ),
     name='blog_archive_index'),
 url(r'^archive/(?P<year>\d{4})/$',
     YearArchiveView.as_view(
         queryset=Blog.objects.all(),
         date_field='pub_date',
     ),
     name='blog_archive_index_year'),
 url(r'^archive/(?P<year>\d{4})/(?P<month>\d{2})/$',
     MonthArchiveView.as_view(queryset=Blog.objects.all(),
                              date_field='pub_date',
                              month_format='%m'),
     name='blog_archive_index_month'),
 url(r'^archive/(?P<year>\d{4})/(?P<month>\d{2})/(?P<day>\d{1,2})/$',
     MonthArchiveView.as_view(queryset=Blog.objects.all(),
Exemplo n.º 7
0
         name='album-update'),
    #path('album/<int:pk>/delete/',AlbumDeleteView.as_view(),name = 'album-delete'),
    path('album/<int:pk>/delete/', views.delete_album, name='album-delete'),
    path('album/<int:pk>/song/',
         views.add_songs_to_album,
         name='add_songs_to_album'),
    path('song/<int:pk>/remove/', views.song_delete, name='song_delete'),
    #path('search/',views.searchposts,name="post_search"),
    #add path for /accounts
    path('user/<str:username>',
         UserAlbumListView.as_view(),
         name='user-albums'),
    #path('archive/<int:year>/month/<int:month>', PostMonthArchiveView.as_view(month_format='%m'), name='post_archive_month'),
    #path('archives/<int:year>/<int:month>/', views.archive, name='archive'),
    path('archive/',
         ArchiveIndexView.as_view(model=Album, date_field="date_posted"),
         name="archives"),
    path('latest_albums/', views.latest_albums, name='latest-albums'),
    path('allusers/', views.listallusers, name='allusers'),
    url(r'^search/$', SearchView.as_view(), name='search'),  #added 17nov
    #path('search/', SearchResultsView.as_view(), name='search_results'),
    #url(r'^search/', views.search, name="search")
    #url(r'^searchform/$', views.searchform),
    #url(r'^search/$', views.search),
]

if settings.DEBUG:
    urlpatterns += static(settings.STATIC_URL,
                          document_root=settings.STATIC_ROOT)
    urlpatterns += static(settings.MEDIA_URL,
                          document_root=settings.MEDIA_ROOT)
Exemplo n.º 8
0
from django.conf.urls.defaults import patterns, url
from django.views.generic.dates import ArchiveIndexView, YearArchiveView, MonthArchiveView, DayArchiveView, DateDetailView

from coltrane.models import Noticia


urlpatterns = patterns('',
    url(r'^$',
        ArchiveIndexView.as_view(
            date_field = 'fecha_publicacion',
            paginate_by = 5,
            allow_empty = True,
            queryset = Noticia.live.all()
        ),
        name='noticia_archivo'
    ),
    url(r'^(?P<year>\d{4})/$',
        YearArchiveView.as_view(
            date_field = 'fecha_publicacion',
            paginate_by= 5,
            allow_empty= True,
            queryset= Noticia.live.all()),
        name='noticia_year'),
    url(r'^(?P<year>\d{4})/(?P<month>\d{2})/$',
        MonthArchiveView.as_view(
            date_field= 'fecha_publicacion',
            month_format = '%m',
            paginate_by= 5,
            allow_empty= True,
            queryset= Noticia.live.all()),
        name='noticia_mes'),
Exemplo n.º 9
0
from django.conf.urls.defaults import *
from django.views.generic.base import TemplateView
from django.views.generic.dates import ArchiveIndexView, DateDetailView
from models import Entry, Tag

entry_dict = {
    'queryset': Entry.objects.filter(is_draft=False),
    'date_field': 'published_on',
}

tag_dict = {
    'queryset': Tag.objects.all(),
}

urlpatterns = patterns(
    'django.views.generic',
    url(r'^/?$', ArchiveIndexView.as_view(**entry_dict), name="news-main"),
    url(r'^(?P<year>\d{4})/(?P<month>\d{1,2})/(?P<day>\d{1,2})/(?P<slug>[0-9A-Za-z-]+)/$',
        DateDetailView.as_view(slug_field='slug',
                               month_format='%m',
                               **entry_dict),
        name="news-detail"),
    url(r'^about/$',
        TemplateView.as_view(template_name='news/about.html'),
        name='news-about'),
)
Exemplo n.º 10
0
from django.conf.urls import *
from django.views.generic.dates import ArchiveIndexView, YearArchiveView, MonthArchiveView, DayArchiveView, DateDetailView

from jraywo.models import Link
 
urlpatterns = patterns('',
    url(r'^$', ArchiveIndexView.as_view(model=Link,
                                        date_field='pub_date',
                                        allow_empty = True,
                                        paginate_by = 5), name='jraywo_link_archive_index'), 
    url(r'^(?P<year>\d{4})/$', YearArchiveView.as_view(model=Link,
                                                       date_field='pub_date',
                                                       make_object_list=True,
                                                       allow_empty = True,
                                                       paginate_by = 5), name='jraywo_link_archive_year'), 
    url(r'^(?P<year>\d{4})/(?P<month>\w{3})/$', MonthArchiveView.as_view(model=Link,
                                                                         date_field='pub_date',
                                                                         allow_empty = True,
                                                                         paginate_by = 5),name='jraywo_link_archive_month'), 
    url(r'^(?P<year>\d{4})/(?P<month>\w{3})/(?P<day>\d{2})/$', DayArchiveView.as_view(model=Link,
                                                                                      date_field='pub_date',
                                                                                      allow_empty = True,
                                                                                      paginate_by = 5), name='jraywo_link_archive_day'), 
    url(r'^(?P<year>\d{4})/(?P<month>\w{3})/(?P<day>\d{2})/(?P<slug>[-\w]+)/$', DateDetailView.as_view(model=Link,
                                                                                                       date_field='pub_date'), name='jraywo_link_detail'),
)
Exemplo n.º 11
0
# coding: utf-8

from django.conf.urls import patterns, url
from django.views.generic.dates import ArchiveIndexView

from .models import Post
from .views import PostCreate

urlpatterns = patterns(
    'blog.blog.views',
    # Adds post to the blog
    url(r'^post/$', PostCreate.as_view(model=Post), name="post_to_blog"),

    # Blog posts list
    url(r'^$',
        ArchiveIndexView.as_view(model=Post, date_field="publication_date"),
        name="blog_posts"),
)
Exemplo n.º 12
0
from django.urls import path
from .views import *
from django.views.generic.dates import ArchiveIndexView
from .models import Salary
# from django.contrib.auth.views import Login, Logout

urlpatterns = [
    path('', index, name="index"),
    path('payroll', salary_view, name="salary"),
    # path(''),
    path('archive/',
         ArchiveIndexView.as_view(model=Salary, date_field="date_created"),
         name="salary_archive"),
    path('<int:year>/<str:month>/',
         SalaryMonthArchiveView.as_view(),
         name="archive_month"),
    path('<int:year>/',
         SalaryYearArchiveView.as_view(),
         name="salary_year_archive"),
    path('add', create_salary, name="add_salary"),
    path('payslip/<int:id>/', payslip, name='payslip'),
    path('employee_report/<int:id>/',
         employee_salary_report,
         name="employee_report"),
    path('export/xls/', export_salary_xls, name='export_salary_xls'),
    path('export/employee/xls/<int:id>/',
         export_employee_salary_xls,
         name='export_employee_salary_xls'),
    path('edit/<int:id>/', edit_salary, name="update_salary"),
    path('delete/<int:id>', delete_salary, name="delete_salary"),
    # path('login', Login.as_view, name="login"),
Exemplo n.º 13
0
from django.views.generic.dates import ArchiveIndexView
from blogapp.views import ArticleMonthArchiveView
from .models import Post

urlpatterns = [
    url(r'^$', views.index),
    url(r'^about$', views.about),
    url(r'^blog$', views.post_list),
    url(r'^drafts/$', views.post_draft_list, name='post_draft_list'),
    url(r'^post/(?P<pk>[0-9]+)/publish/$',
        views.post_publish,
        name='post_publish'),
    url(r'^post/(?P<pk>[0-9]+)/remove/$',
        views.post_remove,
        name='post_remove'),
    url(r'^post/(?P<pk>[0-9]+)/$', views.post_detail),
    url(r'^post/new/$', views.post_new, name='post_new'),
    url(r'^post/(?P<pk>[0-9]+)/edit/$', views.post_edit, name='post_edit'),
    url(r'^archive/$',
        ArchiveIndexView.as_view(model=Post, date_field="published_date"),
        name="post_archive"),
    # Example: /2012/aug/
    url(r'^(?P<year>[0-9]{4})/(?P<month>[-\w]+)/$',
        ArticleMonthArchiveView.as_view(),
        name="archive_month"),
    # Example: /2012/08/
    url(r'^(?P<year>[0-9]{4})/(?P<month>[0-9]+)/$',
        ArticleMonthArchiveView.as_view(month_format='%m'),
        name="archive_month_numeric"),
]
from django.conf.urls import patterns, include, url
from django.views.generic.list import ListView
from django.views.generic.detail import DetailView
from django.views.generic.dates import ArchiveIndexView,DateDetailView, YearArchiveView, MonthArchiveView, DayArchiveView

from coltrane.models import Entry

urlpatterns = patterns('django.views.generic.dates',
    #url(r'^/{0,1}$', 'coltrane.views.entries_index'),
    url(r'^$',
        ArchiveIndexView.as_view(queryset=Entry.live.all(),
                                 date_field='pub_date'),
                                 name='coltrane_entry_archive_index'),
   
    url(r'^(?P<year>\d{4})/$',
        YearArchiveView.as_view(queryset=Entry.live.all(),
                                date_field='pub_date'),
                                name='coltrane_entry_archive_year'),

    url(r'^(?P<year>\d{4})/(?P<month>\w{3})/{0,1}$',
        MonthArchiveView.as_view(queryset=Entry.live.all(),
                                 date_field='pub_date'),
                                 name='coltrane_entry_archive_month'),
    

    url(r'^(?P<year>\d{4})/(?P<month>\w{3})/(?P<day>\d{2})/$',
        DayArchiveView.as_view(queryset=Entry.live.all(),
                               date_field='pub_date'),
                               name='coltrane_entry_archive_day'),

    url(r'^(?P<year>\d{4})/(?P<month>\w{3})/(?P<day>\d{2})/(?P<slug>[-\w]+)/$',
Exemplo n.º 15
0
from django.urls import path
from django.views.generic.dates import ArchiveIndexView

from . import views
from .models import Loan
urlpatterns = [
    path('', views.home, name='girvi-home'),
    path('loan_archive/',
         ArchiveIndexView.as_view(model=Loan, date_field="created"),
         name="loan_archive"),
    path('<int:year>/',
         views.LoanYearArchiveView.as_view(),
         name="loan_year_archive"),
    # Example: /2012/08/
    path('<int:year>/<int:month>/',
         views.LoanMonthArchiveView.as_view(month_format='%m'),
         name="archive_month_numeric"),
    # Example: /2012/aug/
    path('<int:year>/<str:month>/',
         views.LoanMonthArchiveView.as_view(),
         name="archive_month"),
    # Example: /2012/week/23/
    path('<int:year>/week/<int:week>/',
         views.LoanWeekArchiveView.as_view(),
         name="archive_week"),

    path('check/',views.check_girvi,name='check_girvi'),
    path('multirelease/', views.multirelease, name='girvi-multirelease'),

    path('bulk_release/',views.bulk_release,name='bulk_release'),
    path('bulk_release_detail/',views.bulk_release_detail,name='bulk_release_detail'),
Exemplo n.º 16
0
 url(r'^(?P<year>\d{4})/week/(?P<week>\d+)/$',
     views.ScanWeekArchiveView.as_view(),
     name="archive_week"),
 # Example: /2012/08/
 url(r'^(?P<year>\d{4})/(?P<month>\d+)/$',
     views.ScanMonthArchiveView.as_view(month_format='%m'),
     name="archive_month_numeric"),
 # Example: /2012/aug/
 url(r'^(?P<year>\d{4})/(?P<month>[-\w]+)/$',
     views.ScanMonthArchiveView.as_view(),
     name="scan_month"),
 url(r'^y(?P<year>\d{4})/$',
     views.ScanYearArchiveView.as_view(),
     name="archive_year_archive"),
 url(r'archive/$',
     ArchiveIndexView.as_view(model=Scan, date_field="scan_time"),
     name="scan_archive"),
 #url(r'^$', views.index, name='index'), # comment out to use ListView
 url(r'^$',
     views.IndexView.as_view(
         queryset = Scan.objects.order_by('-scan_time')[:20],
         template_name = 'wlether/index.html',
         context_object_name = 'latest_scan_list'),
     name='index'),
 # ex: /wlether/5/
 url(r'^(?P<scan_id>\d+)/$', views.detail, name='detail'),
 # ex: /wlether/5/5/details/
 url(r'^(?P<scan_id>\d+)/(?P<apoint_id>\d+)/details/$', views.details, name='details'),
 # ex: /wlether/5/results/
 url(r'^(?P<scan_id>\d+)/(?P<apoint_id>\d+)/results/$', views.results, name='results'),
 # ex: /wlether/5/5/collect/
Exemplo n.º 17
0
from django.conf.urls import url
from django.views.generic.list import ListView
from django.views.generic.dates import (ArchiveIndexView, DateDetailView,
                                        DayArchiveView, MonthArchiveView,
                                        YearArchiveView)

from django_blog.feeds import EntriesFeed
from django_blog.models import Category, Entry
from django_blog.views import author_detail, category_detail

app_name = 'blog'

urlpatterns = [
    url(r'^$',
        ArchiveIndexView.as_view(date_field='pub_date',
                                 queryset=Entry.live.all()),
        name='blog_entry_archive'),
    url(r'^author/(?P<id>[\d]+)/$', author_detail, name='blog_author_detail'),
    url(r'^category/$',
        ListView.as_view(queryset=Category.objects.all()),
        name='blog_category_list'),
    url(r'^category/(?P<slug>[-\w]+)/$',
        category_detail,
        name='blog_category_detail'),
    url(r'^feed/$', EntriesFeed(), name='blog_feed'),
    url(r'^(?P<year>\d{4})/$',
        YearArchiveView.as_view(date_field='pub_date',
                                make_object_list=True,
                                queryset=Entry.live.all()),
        name='blog_entry_archive_year'),
    url(r'^(?P<year>\d{4})/(?P<month>[-\w]+)/$',
Exemplo n.º 18
0
Arquivo: urls.py Projeto: Ashaba/rms
    url(r'^manage/$', Manager.as_view(), name='manage'),
    url(r'^manage/(?P<y>\w+)/$', Manager.as_view(), name='manage-year'),
    url(r'^expenses/(?P<y>\w+)/$', views.expenses,name='expenses'),
    url(r'^expenses/$', views.expenses,name='expenses'),
    url(r'^exp/$', views.expensesDetail,name='expensesDetail'),
    url(r'^exp/(?P<y>\w+)/$', views.expensesDetail,name='expensesDetail'),
    url(r'^exp/(?P<y>\w+)/(?P<m>\w+)/$', views.expensesDetail,name='expensesDetail'),
    url(r'^logout/$', LogoutView.as_view(),name='logout'),
    url(r'^view/(?P<pk>\d+)/$', RecordDetailView.as_view(), name='record-detail'),
    url(r'^invoiceprint/(?P<pk>\d+)/$', RecordDetailView.as_view(template_name = 'invoice-print.html')),
    url(r'^delete/expense/(?P<pk>\d+)/$', RecordDelete.as_view(model=Expenses, success_url = reverse_lazy('expenses'))),
    url(r'^delete/(?P<pk>\d+)/$', RecordDelete.as_view(), name='delete'),
	url(r'^credit/delete/(?P<pk>\d+)/$', CreditDelete.as_view(), name='delete-credit'),
	url(r'^debit/delete/(?P<pk>\d+)/$', DebitDelete.as_view(), name='delete-debit'),
    url(r'^view/(?P<m>\w+)/$', views.get_month),
    url(r'^archive/$', ArchiveIndexView.as_view(model=Records, date_field="datecreated"), name="record_achive"),
    url(r'^view/$', views.show),
    url(r'^edit/(?P<pk>[0-9]+)/$', UpdateRecord.as_view(), name='update-record'),
	url(r'^credit/edit/(?P<pk>[0-9]+)/$', UpdateCredit.as_view(), name='edit-credit'),
	url(r'^debit/edit/(?P<pk>[0-9]+)/$', UpdateDebit.as_view(), name='edit-debit'),
    url(r'^expense/edit/(?P<pk>[0-9]+)/$', UpdateExpense.as_view(), name='edit-expense'),
    url(r'^expense/details/(?P<pk>[0-9]+)/$', ExpenseDetailView.as_view(), name='expense-details'),
    #url(r'^add/$', RecordsCreate.as_view(),name='add'),
    url(r'^add/$', views.add,name='add'),
    url(r'^credit/$', CreditList.as_view(), name='creditlist'),
	url(r'^debit/$', DebitList.as_view(), name='debit-list'),
    url(r'^bank/$', BankView.as_view(),name='bank'),
    url(r'^pdf/$', views.generatePdf,name='generatePdf'),
    url(r'^invoice/$', views.invoicePdf,name='invoicePdf'),
    url(r'^addCredit/$', CreateCredit.as_view(),name='addCredit'),
    url(r'^addDebit/$', CreateDebit.as_view(),name='addDebit'),
Exemplo n.º 19
0
from django.views.generic.list import ListView
from wolf.views import category_detail

entry_info_dict = {
'queryset': Entry.objects.all(),
'date_field': 'pub_date',
}
link_info_dict = {
'queryset': Link.objects.all(),
'date_field': 'pub_date',
}

urlpatterns = [
    url(r'^admin/', admin.site.urls),
    url(r'^search/$', search),
    url(r'^weblog/$', ArchiveIndexView.as_view(model=Entry, date_field="pub_date")),
    url(r'^weblog/(?P<year>\d{4})/$', YearArchiveView.as_view(model=Entry,date_field="pub_date")),
    url(r'^weblog/(?P<year>\d{4})/(?P<month>\w{3})/$',MonthArchiveView.as_view(model=Entry,date_field="pub_date")),
    url(r'^weblog/(?P<year>\d{4})/(?P<month>\w{3})/(?P<day>\d{2})/$',DayArchiveView.as_view(model=Entry,date_field="pub_date")),
    url(r'^weblog/(?P<year>\d{4})/(?P<month>\w{3})/(?P<day>\d{2})/(?P<slug>[-\w]+)/$',DateDetailView.as_view(model=Entry,date_field="pub_date")),

    url(r'^weblog/$', ArchiveIndexView.as_view(model=Link, date_field="pub_date")),
    url(r'^weblog/(?P<year>\d{4})/$', YearArchiveView.as_view(model=Link,date_field="pub_date")),
    url(r'^weblog/(?P<year>\d{4})/(?P<month>\w{3})/$',MonthArchiveView.as_view(model=Link,date_field="pub_date")),
    url(r'^weblog/(?P<year>\d{4})/(?P<month>\w{3})/(?P<day>\d{2})/$',DayArchiveView.as_view(model=Link,date_field="pub_date")),
    url(r'^weblog/(?P<year>\d{4})/(?P<month>\w{3})/(?P<day>\d{2})/(?P<slug>[-\w]+)/$',DateDetailView.as_view(model=Link,date_field="pub_date")),
    url(r'', include('django.contrib.flatpages.urls')),

    url(r'^categories/$',ListView.as_view(queryset=Category.objects.all())),
    url(r'^categories/(?P<slug>[-\w]+)/$',category_detail),
    url(r'^tags/$',ListView.as_view(queryset=Tag.objects.all())),
Exemplo n.º 20
0
from .models import Post
from .views import (post_detail, post_share, tag_cloud, PostListView,
                    TagDetailView, PostDayArchiveView, PostMonthArchiveView,
                    PostTodayArchiveView, PostWeekArchiveView,
                    PostYearArchiveView)

app_name = "posts"
urlpatterns = [
    path('', PostListView.as_view(), name="post_list"),
    path('<int:year>/<str:month>/<int:day>/<slug:slug>/',
         post_detail,
         name="post_detail"),
    path('<int:post_id>/share/', post_share, name='post_share'),
    path('archive/',
         ArchiveIndexView.as_view(model=Post,
                                  date_field='publish',
                                  allow_empty=True),
         name='post_archive'),
    path('archive/<int:year>/',
         PostYearArchiveView.as_view(),
         name="year_archive"),
    path('archive/<int:year>/<str:month>/',
         PostMonthArchiveView.as_view(),
         name="month_archive"),
    path('archive/<int:year>/week/<int:week>/',
         PostWeekArchiveView.as_view(),
         name="week_archive"),
    path('archive/<int:year>/<str:month>/<int:day>/',
         PostDayArchiveView.as_view(),
         name="day_archive"),
    path('today/', PostTodayArchiveView.as_view(), name="today_archive"),
Exemplo n.º 21
0
from django.conf.urls.defaults import *
from django.views.generic.base import TemplateView
from django.views.generic.dates import ArchiveIndexView, DateDetailView
from models import Entry, Tag

entry_dict = {
    'queryset': Entry.objects.filter(is_draft=False),
    'date_field': 'published_on',
}

tag_dict = {
    'queryset': Tag.objects.all(),
}

urlpatterns = patterns('django.views.generic',
    url(r'^/?$', 
        ArchiveIndexView.as_view(**entry_dict), 
        name="news-main"),
    url(r'^(?P<year>\d{4})/(?P<month>\d{1,2})/(?P<day>\d{1,2})/(?P<slug>[0-9A-Za-z-]+)/$', 
        DateDetailView.as_view(slug_field='slug', month_format='%m', **entry_dict),
        name="news-detail"),
    url(r'^about/$', 
        TemplateView.as_view(template_name='news/about.html'), name='news-about'),
)
Exemplo n.º 22
0
# (r'^image/remove/production/(?P<image_id>\d+)/$', image_selectproduction_view),

from djdam.apps.searcher.models import PostReadyOriginal
# from django.conf.urls import defaults
from django.views.generic.dates import ArchiveIndexView
import djdam.apps.searcher.views
from djdam.apps.searcher.views import PhotoYearArchiveView, PhotoMonthArchiveView, PhotoWeekArchiveView, PhotoDayArchiveView
# postreadyorig_info = {
#     "queryset"   : PostReadyOriginal.objects.all(),
#     "date_field" : "photo_date"
# }

## All
urlpatterns += patterns('djdam.apps.searcher.views',
    url(r'^postreadyorig/$', ArchiveIndexView.as_view(
      model=PostReadyOriginal,
      date_field="photo_date",
      template_name="genericviews/photo_orig_archive.html"),
      name="photo_orig_archive"),
)

## Year
urlpatterns += patterns('djdam.apps.searcher.views',
    url(r'^postreadyorig/(?P<year>\d{4})/$',
        PhotoYearArchiveView.as_view(
        template_name="genericviews/photo_orig_archive_year.html"),
        name="photo_orig_archive_year"),
)

## Week
urlpatterns += patterns('djdam.apps.searcher.views',
    url(r'^postreadyorig/(?P<year>\d{4})/week/(?P<week>\d+)/$',
Exemplo n.º 23
0
from django.conf.urls import patterns, url
from django.views.generic.dates import (ArchiveIndexView, DateDetailView,
    DayArchiveView, MonthArchiveView, YearArchiveView)

from blog.models import Entry


urlpatterns = patterns('',
    url(r'^$',
        ArchiveIndexView.as_view(
            allow_future=True,
            date_field='pub_date',
            queryset=Entry.live.all()
        ),
        name='blog_entry_archive'
    ),

    url(r'^(?P<year>\d{4})/$',
        YearArchiveView.as_view(
            date_field='pub_date',
            make_object_list=True,
            queryset=Entry.live.all()
        ),
        name='blog_entry_archive_year'
    ),

    url(r'^(?P<year>\d{4})/(?P<month>[-\w]+)/$',
        MonthArchiveView.as_view(
            date_field='pub_date',
            queryset=Entry.live.all()
        ),
Exemplo n.º 24
0
    (r'^$', HomeView.as_view()),
#
# About section
    (r'^about/$', direct_to_template, {'template': 'about/about.html'}),
    (r'^about/(\w+)/$', about_pages),
#
# Class-based Generic Views for galleria    
	(r'^tags/$', ListView.as_view(model=Tag, context_object_name="tag_list", template_name="tag_list.html",)),
#
# My own view functions for galleria
#    (r'^gallery/(all)/$', gal_all),														
    (r'^gallery/([\w-]+)/(?P<image_id>\d+)/$', image_detail),
    (r'^gallery/([\w-]+)/$', gal_by_tag),
#
# Class-based generic views for daily-grist
    (r'^daily-grist/archive/$', ArchiveIndexView.as_view(**info_dict),),
    (r'^daily-grist/$', EntryListView.as_view()),
    (r'^daily-grist/(?P<year>\d{4})/(?P<month>[a-z]{3})/(?P<day>\d{1,2})/(?P<slug>[\w-]+)/$', EntryDetailView.as_view(),),
#
# Class-based generic views for testimonials
    (r'^testimonials/$', QuotationListView.as_view()),
#
# Uncomment the next line to enable the admin:
    url(r'^admin/', include(admin.site.urls)),
#
#Daily-Grist urls
    #(r'^daily-grist/(?P<year>\d{4})/(?P<month>[a-z]{3})/(?P<day>\d{1,2})/(?P<slug>[\w-]+)/$', object_detail, dict(info_dict, slug_field='slug', template_object_name='entry', template_name='blog/entry_detail.html',)),
#    (r'^daily-grist/(?P<year>\d{4})/(?P<month>[a-z]{3})/(?P<day>\d{1,2})/$', object_detail, dict(info_dict, template_object_name='entry_list', template_name='blog/entry_list.html',)),
#    (r'^daily-grist/(?P<year>\d{4})/(?P<month>[a-z]{3})/(?P<day>\d{1,2})/$', archive_day,dict(info_dict, template_object_name='entry_list', template_name='blog/entry_list.html',)),
#    (r'^daily-grist/(?P<year>\d{4})/(?P<month>[a-z]{3})/$',archive_month, dict(info_dict, template_object_name='entry_list', template_name='blog/entry_list.html',)),
#    (r'^daily-grist/(?P<year>\d{4})/$', archive_year, dict(info_dict, template_object_name='entry_list', template_name='blog/entry_list.html')),
Exemplo n.º 25
0
#!/usr/bin/env python -tt
# encoding: utf-8
#

from .models import Poll
from django.conf.urls import *
from . import views
from django.views.generic.dates import ArchiveIndexView

# delete this
info_dict = {'queryset': Poll.objects.all()}

urlpatterns = [
    url(r'^$',
        ArchiveIndexView.as_view(model=Poll,
                                 date_field='pub_date',
                                 template_name='wlpoll/poll_list.html'),
        name='wlpoll_archive'),
    url(r'^(?P<pk>[0-9]+)/$', views.DetailView.as_view(),
        name='wlpoll_detail'),
    url(r'(?P<object_id>\d+)/vote/$', views.vote, name='wlpoll_vote'),
]
Exemplo n.º 26
0
    edit_timeline,
    edit_images,
    project_approval,
    publish_project,
)

urlpatterns = [
    url(
        regex=r"^$",
        view=package_list,
        name="packages",
    ),
    url(
        regex=r"^latest/$",
        view=ArchiveIndexView.as_view(
            queryset=Project.objects.filter().select_related(),
            paginate_by=50,
            date_field="created"),
        name="latest_packages",
    ),
    url(
        regex="^add/$",
        view=add_package,
        name="add_package",
    ),
    url(
        regex="^(?P<slug>[-\w]+)/edit/$",
        view=edit_package,
        name="edit_package",
    ),
    url(
        regex="^(?P<slug>[-\w]+)/timeline/edit/$",
Exemplo n.º 27
0
from django.conf.urls import include, url
from . import views
from django.views.generic.dates import ArchiveIndexView
from blogapp.views import ArticleMonthArchiveView
from .models import Post

urlpatterns = [
    url(r'^$', views.index),
    url(r'^about$', views.about),
    url(r'^blog$', views.post_list),
    url(r'^drafts/$', views.post_draft_list, name='post_draft_list'),
    url(r'^post/(?P<pk>[0-9]+)/publish/$', views.post_publish, name='post_publish'),
    url(r'^post/(?P<pk>[0-9]+)/remove/$', views.post_remove, name='post_remove'),
    url(r'^post/(?P<pk>[0-9]+)/$', views.post_detail),
    url(r'^post/new/$', views.post_new, name='post_new'),
    url(r'^post/(?P<pk>[0-9]+)/edit/$', views.post_edit, name='post_edit'),
    url(r'^archive/$',
        ArchiveIndexView.as_view(model=Post, date_field="published_date"),
        name="post_archive"),
    # Example: /2012/aug/
    url(r'^(?P<year>[0-9]{4})/(?P<month>[-\w]+)/$',
        ArticleMonthArchiveView.as_view(),
        name="archive_month"),
    # Example: /2012/08/
    url(r'^(?P<year>[0-9]{4})/(?P<month>[0-9]+)/$',
        ArticleMonthArchiveView.as_view(month_format='%m'),
        name="archive_month_numeric"),
]
Exemplo n.º 28
0
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
admin.autodiscover()

archive_dict = {
                'queryset':Press.objects.all(),
                'date_field':'date_pub',
                }

urlpatterns = patterns('',
    # Examples:
    # url(r'^$', 'codeblock.views.home', name='home'),
    # url(r'^codeblock/', include('codeblock.foo.urls')),

    # Uncomment the admin/doc line below to enable admin documentation:
    url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
    url(r'^admin/', include(admin.site.urls)),
    (r'^$',HomeView),
    (r'^tag/(\d*)/$',TagView),
    (r'^category/$',CategoryView),
    url(r'^(\d*)/$',ArticleView,name="article"),
    (r'^comments/', include('django.contrib.comments.urls')),
    (r'feed/$',LatestPress()),
    url(r'^archive/$',
        ArchiveIndexView.as_view(model=Press, date_field="date_pub"),
        name="article_archive"),
)

            
urlpatterns += staticfiles_urlpatterns()
Exemplo n.º 29
0
# -*- coding: utf-8 -*-
from django.conf.urls import patterns, url
from django.views.generic.dates import ArchiveIndexView

from .view import *
from .models import News3
from .settings import CMSPLUGIN_NEWS3_PAGINATION_BY


__author__ = 'vader666'


urlpatterns = patterns('',
    url(r'^$',
        ArchiveIndexView.as_view(
        model=News3,
        date_field='pub_date',
        allow_empty=True,
        paginate_by=CMSPLUGIN_NEWS3_PAGINATION_BY,),
        name='news3_archive'),
    url(r'^(?P<year>\d{4})/$',
        News3YearArchiveView.as_view(), name='news3_archive_year'),
    url(r'^(?P<year>\d{4})/(?P<month>\d{2})/$',
        News3MonthArchiveView.as_view(), name='news3_archive_month'),
    url(r'^(?P<year>\d{4})/(?P<month>\d{2})/(?P<day>\d{2})/$',
        News3DayArchiveView.as_view(), name='news3_archive_day'),
    url(r'^(?P<year>\d{4})/(?P<month>\d{2})/(?P<day>\d{2})/(?P<slug>[-\w]+)/$',
        News3DateDetailView.as_view(), name='news3_detail'),
)
Exemplo n.º 30
0
     r'^$',
     PackageListView.as_view(),
     name='packages',
 ),
 url(
     r'^p/(?P<slug>[-\w]+)/$',
     PackageDetailView.as_view(),
     name='package',
 ),
 url(r'^c/(?P<slug>[-\w]+)/$',
     CategoryDetailView.as_view(),
     name='category'),
 url(
     r'^latest/$',
     view=ArchiveIndexView.as_view(
         queryset=Package.objects.filter().select_related(),
         paginate_by=50,
         date_field='created'),
     name='latest_packages',
 ),
 url(
     r'^add/$',
     PackageCreateView.as_view(),
     name='add_package',
 ),
 url(
     r'^(?P<slug>[-\w]+)/edit/$',
     PackageUpdateView.as_view(),
     name='edit_package',
 ),
 url(
     r'^(?P<slug>[-\w]+)/post-data/$',
Exemplo n.º 31
0
# coding: utf-8

from django.conf.urls import patterns, url
from django.views.generic.dates import ArchiveIndexView

from .models import Post
from .views import PostCreate

urlpatterns = patterns('blog.blog.views',
                       # Adds post to the blog
                       url(r'^post/$',
                           PostCreate.as_view(model=Post),
                           name="post_to_blog"
                           ),

                       # Blog posts list
                       url(r'^$',
                           ArchiveIndexView.as_view(
                               model=Post,
                               date_field="publication_date"),
                           name="blog_posts"
                           ),
                       )
Exemplo n.º 32
0
from django.conf.urls import patterns, url
from django.views.generic.dates import ArchiveIndexView, YearArchiveView, MonthArchiveView, DayArchiveView, DateDetailView
from coltrane.models import Link

urlpatterns = patterns('',
                       url(r'^$', ArchiveIndexView.as_view(model=Link, date_field='pub_date'), name='coltrane_link_archive_index'),
                       url(r'^(?P<year>\d{4})/$', YearArchiveView.as_view(model=Link, make_object_list=True,
                                                                                date_field='pub_date')),
                       url(r'^(?P<year>\d{4})/(?P<month>\w{3})/$', MonthArchiveView.as_view(model=Link,
                                                                                                  date_field='pub_date')),
                       url(r'^(?P<year>\d{4})/(?P<month>\w{3})/(?P<day>\d{2})/$',
                           DayArchiveView.as_view(model=Link, date_field='pub_date')),
                       url(r'^(?P<year>\d{4})/(?P<month>\w{3})/(?P<day>\d{2})/(?P<slug>[-\w]+)/$',
                           DateDetailView.as_view(model=Link, date_field='pub_date'), name='coltrane_link_details'),
                       )
Exemplo n.º 33
0
from django.conf.urls.defaults import *
from models import Entry, Tag
from django.views.generic.dates import ArchiveIndexView, DateDetailView
from django.views.generic import TemplateView

urlpatterns = patterns('',
    url(r'^/?$', ArchiveIndexView.as_view(model=Entry, date_field="published_on"), name="news-main"),
    # url(r'^(?P<year>\d{4})/(?P<month>\d{1,2})/(?P<day>\d{1,2})/(?P<slug>[0-9A-Za-z-]+)/$', 'date_based.object_detail', dict(entry_dict, slug_field='slug', month_format='%m'),name="news-detail"),
    url(r'^(?P<year>\d+)/(?P<month>[-\w]+)/(?P<day>\d+)/(?P<pk>\d+)/$',
        DateDetailView.as_view(model=Entry, date_field="published_on"),
        name="news_detail"),
    url(r'^about/$', TemplateView.as_view(template_name='news/about.html'), name='news-about'),
)


Exemplo n.º 34
0
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
admin.autodiscover()

archive_dict = {
    'queryset': Press.objects.all(),
    'date_field': 'date_pub',
}

urlpatterns = patterns(
    '',
    # Examples:
    # url(r'^$', 'codeblock.views.home', name='home'),
    # url(r'^codeblock/', include('codeblock.foo.urls')),

    # Uncomment the admin/doc line below to enable admin documentation:
    url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
    url(r'^admin/', include(admin.site.urls)),
    (r'^$', HomeView),
    (r'^tag/(\d*)/$', TagView),
    (r'^category/$', CategoryView),
    url(r'^(\d*)/$', ArticleView, name="article"),
    (r'^comments/', include('django.contrib.comments.urls')),
    (r'feed/$', LatestPress()),
    url(r'^archive/$',
        ArchiveIndexView.as_view(model=Press, date_field="date_pub"),
        name="article_archive"),
)

urlpatterns += staticfiles_urlpatterns()
Exemplo n.º 35
0
from django.conf.urls import patterns, url
from django.views.generic.dates import ArchiveIndexView, YearArchiveView, MonthArchiveView, DayArchiveView, DateDetailView

from jarrett.models import Noche
from datetime import date
import datetime

urlpatterns = patterns('',
    url(r'^$',
        ArchiveIndexView.as_view(
            date_field = 'fecha_evento',
            paginate_by = 9,
            allow_empty = True,
            queryset = Noche.live.exclude(fecha_evento__lt=date.today()).reverse(),
            allow_future = True
        ),
        name='noche_archivo'
    ),
    url(r'^(?P<year>\d{4})/$',
        YearArchiveView.as_view(
            date_field = 'fecha_evento',
            paginate_by= 9,
            allow_empty= True,
            queryset= Noche.live.all()),
        name='noche_year'),
    url(r'^(?P<year>\d{4})/(?P<month>\d{2})/$',
        MonthArchiveView.as_view(
            date_field= 'fecha_evento',
            month_format = '%m',
            paginate_by= 9,
            allow_empty= True,
Exemplo n.º 36
0
from referrals.feeds import AtomLatestReferralsFeed, RssLatestReferralsFeed
import views

urlpatterns = patterns('referrals.views',
        url(r'^(?P<pk>\d+)/(?P<slug>[\w-]+)/$', 'referraldetail', name='referral_detail'),
        url(r'^add/$', views.referralcreate, name='referral_add'),
        url(r'^edit/(?P<pk>\d+)/$', views.referralupdate, name='referral_update'),
        url(r'^delete/(?P<pk>\d+)/$', views.referraldelete, name='referral_delete'),
        url(r'^$', 'referrallist', name='referral_list'),
        url(r'^user/(?P<username>\w+)/$', views.userreferrallist, name='user_referral_list'),
        
        url(
            regex=r"^latest/$",
            view=ArchiveIndexView.as_view(
                queryset=Referral.objects.filter().select_related(),
                paginate_by=50,
                date_field="updated_at"
            ),
            name='referral_archive',
        ),

        # Feeds
        url(
            regex=r'^latest/rss/$',
            view=RssLatestReferralsFeed(),
            name='feeds_latest_referrals_rss'
        ),
        url(
            regex=r'^latest/atom/$',
            view=AtomLatestReferralsFeed(),
            name='feeds_latest_referrals_atom'
Exemplo n.º 37
0
from django.conf import settings
from django.conf.urls.static import static
from django.conf.urls import patterns, url
from django.views.generic.dates import ArchiveIndexView

from cnd_blog import views
from cnd_blog.views import ArticleYearArchiveView, ArticleMonthArchiveView, ArticleDayArchiveView
from cnd_blog.models import Article

urlpatterns = patterns(
    '',
    url(r'^archive/$',
        ArchiveIndexView.as_view(model=Article,
                                 date_field="pub_date",
                                 queryset=Article.objects.all()),
        name='archive'),
    url(r'^(?P<year>\d{4})/$',
        ArticleYearArchiveView.as_view(),
        name='article_year_archive'),
    url(r'^(?P<year>\d{4})/(?P<month>\d{1,2})/$',
        ArticleMonthArchiveView.as_view(),
        name='article_month_archive'),
    url(r'^(?P<year>\d{4})/(?P<month>\d{1,2})/(?P<day>\d{1,2})/$',
        ArticleDayArchiveView.as_view(),
        name='article_day_archive'),
) + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
Exemplo n.º 38
0
from package.models import Package
from package.views import (add_example, add_package, delete_package,
                           ajax_package_list, edit_package, edit_example,
                           update_package, usage, package_list, package_detail)

urlpatterns = patterns(
    "",
    url(
        regex=r"^$",
        view=package_list,
        name="packages",
    ),
    url(
        regex=r"^latest/$",
        view=ArchiveIndexView.as_view(
            queryset=Package.objects.select_related(), date_field="created"),
        name="latest_packages",
    ),
    url(
        regex="^add/$",
        view=add_package,
        name="add_package",
    ),
    url(
        regex="^(?P<slug>[-\w]+)/edit/$",
        view=edit_package,
        name="edit_package",
    ),
    url(
        regex="^(?P<slug>[-\w]+)/fetch-data/$",
        view=update_package,
Exemplo n.º 39
0
from django.conf.urls.defaults import patterns, url
from blog.models import Post
from blog.views import ArchiveCategoryView
from django.views.generic.dates import ArchiveIndexView, YearArchiveView, MonthArchiveView, DateDetailView
from blog.feeds import LatestEntriesFeed

info = {
    'model': Post,
    'date_field': 'date',
}

urlpatterns = patterns('', 
    url(r'^$', ArchiveIndexView.as_view(**info), name='blog-index'),
    url(r'^feed/$', LatestEntriesFeed(), name='blog-feed'),
    url(r'^(?P<year>\d{4})/$', YearArchiveView.as_view(**info), name='blog-archive-year'),
    url(r'^(?P<year>\d{4})/(?P<month>[A-z]{3})/$', MonthArchiveView.as_view(**info), name='blog-archive-month'),
    url(r'^(?P<category>[\w-]+)/$', ArchiveCategoryView.as_view(**info), name='blog-archive-category'),
    url(r'^(?P<year>\d{4})/(?P<month>[A-z]{3})/(?P<day>\d+)/(?P<slug>.+)/$',  DateDetailView.as_view(**info), name='blog-post'),
)
Exemplo n.º 40
0
     view=add_grid_package,
     name='add_grid_package',
 ),
 url(
     regex='^(?P<grid_slug>[a-z0-9\-\_]+)/package/add/new$',
     view=add_new_grid_package,
     name='add_new_grid_package',
 ),
 url(
     regex='^ajax_grid_list/$',
     view=ajax_grid_list,
     name='ajax_grid_list',
 ),
 url(
     regex=r"^latest/$",
     view=ArchiveIndexView.as_view(queryset=Grid.objects.select_related(),
                                   date_field='created'),
     name="latest_grids",
 ),
 url(
     regex='^$',
     view=grids,
     name='grids',
 ),
 url(
     regex=
     '^g/(?P<slug>[-\w]+)/(?P<feature_id>\d+)/(?P<bogus_slug>[-\w]+)/$',
     view=grid_detail_feature,
     name='grid_detail_feature',
 ),
 url(
     regex='^g/(?P<slug>[-\w]+)/$',
Exemplo n.º 41
0
#- events - crud - get          ------------------------------------------------
    #test ok
    path('crud/<int:pk>/',
         EventsCRUD.as_view(),
         name="eventi-CRUD-functions"),

    path('crud/s/<slug:slug>/',
         EventsCRUDslug.as_view(),
         name="eventi-CRUD-functions-slug"),


#- events - crud - get          ------------------------------------------------

    path("archive/list/",
         ArchiveIndexView.as_view(model=Evento, date_field="created_at"),
         name="event_archive"),

    path("archive/count/",
         eV.EventoListCountYearsAPIView,
         name="event_archive_count"),

#        test ok
#    path('archive/<int:year>/',
#         eV.EventoYearArchiveView.as_view(),
#         name="evento_year_archive"),

    path("archive/<int:year>/",
         eV.EventoListYearAPIView.as_view(),
         name="evento_year_archive"),
Exemplo n.º 42
0
from django.views.generic.dates import ArchiveIndexView

from django.contrib import admin
admin.autodiscover()

from blog.models import Artigo
from blog.feeds import UltimosArtigos

urlpatterns = patterns(
    '',
    # Examples:
    # url(r'^$', 'meu_blog.views.home', name='home'),
    # url(r'^blog/', include('blog.urls')),
    (r'^$',
     ArchiveIndexView.as_view(**{
         'queryset': Artigo.objects.all(),
         'date_field': 'publicacao'
     })),
    url(r'^admin/', include(admin.site.urls)),
    (r'^rss/ultimos/$', UltimosArtigos()),
    (r'^artigo/(?P<slug>[\w_-]+)/$', 'meu_blog.blog.views.artigo'),
    (r'^media/(.*)$', 'django.views.static.serve', {
        'document_root': settings.MEDIA_ROOT
    }),
    (r'^contato/$', 'views.contato'),
    (r'^comments/', include('django_comments.urls')),
    (r'^galeria/', include('galeria.urls')),
    (r'^contas/', include('contas.urls')),
    (r'^entrar/$', 'django.contrib.auth.views.login', {
        'template_name': 'entrar.html'
    }, 'entrar'),
    (r'^sair/$', 'django.contrib.auth.views.logout', {
Exemplo n.º 43
0

feeds = {
    'latest': LatestEntries,
    'tags': LatestEntriesByTag,
    'tag': LatestEntriesByTag
}

urlpatterns = patterns('blog.views',
    (r'^recent_entries/(?P<page_num>\d+)/$', 'get_recent_entries'),
    (r'^more_entries/(?P<page_num>\d+)/$', 'get_more_entries'),
)

urlpatterns += patterns('',
    (r'^1.0/$', ArchiveIndexView.as_view(
        queryset=Entry.published_objects.all().select_related(),
        date_field='created',
        paginate_by=5)),
    (r'^1.0/(?P<year>\d{4})/(?P<month>\d{2})/$', EntryMonthArchiveView.as_view()),
)

urlpatterns += patterns('',
                        (r'^feeds/latest/$',
                         'blog.apis.feeds_latest_redirect',
                         ),
                        url(r'^feeds/tag(|s)/(?P<tag>.*)/$', LatestEntriesByTag()),
                        url(r'^feeds_ad/(?P<tag>.*)/$', LatestEntries()),
)

urlpatterns += patterns('blog.apis',
                        (r'^api/(?P<year>\d{4})/(?P<month>\d{2})/(?P<day>\d{2})/(?P<slug>.*)/entry.json$',
                         'entry_json_from_slug'),
Exemplo n.º 44
0
    url(
        regex = '^(?P<grid_slug>[a-z0-9\-\_]+)/package/add/new$',
        view    = add_new_grid_package,
        name    = 'add_new_grid_package',
    ),

    url(
        regex = '^ajax_grid_list/$',
        view    = ajax_grid_list,
        name    = 'ajax_grid_list',
    ),    

    url(
        regex   = r"^latest/$",
        view    = ArchiveIndexView.as_view(
                    queryset=Grid.objects.select_related(),
                    date_field='created'
        ),
        name    = "latest_grids",
    ),

    url(
        regex = '^$',
        view    = grids,
        name    = 'grids',
    ),    
    
    url(
        regex = '^g/(?P<slug>[-\w]+)/(?P<feature_id>\d+)/(?P<bogus_slug>[-\w]+)/$',
        view    = grid_detail_feature,
        name    = 'grid_detail_feature',
    ),
Exemplo n.º 45
0
from django.urls import path
from . import views
from users import views as user_views
from django.contrib.auth import views as auth_views
from django.conf import settings
from django.conf.urls.static import static
from .views import PostListView, PostDetailView, PostCreateView, PostUpdateView, PostDeleteView,about, BlogAPI
from django.views.generic.dates import ArchiveIndexView, YearArchiveView
from .models import Post


urlpatterns = [
        path('',views.index,name = 'index'),
        path('business/',PostListView.as_view(), name = 'business'),
        path('register/',user_views.register, name = 'register'),
        path('login/',auth_views.LoginView.as_view(template_name='users/login.html'),name='login'),
        path('logout/',auth_views.LogoutView.as_view(template_name='users/logout.html'),name='logout'),
        path('profile/',user_views.profile,name='profile'),
        path('post/<int:pk>/', PostDetailView.as_view(), name = 'post-detail'),
        path('post/new/',PostCreateView.as_view(),name='post-create'),
        path('post/<int:pk>/update/',PostUpdateView.as_view(),name='post-update'),
        path('post/<int:pk>/delete/',PostDeleteView.as_view(),name='post-delete'),
        path('post/archive/',ArchiveIndexView.as_view(model = Post, date_field = "date_posted"), name = 'post_archive'),
        path('post/yeararchive/<int:year>/',YearArchiveView.as_view(queryset = Post.objects.all(), date_field = "date_posted",
              make_object_list = True, allow_future = True),name='post-year'),
        path('about/',about,name='about'),
	path('blogapi/',BlogAPI.as_view(), name = 'BlogAPI')
]
if settings.DEBUG:
    urlpatterns += static('media/',document_root=settings.MEDIA_ROOT)
Exemplo n.º 46
0
from django.conf.urls import url

from . import views
from polls.views import MyView , AboutView , ArticleYearArchiveView
from django.views.generic.dates import ArchiveIndexView
from polls.models import Article

urlpatterns = [
    url(r'^mine/$', MyView.as_view()),
    url(r'^about/$', AboutView.as_view()),
	url(r'^archive/$',ArchiveIndexView.as_view(model=Article, date_field="pub_date"), name="article_archive"),
	url(r'^(?P<year>[0-9]{4})/$', ArticleYearArchiveView.as_view(), name="article_year_archive"),
]
Exemplo n.º 47
0
    'queryset': Entry.live.all(),
    'date_field': 'pub_date',
    'paginate_by': 10,
}
entry_info_month = dict(entry_info, month_format='%m')

entry_info_year = entry_info.copy()
del entry_info_year['paginate_by']

category_info = {
    'queryset': Category.objects.all(),
}


urlpatterns = patterns('',
    url(r'^$', ArchiveIndexView.as_view(**entry_info), name='blog_entry_index'),
    url(r'^(?P<year>\d{4})/$',
        YearArchiveView.as_view(**entry_info_year),
        name='blog_entry_archive_year'),
    url(r'^(?P<year>\d{4})/(?P<month>\w{1,2})/$',
        MonthArchiveView.as_view(**entry_info_month),
        name = 'blog_entry_archive_month'),
    url(r'^(?P<year>\d{4})/(?P<month>\w{1,2})/(?P<day>\w{1,2})/$',
        DayArchiveView.as_view(**entry_info_month),
        name='blog_entry_archive_day'),

    url(r'^(?P<year>\d{4})/(?P<month>\w{1,2})/(?P<day>\w{1,2})/(?P<slug>[-\w]+)/$',
        EnhancedDateDetailView.as_view(),
        name='blog_entry_detail'),

    url(r'^category/(?P<slug>[-\w]+)/$',
Exemplo n.º 48
0
from django.conf.urls import patterns, url
from django.views.generic import ListView, DetailView
from django.views.generic.dates import ArchiveIndexView
from apps.podcast.models import Episode, Contributor
from apps.podcast.views import canonical_redirect, PodcastFeed

urlpatterns = patterns('',
    url(r'^$', ArchiveIndexView.as_view(model=Episode, date_field="pub_date",
                                        queryset=Episode.objects.filter(status=2))),
    url(r'^contributors/$', ListView.as_view(
            queryset=Contributor.objects.select_related()
    )),
    url(r'^contributors/(?P<slug>[\w-]+)/*$', DetailView.as_view(model=Contributor), name='ContributorDetail'),
    url(r'feed/$', PodcastFeed),
    url(r'^(?P<episode_number>\w+)/$', canonical_redirect),
    url(r'^episode/(?P<slug>[\w-]+)/*$', DetailView.as_view(model=Episode), name='EpisodeDetail'),
)
Exemplo n.º 49
0
from django.conf.urls.defaults import *
from django.views.generic.dates import ArchiveIndexView, YearArchiveView, MonthArchiveView, DayArchiveView, DateDetailView
from coltrane.models import Entry


entry_info_dict = {
    'model': Entry,
    'queryset': Entry.live.all(),
    'date_field': 'pub_date',
}

# Views for Entry Model
urlpatterns = patterns('',
    url(r'^$', ArchiveIndexView.as_view(**entry_info_dict), name='coltrane_entry_archive_index'),
    url(r'^(?P<year>\d{4})/$', YearArchiveView.as_view(make_object_list = True, allow_future = True, **entry_info_dict), name='coltrane_entry_archive_year'),
    url(r'^(?P<year>\d{4})/(?P<month>\w{3})/$', MonthArchiveView.as_view(**entry_info_dict), name='coltrane_entry_archive_month'),
    url(r'^(?P<year>\d{4})/(?P<month>\w{3})/(?P<day>\d{2})/$', DayArchiveView.as_view(**entry_info_dict), name='coltrane_entry_archive_day'),
    url(r'^(?P<year>\d{4})/(?P<month>\w{3})/(?P<day>\d{2})/(?P<slug>[-\w]+)/$', DateDetailView.as_view(**entry_info_dict), name='coltrane_entry_detail'),
)
Exemplo n.º 50
0
                            edit_documentation
                            )

urlpatterns = patterns("",

    url(
        regex=r"^$",
        view=package_list,
        name="packages",
    ),

    url(
        regex=r"^latest/$",
        view=ArchiveIndexView.as_view(
                        queryset=Package.objects.filter().select_related(),
                        paginate_by=50,
                        date_field="created"
        ),
        name="latest_packages",
    ),
    url(
        regex="^add/$",
        view=add_package,
        name="add_package",
    ),

    url(
        regex="^(?P<slug>[-\w]+)/edit/$",
        view=edit_package,
        name="edit_package",
    ),
Exemplo n.º 51
0
from wolf.views import category_detail

entry_info_dict = {
    'queryset': Entry.objects.all(),
    'date_field': 'pub_date',
}
link_info_dict = {
    'queryset': Link.objects.all(),
    'date_field': 'pub_date',
}

urlpatterns = [
    url(r'^admin/', admin.site.urls),
    url(r'^search/$', search),
    url(r'^weblog/$',
        ArchiveIndexView.as_view(model=Entry, date_field="pub_date")),
    url(r'^weblog/(?P<year>\d{4})/$',
        YearArchiveView.as_view(model=Entry, date_field="pub_date")),
    url(r'^weblog/(?P<year>\d{4})/(?P<month>\w{3})/$',
        MonthArchiveView.as_view(model=Entry, date_field="pub_date")),
    url(r'^weblog/(?P<year>\d{4})/(?P<month>\w{3})/(?P<day>\d{2})/$',
        DayArchiveView.as_view(model=Entry, date_field="pub_date")),
    url(
        r'^weblog/(?P<year>\d{4})/(?P<month>\w{3})/(?P<day>\d{2})/(?P<slug>[-\w]+)/$',
        DateDetailView.as_view(model=Entry, date_field="pub_date")),
    url(r'^weblog/$',
        ArchiveIndexView.as_view(model=Link, date_field="pub_date")),
    url(r'^weblog/(?P<year>\d{4})/$',
        YearArchiveView.as_view(model=Link, date_field="pub_date")),
    url(r'^weblog/(?P<year>\d{4})/(?P<month>\w{3})/$',
        MonthArchiveView.as_view(model=Link, date_field="pub_date")),
Exemplo n.º 52
0
from django.conf.urls import *
from django.views.generic.dates import ArchiveIndexView, YearArchiveView, MonthArchiveView, DayArchiveView, DateDetailView
from jraywo.models import Entry

urlpatterns = patterns('',
    url(r'^$', ArchiveIndexView.as_view( queryset = Entry.live.all(),
                                         date_field = 'pub_date',
                                         allow_empty = True,
                                         paginate_by = 5,
                                        ), name='jraywo_entry_archive_index'), 
    url(r'^(?P<year>\d{4})/$', YearArchiveView.as_view(queryset = Entry.live.all(),
                                                       date_field='pub_date',
                                                       allow_empty = True,
                                                       make_object_list=True), name='jraywo_entry_archive_year'), 
    url(r'^(?P<year>\d{4})/(?P<month>\w{3})/$', MonthArchiveView.as_view(queryset = Entry.live.all(),
                                                                         date_field = 'pub_date',
                                                                         allow_empty = True,
                                                                         paginate_by = 5,
                                                                         ), name='jraywo_entry_archive_month'), 
    url(r'^(?P<year>\d{4})/(?P<month>\w{3})/(?P<day>\d{2})/$', DayArchiveView.as_view(queryset = Entry.live.all(),
                                                                                      date_field = 'pub_date',
                                                                                      allow_empty = True,
                                                                                       paginate_by = 5,
                                                                                      ), name='jraywo_entry_archive_day'), 
    url(r'^(?P<year>\d{4})/(?P<month>\w{3})/(?P<day>\d{2})/(?P<slug>[-\w]+)/$', DateDetailView.as_view(queryset = Entry.live.all(),
                                                                                                       date_field = 'pub_date',
                                                                                                       ), name='jraywo_entry_detail'),
        
)
Exemplo n.º 53
0
urlpatterns = [
    path('', AnnouncementMonthView.as_view(), name="show_announcements"),
    path('events/', EventMonthView.as_view(), name="show_events"),
    path('events/registration/edit/<int:pk>',
         EventRegistrationView.as_view(),
         name='event_registration_update'),
    path('events/registration/add/<int:pk>',
         event_add_attendance,
         name='event_registration_create'),
    path('list/',
         ListView.as_view(model=Announcement),
         name='announcement_list'),
    path('archive/',
         ArchiveIndexView.as_view(model=Announcement,
                                  date_field="announcement_date",
                                  allow_future=True),
         name="announcement_archive"),

    # NEEDS TO BE FIXED!!!!

    # Example: /2012/08/
    path('<int:year>/<int:month>/',
         AnnouncementMonthView.as_view(month_format='%m'),
         name="announcement_month_numeric"),
    # Example: /2012/aug/
    path('<int:year>/<str:month>/',
         AnnouncementMonthView.as_view(),
         name="announcement_month"),

    # Example: /2012/08/
Exemplo n.º 54
0
                            package_detail,
                            post_data
                            )

urlpatterns = patterns("",

    url(
        regex   = r"^$",
        view    = package_list,
        name    = "packages",
    ),

    url(
        regex   = r"^latest/$",
        view    = ArchiveIndexView.as_view(
                        queryset=Package.objects.select_related(),
                        date_field="created"
        ),
        name    = "latest_packages",
    ),
    url(
        regex   = "^add/$",
        view    = add_package,
        name    = "add_package",
    ),

    url(
        regex = "^(?P<slug>[-\w]+)/edit/$",
        view    = edit_package,
        name    = "edit_package",
    ),
Exemplo n.º 55
0
from django.views.generic.dates import ArchiveIndexView
from .models import Book

urlpatterns = [
    url(r'^$', views.hello),

    url(r'^author_list/$',views.author_list,name='author_list'),
    url(r'^store_list/$',views.store_list,name='store_list'),
    url(r'^book_list/$',views.book_list,name='book_list'),
    url(r'^tag/(?P<tag_slug>[-\w]+)/$',views.book_list,name='book_list_by_tag'),
    # url(r'^book_list/$',views.book_list2,name='book_list'),
    #url(r'^publisher_list/$',views.publisher_list),
    url(r'^book_list/(?P<year>\d+)/$',views.BookListByYear,name='book_year_list'),
    # url(r'^book/(?P<id>\d+)/$',views.book_datail,name='book_detail'),
    url(r'^addcomment/(?P<id>\d+)/$',views.add_comment,name='add_comment'),
    url(r'^author/(?P<id>\d+)/$',views.author_datail,name='author_detail'),
    # url(r'^post/(?P<pk>[0-9]+)/$',views.PostDetailView.as_view(), name='detail'),
    url(r'^book/(?P<pk>[0-9]+)/$',views.BookDetailView.as_view(),name='book_detail'), #基于类的视图 Detail View
    url(r'^testrating/$',views.BookDetailView.as_view(),name='rating_test'),
    url(r'^search/(?P<s_type>\d+)/(?P<keyword>\w+)/$',views.search,name='search'),
    url(r'^share/(?P<id>\d+)/$',views.share_email,name='share'),
    url(r'^archive/$',ArchiveIndexView.as_view(model=Book,date_field="pubdate"),name='book_archive'),#基于类的视图 ArchiveIndexView
    url(r'^archive/(?P<year>[0-9]{4})/$',views.BookYearArchiveView.as_view(),name='book_year_archive'), #基于类的视图 YearArchiveView
    url(r'^archive/(?P<year>[0-9]{4})/(?P<month>[0-9]+)/$',views.BookMonthArchiveView.as_view(month_format='%m'),name='book_month_numeric'),#基于类的视图MonthArchiveView
    url(r'^archive/(?P<year>[0-9]{4})/(?P<month>[-\w]+)/$',views.BookMonthArchiveView.as_view(),name='book_month_archive'),#基于类的视图MonthArchiveView

    # url(r'^book_list/$',views.BookListView.as_view(),name='book_list'),
    # url(r'^author_list/$',views.AuthorListView.as_view(),name='author_list'),
    url(r'^publisher_list/$',views.PublisherListView.as_view(),name='publisher_list'),
]
Exemplo n.º 56
0
from django.conf.urls.defaults import patterns, url
from django.views.generic.dates import ArchiveIndexView, YearArchiveView, MonthArchiveView, DayArchiveView, DateDetailView

from jarrett.models import Resumen

urlpatterns = patterns(
    '',
    url(r'^$',
        ArchiveIndexView.as_view(date_field='fecha_publicacion',
                                 paginate_by=15,
                                 allow_empty=True,
                                 queryset=Resumen.live.all()),
        name='resumen_archivo'),
    url(r'^(?P<year>\d{4})/$',
        YearArchiveView.as_view(date_field='fecha_publicacion',
                                paginate_by=15,
                                allow_empty=True,
                                queryset=Resumen.live.all()),
        name='resumen_year'),
    url(r'^(?P<year>\d{4})/(?P<month>\d{2})/$',
        MonthArchiveView.as_view(date_field='fecha_publicacion',
                                 month_format='%m',
                                 paginate_by=15,
                                 allow_empty=True,
                                 queryset=Resumen.live.all()),
        name='resumen_mes'),
    url(r'^(?P<year>\d{4})/(?P<month>\d{2})/(?P<day>\d{2})/$',
        DayArchiveView.as_view(date_field='fecha_publicacion',
                               month_format='%m',
                               paginate_by=15,
                               allow_empty=True,
Exemplo n.º 57
0
from django.conf.urls import url
from django.views.generic.dates import (ArchiveIndexView, YearArchiveView,
                                        MonthArchiveView)

from .models import Picture
from .views import (GalleryListView, GalleryDetailView, PicturesListView,
                    PictureDetailView, PictureUploadView)

urlpatterns = [
    url(r'^$', GalleryListView.as_view(), name='gallery-list'),
    url(r'^gallery/(?P<pk>\d+)$', GalleryDetailView.as_view(),
        name='gallery-detail'),
    url(r'^pics$', PicturesListView.as_view(), name='pictures-list'),
    url(r'^pic/(?P<pk>\d+)$', PictureDetailView.as_view(),
        name='picture-detail'),
    url(r'^pic/new$', PictureUploadView.as_view(), name='picture-upload'),

    # Archive views for pictures
    url(r'^archive/$', ArchiveIndexView.as_view(model=Picture,
                                                date_field='date'),
        name='pictures-archive-index'),
    url(r'^archive/(?P<year>[0-9]{4})/',
        YearArchiveView.as_view(model=Picture, date_field='date'),
        name='pictures-archive-year'),
    url(r'^archive/(?P<year>[0-9]{4})/(?P<month>[0-9]+)/',
        MonthArchiveView.as_view(model=Picture, date_field='date',
                                 month_format='%m'))
]
Exemplo n.º 58
0
Arquivo: urls.py Projeto: feefk/ddtcms
         queryset            = Category.objects.all(),
         context_object_name = 'latest_blog_list',
         paginate_by         = 3
     ),
     name='category_list'),
 
 url(r'^category/(?P<slug>[-\w]+)/$',          
     DetailView.as_view(
         model               = Category,
         context_object_name = 'category',
     ),
     name='category_detail'),
     
 url(r'^archive/$',                     
     ArchiveIndexView.as_view(
         queryset            = Blog.objects.all(),
         date_field          = 'pub_date',
     ),
     name='blog_archive_index'),
     
 url(r'^archive/(?P<year>\d{4})/$',
     YearArchiveView.as_view(
         queryset            = Blog.objects.all(),
         date_field          = 'pub_date',
     ),
     name='blog_archive_index_year'),
 
 
 url(r'^archive/(?P<year>\d{4})/(?P<month>\d{2})/$',
     MonthArchiveView.as_view(
         queryset            = Blog.objects.all(),
         date_field          = 'pub_date',
Exemplo n.º 59
0
urlpatterns = [
    path('', InvoiceListView.as_view(), name='invoice-list'),
    #path('', views.seva, name='seva-kitchen'),
    #path('poster/', views.seva_poster, name='seva-poster'),
    #path('tiffin/', views.seva_tiffin, name='seva-tiffin'),
    #path('pitara/', views.seva_pitara, name='seva-pitara'),
    #path('food/', views.seva_food, name='seva-food'),
    #path('news/', views.seva_news, name='seva-news'),
    #path('jars/', views.seva_jars, name='seva-jars'),
    path('signup/', views.SignUp.as_view(), name='signup'),
    path('<int:pk>', InvoiceDetailView.as_view(), name='invoice-detail'),
    path('create/', InvoiceCreateView.as_view(), name='invoice-create'),
    path('<int:pk>/edit/', InvoiceEdit.as_view(), name='invoice-update'),
    path('<int:pk>/delete/', InvoiceDelete.as_view(), name='invoice-delete'),
    path('archive/',
         ArchiveIndexView.as_view(model=Invoice, date_field='invoice_date'),
         name='invoice-archive'),
    # Example: /2012/08/
    path('<int:year>/<int:month>/',
         InvoiceMonthArchiveView.as_view(month_format='%m'),
         name="archive_month_numeric"),
    # Example: /2012/aug/
    path('<int:year>/<str:month>/',
         InvoiceMonthArchiveView.as_view(),
         name="archive_month"),
    path('invoicee/<str:r_name>/', views.RecipientView, name='recipient'),
    path('client/<str:c_name>/', views.ListbyClient, name='client'),
    path('vendor/<str:v_name>/', views.ListbyVendor, name='vendor'),
    path('dummy/<int:pk>', dummy, name='dummy'),
    path('render/pdf/<int:pk>', views.GeneratePdf.as_view(), name='pdf_print'),
]