示例#1
0
文件: views.py 项目: ianmccon/schools
def coursemember_create(request, course_id):
    course = get_object_or_404(Course, pk=course_id)
    form_class = CourseMemberCreateForm#PreProcessForm(CourseMemberCreateForm, lambda form:form.limit_to_course(course))
    return create_object(request, model=CourseMember, form_class=form_class,
                         template_name='courses/coursemember_create.html',
                         extra_context={'course':course}, initial={'course':course.pk},
                         preprocess_form=lambda form:form.limit_to_course(course))
示例#2
0
文件: views.py 项目: ianmccon/schools
def expensegroup_create(request, course_id):
    course = get_object_or_404(Course, pk=course_id)
    return create_object(request, model=ExpenseGroup, form_class=ExpenseGroupForm, template_name='courses/expensegroup_create.html', extra_context={'course':course}, initial={'course':course.pk})
示例#3
0
文件: views.py 项目: ianmccon/schools
def course_create(*args, **kwargs):
    return create_object(*args, **kwargs)
示例#4
0
def building_create(*args, **kwargs):
    return create_object(*args, **kwargs)
示例#5
0
def lector_create(*args, **kwargs):
    return create_object(*args, **kwargs)
示例#6
0
def lector_contract_create(request, lector_id):
    lector = get_object_or_404(Lector, pk=lector_id)
    return create_object(request, model=Contract, form_class=ContractForm, initial={'lector':lector.pk}, inlines=LECTOR_INLINES, extra_context={'lector':lector})
示例#7
0
def student_create(*args, **kwargs):
    return create_object(*args, **kwargs)
示例#8
0
def company_create(*args, **kwargs):
    return create_object(*args, **kwargs)