summaryrefslogtreecommitdiff
path: root/db.py
diff options
context:
space:
mode:
Diffstat (limited to 'db.py')
-rw-r--r--db.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/db.py b/db.py
index 003d4c4..8b2591d 100644
--- a/db.py
+++ b/db.py
@@ -19,14 +19,16 @@ class Paste(Base):
syntax = Column(String)
title = Column(String)
text = Column(Text, nullable = False)
+ ip = Column(String)
- def __init__(self, hash, nick, date, syntax, title, text):
+ def __init__(self, hash, nick, date, syntax, title, text, ip=None):
self.nick = nick
self.hash = hash
self.date = date
self.syntax = syntax
self.title = title
self.text = text
+ self.ip = ip
def __repr__(self):
return '<Paste(%d, "%s", "%s", "%s", "%s")>' % (self.id, self.hash, self.nick, self.date.ctime(), self.title)