Skip to content

Commit

Permalink
remove encode functions from stark-b models thanks to makeEscapedOpti…
Browse files Browse the repository at this point in the history
…onalTag function in generators.py
  • Loading branch information
nicolasmoreau committed Jan 22, 2018
1 parent 7d4e82b commit 556540e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions nodes/starkb/node/dictionaries.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@


#source
'SourceTitle':'Source.encoded_title()',
'SourceTitle':'Source.title',
'SourceAuthorName':'Source.authors_list()',
'SourceCategory':'journal',
'SourceName' : 'Source.journal.encoded_name()',
'SourceName' : 'Source.journal.name',
'SourceVolume' : 'Source.volume',
'SourceYear' : 'Source.publication_year',
'SourceURI': 'Source.ads_reference',
Expand Down
8 changes: 4 additions & 4 deletions nodes/starkb/node/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ class Journal(models.Model):
id = models.IntegerField(primary_key=True)
name = models.CharField(max_length=225)

def encoded_name(self):
return escape(self.name)
#~ def encoded_name(self):
#~ return escape(self.name)

class Meta:
db_table = u't_journals'
Expand Down Expand Up @@ -99,8 +99,8 @@ class Article(models.Model):
doi_reference = models.TextField(blank=True)
other_reference = models.TextField(blank=True)

def encoded_title(self):
return escape(self.title)
#~ def encoded_title(self):
#~ return escape(self.title)

def authors_list(self):
return self.authors.rsplit(',')
Expand Down

0 comments on commit 556540e

Please sign in to comment.