Changeset 21360c8 for remit/urls.py


Ignore:
Timestamp:
Jun 15, 2014, 9:42:51 PM (12 years ago)
Author:
Alex Dehnert <adehnert@…>
Branches:
master
Children:
2e4e1fb
Parents:
f298bd7
git-author:
Alex Dehnert <adehnert@…> (06/15/14 17:59:25)
git-committer:
Alex Dehnert <adehnert@…> (06/15/14 21:42:51)
Message:

Django 1.6: Switch to class-based ListView?

Dango 1.5(?) removed function-based generic views, so we need to switch to the
class-based ones.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • remit/urls.py

    rff623c3 r21360c8  
    66# Necessary views
    77import finance_core.views
     8from util.shortcuts import TemplateViewWithContext
    89
    910# Uncomment the next two lines to enable the admin:
    … …  
    1314urlpatterns = patterns('',
    1415    # Example:
    15     (r'^$', 'django.views.generic.simple.direct_to_template', {'template': 'index.html', 'extra_context': { 'pagename':'homepage' }, }, 'homepage'),
     16    url(r'^$', TemplateViewWithContext.as_view(template_name='index.html', extra_context={ 'pagename':'homepage' }), name='homepage'),
    1617    (r'^vouchers/', include('vouchers.urls')),
    1718    (r'^finance_core/', include('finance_core.urls')),
Note: See TracChangeset for help on using the changeset viewer.