Skip to content

Commit

Permalink
some column cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
nitinvwaran committed Aug 23, 2022
1 parent 11c7a6c commit 9cc1ab7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/wiki/plugins/metadata/tables.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ class ParallelSentenceAlignmentTable(tables.Table):
source_sentence = tables.Column(accessor='source_sentence',verbose_name='Source Sentence ID')
source_sentence_text = tables.Column(accessor='source_sentence.text', verbose_name="Source Sentence Text")
source_sentence_language = tables.Column(accessor = 'source_sentence.language.name',verbose_name="Source Sentence Language")
target_sentence = tables.Column(accessor='target_sentence',verbose_name='Target Sentence ID')
target_sentence_text = tables.Column(accessor='target_sentence.text', verbose_name="Target Sentence Text")
target_sentence_language = tables.Column(accessor='target_sentence.language.name', verbose_name="Target Sentence Language")
target_sentence = tables.Column(accessor='target_sentence',verbose_name='Sentence ID')
target_sentence_text = tables.Column(accessor='target_sentence.text', verbose_name="Sentence Text")
target_sentence_language = tables.Column(accessor='target_sentence.language.name', verbose_name="Sentence Language")

def value_source_sentence(self, value):
return value.sent_id
Expand Down
2 changes: 1 addition & 1 deletion src/wiki/plugins/metadata/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ def get(self, request, *args, **kwargs):
context = self.get_context_data(**kwargs)
data = tables.ParallelSentenceAlignmentTable(models.ParallelSentenceAlignment.objects.filter(source_sentence__sent_id__contains=context['sent_id']))
data.paginate(page=request.GET.get("page",1),per_page=25)
data.exclude = ('id','exid')
data.exclude = ('id','exid','source_sentence','source_sentence_language','source_sentence_text')
context['table'] = data
return self.render_to_response(context)

Expand Down

0 comments on commit 9cc1ab7

Please sign in to comment.