comment all prints

remotes/origin/yandex
Bachurin Sergey 11 years ago
parent 75ae47b16d
commit e8581b924a
  1. 2
      project/customer/context_processors.py
  2. 3
      project/customer/middleware.py
  3. 1
      project/customer/views/profile.py
  4. 15
      project/docs/as_xls/render_to_xls.py

@ -37,5 +37,5 @@ def license_check_soon_ends(request):
'cur_license': cur_license, 'cur_license': cur_license,
} }
except Exception as e: except Exception as e:
print e # print e
return { } return { }

@ -23,4 +23,5 @@ class ProfileMiddleware(object):
django_logout(request) django_logout(request)
messages.add_message(request, messages.ERROR, u'Другой пользователь вошёл под этим логином.') messages.add_message(request, messages.ERROR, u'Другой пользователь вошёл под этим логином.')
except: except:
print 'no user profile' # print 'no user profile'
pass

@ -95,7 +95,6 @@ def profile_edit(request):
if form.cleaned_data[img_url]: if form.cleaned_data[img_url]:
chg_file = open(settings.MEDIA_ROOT + '/cache/imgs/' + \ chg_file = open(settings.MEDIA_ROOT + '/cache/imgs/' + \
form.cleaned_data[img_url]) form.cleaned_data[img_url])
print chg_file
item_attr = img_url[4:] item_attr = img_url[4:]
getattr(item, item_attr).save('%s.%s' % \ getattr(item, item_attr).save('%s.%s' % \
(item_attr, form.cleaned_data[img_url].split('.')[-1]), (item_attr, form.cleaned_data[img_url].split('.')[-1]),

@ -171,7 +171,8 @@ def fill_xls(request, dictionary, src_sheet, dst_sheet, style_list, xls_settings
if DEBUG: if DEBUG:
raise raise
else: else:
print "Error inserting image from file '%s'" % new_value # print "Error inserting image from file '%s'" % new_value
raise
write( write(
row = row + dst_row_shift, row = row + dst_row_shift,
col = col + dst_col_shift, col = col + dst_col_shift,
@ -210,8 +211,8 @@ def fill_xls(request, dictionary, src_sheet, dst_sheet, style_list, xls_settings
# может быть 0, если команда @@FIX_HEIGHT@@ задана в простой (не объединенной) ячейке # может быть 0, если команда @@FIX_HEIGHT@@ задана в простой (не объединенной) ячейке
if width_in_chars == 0: if width_in_chars == 0:
print ('WARNING. xls generation, cmd @@FIX_HEIGHT@@. ' # print ('WARNING. xls generation, cmd @@FIX_HEIGHT@@. '
'variable `width_in_chars` = %s. skip this command.' % width_in_chars) # 'variable `width_in_chars` = %s. skip this command.' % width_in_chars)
continue continue
# сколько строк под текст # сколько строк под текст
@ -248,7 +249,7 @@ def fill_xls(request, dictionary, src_sheet, dst_sheet, style_list, xls_settings
# адъ констант! # адъ констант!
p = get_all_these_boring_params(src_sheet, xls_settings) p = get_all_these_boring_params(src_sheet, xls_settings)
if not p: if not p:
print 'Please set ALL required settings!' # print 'Please set ALL required settings!'
return return
# --- !!! ------ вывести начало документа включительно по шапку табл. части # --- !!! ------ вывести начало документа включительно по шапку табл. части
@ -467,7 +468,7 @@ def get_all_these_boring_params(src_sheet, xls_settings):
# высота в twips # высота в twips
p.TBL_BODY_HEIGHT = sum_src_heights(src_sheet, p.TBL_BODY_ROW, p.TBL_BODY_ROW) p.TBL_BODY_HEIGHT = sum_src_heights(src_sheet, p.TBL_BODY_ROW, p.TBL_BODY_ROW)
else: else:
print u'Error! TBL_BODY_ROW not set!' # print u'Error! TBL_BODY_ROW not set!'
return None return None
# шапка таблицы - обязательно # шапка таблицы - обязательно
@ -482,7 +483,7 @@ def get_all_these_boring_params(src_sheet, xls_settings):
# высота в twips # высота в twips
p.TBL_HEADER_HEIGHT = sum_src_heights(src_sheet, p.TBL_HEADER_FROM, p.TBL_HEADER_TO) p.TBL_HEADER_HEIGHT = sum_src_heights(src_sheet, p.TBL_HEADER_FROM, p.TBL_HEADER_TO)
else: else:
print u'Error! Either TBL_HEADER_FROM or TBL_HEADER_TO not set!' # print u'Error! Either TBL_HEADER_FROM or TBL_HEADER_TO not set!'
return None return None
# итого по таблице - обязательно # итого по таблице - обязательно
@ -497,7 +498,7 @@ def get_all_these_boring_params(src_sheet, xls_settings):
# высота в twips # высота в twips
p.TBL_FOOTER_HEIGHT = sum_src_heights(src_sheet, p.TBL_FOOTER_FROM, p.TBL_FOOTER_TO) p.TBL_FOOTER_HEIGHT = sum_src_heights(src_sheet, p.TBL_FOOTER_FROM, p.TBL_FOOTER_TO)
else: else:
print u'Error! Either TBL_FOOTER_FROM or TBL_FOOTER_TO not set!' # print u'Error! Either TBL_FOOTER_FROM or TBL_FOOTER_TO not set!'
return None return None
# подитог (итого по странице) - опционально # подитог (итого по странице) - опционально

Loading…
Cancel
Save