Source

Test / students_crud / urls.py

# -*- coding: utf-8 -*-
from django.conf.urls import patterns, include, url
from django.views.generic import DetailView, ListView

from students_crud.models import Group

urlpatterns = patterns('',
    url(r'^$',
        ListView.as_view(
            queryset=Group.objects.all(),
            context_object_name='group_list',
            template_name='index.html')),
    url(r'^(?P<pk>\d+)/$',
        DetailView.as_view(
            model=Group,
            template_name='detail.html')),
    url(r'^edit/$', 'students_crud.views.edit_groups'),
    url(r'(?P<group_id>\d+)/edit/', 'students_crud.views.edit_group'),
    url(r'(?P<group_id>\d+)/(?P<st_id>\d+)/', 
        'students_crud.views.edit_student'),

)