Skip to content

Commit

Permalink
Missing diff props to be able to tweet
Browse files Browse the repository at this point in the history
  • Loading branch information
nahuelhds committed May 25, 2020
1 parent 6ebfcd5 commit df8256e
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions diffengine/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,18 @@ class Diff(BaseModel):
emailed = DateTimeField(null=True)
blogged = DateTimeField(null=True)

@property
def url_changed(self):
return self.old.url != self.new.url

@property
def title_changed(self):
return self.old.title != self.new.title

@property
def summary_changed(self):
return self.old.summary != self.new.summary

@property
def html_path(self):
# use prime number to spread across directories
Expand Down

0 comments on commit df8256e

Please sign in to comment.