model = models.Book
shelf = [tag for tag in tags if tag.category == 'set']
shelf_is_set = (len(tags) == 1 and tags[0].category == 'set')
+ my_shelf_is_set = shelf_is_set and tags[0].user == request.user
theme_is_set = len([tag for tag in tags if tag.category == 'theme']) > 0
if theme_is_set:
model = models.Fragment
extra_context = {
'categories': categories,
'shelf_is_set': shelf_is_set,
+ 'my_shelf_is_set': my_shelf_is_set,
'only_author': only_author,
'pd_counter': pd_counter,
'user_is_owner': user_is_owner,
info = sys.exc_info()
exception = pprint.pformat(info[1])
tb = '\n'.join(traceback.format_tb(info[2]))
- return HttpResponse(_("An error occurred: %s\n\n%s") % (exception, tb), mimetype='text/plain')
+ _('Today is %(month)s, %(day)s.') % {'month': m, 'day': d}
+ return HttpResponse(_("An error occurred: %(exception)s\n\n%(tb)s") % {'exception':exception, 'tb':tb}, mimetype='text/plain')
return HttpResponse(_("Book imported successfully"))
else:
return HttpResponse(_("Error importing file: %r") % book_import_form.errors)