~mikhail-sayapin/+junk/salaryman

« back to all changes in this revision

Viewing changes to main/views.py

  • Committer: Mikhail Sayapin
  • Date: 2008-02-07 16:45:53 UTC
  • Revision ID: mikhail.sayapin@gmail.com-20080207164553-f4w51wl2t9z9acum
Month.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
# -*- encoding: utf-8 -*-
2
2
 
3
3
from mako_django import render_to_response
4
 
from salaryman.main.alchemy import Component, Employee, MonthlyReceipt, Occupation
 
4
from salaryman.main.alchemy import Component, Employee, MonthlyReceipt, Occupation, Norm
5
5
from sqlalchemy.orm import eagerload
6
6
 
7
7
################################################################################
34
34
def edit_occupation(request):
35
35
        occupation = request.sa.query(Occupation).filter(Occupation.id == request.REQUEST['id']).one()
36
36
        components = request.sa.query(Component).order_by('name')
 
37
        norms = request.sa.query(Norm).order_by('name')
37
38
        return render_to_response('main/edit_occupation.html', {
38
39
                'occupation': occupation,
39
40
                'components': components,
 
41
                'norms': norms,
40
42
        })
41
43
 
42
44
################################################################################