diff options
| author | Étienne Loks <etienne.loks@peacefrogs.net> | 2011-06-10 21:13:58 +0200 |
|---|---|---|
| committer | Étienne Loks <etienne.loks@peacefrogs.net> | 2011-06-10 21:13:58 +0200 |
| commit | 55296f31186e411094fee42c0d559cbb354fff7c (patch) | |
| tree | b6b75f7912a63377d527370b781749c76e0e9d40 /ishtar/furnitures/views.py | |
| parent | 409a148f0a1d2c9b90ae2c2dc06dc71f99d4f236 (diff) | |
| download | Ishtar-55296f31186e411094fee42c0d559cbb354fff7c.tar.bz2 Ishtar-55296f31186e411094fee42c0d559cbb354fff7c.zip | |
"+" buttons to simplify the adding of items when necessary (closes #428)
Diffstat (limited to 'ishtar/furnitures/views.py')
| -rw-r--r-- | ishtar/furnitures/views.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ishtar/furnitures/views.py b/ishtar/furnitures/views.py index 40e9aeaf0..1bdca3442 100644 --- a/ishtar/furnitures/views.py +++ b/ishtar/furnitures/views.py @@ -511,7 +511,7 @@ def new_item(model): not_permitted_msg = ugettext(u"Operation not permitted.") return HttpResponse(not_permitted_msg) frm = getattr(ishtar_forms, model_name + 'Form') - dct = {'title':unicode(_(u'New ')) + unicode(_(model_name.lower()))} + dct = {'title':unicode(_(u'New %s' % model_name.lower()))} if request.method == 'POST': dct['form'] = frm(request.POST) if dct['form'].is_valid(): @@ -523,6 +523,7 @@ def new_item(model): if '_select_' in dct['parent_pk']: parents = dct['parent_pk'].split('_') dct['parent_pk'] = "_".join([parents[0]] + parents[2:]) + print dct return render_to_response('window.html', dct, context_instance=RequestContext(request)) else: @@ -532,6 +533,8 @@ def new_item(model): return func new_warehouse = new_item(models.Warehouse) +new_person = new_item(models.Person) +new_organization = new_item(models.Organization) def action(request, action_slug, obj_id=None, *args, **kwargs): """ |
