Beispiel #1
0
from django.conf.urls.defaults import *
from ddtcms.home.views import common_dict
from ddtcms.blog.models import Blog
from ddtcms.blog.models import Category

common_dict.update({
    'app_label': 'blog',
    'latest_Blog_list': Blog.objects.all()[:5],
    'category_list': Category.objects.all(),
})

blog_dict = {
    'queryset': Blog.objects.all(),
    'extra_context': common_dict,
}

category_dict = {
    'queryset': Category.objects.all(),
    'extra_context': common_dict,
}

pages_dict = {
    'queryset': Blog.objects.all(),
    'paginate_by': 3,
}

archive_dict = {}
archive_dict.update(blog_dict)
archive_dict.update({
    'date_field': 'pub_date',
})
Beispiel #2
0
from django.conf.urls.defaults import *
from ddtcms.home.views import common_dict
from ddtcms.member.models import Profile, Resume

common_dict.update({
    'app_label': 'member',
})

member_dict = {
    'queryset': Profile.objects.all(),
    'extra_context': common_dict,
    'template_name': 'member/index.html',
}

pages_dict = {
    'queryset': Profile.objects.all(),
    'extra_context': common_dict,
    'paginate_by': 1,
}

urlpatterns = patterns(
    '',
    (r'^$', 'django.views.generic.list_detail.object_list', member_dict),
)
Beispiel #3
0
from django.conf.urls.defaults import *
from ddtcms.home.views import common_dict
from ddtcms.member.models import Profile,Resume

common_dict.update({'app_label':'member',    })
    
    
member_dict = {
'queryset': Profile.objects.all(),
'extra_context':common_dict,
'template_name':'member/index.html',
}


pages_dict = {
'queryset': Profile.objects.all(),
'extra_context':common_dict,
'paginate_by':1,
}


urlpatterns = patterns('',
    (r'^$',                            'django.views.generic.list_detail.object_list', member_dict),


)
Beispiel #4
0
from django.conf.urls.defaults import *
from ddtcms.home.views import common_dict
from ddtcms.todo.models import Project

common_dict.update({'app_label':'blog',    })

    
    
    
    
todo_dict = {
'queryset': Project.objects.all().filter(type__exact=0),
'extra_context':common_dict,
}
todo_dict.update({'date_field': 'pub_date',})

pages_dict = {
'queryset': Project.objects.all(),
'extra_context':common_dict,
'paginate_by':1,
}


urlpatterns = patterns('',
    #url(r'^$','todo.views.index',name='todo'),
    #(r'^$',                   'django.views.generic.date_based.archive_index', todo_dict),
    url(r'^$',             'todo.views.index',name='todo-index'),
    url(r'^manage/$',             'todo.views.manage',name='todo-manage'),
    (r'^(?P<object_id>\d+)/$',      'django.views.generic.list_detail.object_detail', dict(queryset=Project.objects.all())),
    (r'^(?P<slug>[-\w]+)/$',   'django.views.generic.list_detail.object_detail', dict(queryset=Project.objects.all(),slug_field='slug')),
    (r'^task/add/',            'todo.views.task_add'),
Beispiel #5
0
from django.conf.urls.defaults import *
from ddtcms.home.views import common_dict
from ddtcms.blog.models import Blog
from ddtcms.blog.models import Category

common_dict.update({'app_label':'blog',
    'latest_Blog_list':Blog.objects.all()[:5],
    'category_list'  : Category.objects.all(),
        
    })

    
    
    
    
blog_dict = {
'queryset': Blog.objects.all(),
'extra_context':common_dict,
}



category_dict = {
'queryset': Category.objects.all(),
'extra_context':common_dict,
}