mirror of
https://github.com/janeczku/calibre-web
synced 2025-11-10 04:03:00 +00:00
Removed unused wishlist code
Added renaming of shelf name Added sorting abilty to shelfs jquery is loaded locally now
This commit is contained in:
31
cps/ub.py
31
cps/ub.py
@@ -32,7 +32,6 @@ class User(Base):
|
||||
password = Column(String)
|
||||
kindle_mail = Column(String(120), default="")
|
||||
shelf = relationship('Shelf', backref='user', lazy='dynamic')
|
||||
whislist = relationship('Whislist', backref='user', lazy='dynamic')
|
||||
downloads = relationship('Downloads', backref='user', lazy='dynamic')
|
||||
locale = Column(String(2), default="en")
|
||||
random_books = Column(Integer, default=1)
|
||||
@@ -117,27 +116,12 @@ class Shelf(Base):
|
||||
def __repr__(self):
|
||||
return '<Shelf %r>' % self.name
|
||||
|
||||
|
||||
class Whislist(Base):
|
||||
__tablename__ = "wishlist"
|
||||
|
||||
id = Column(Integer, primary_key=True)
|
||||
name = Column(String)
|
||||
is_public = Column(String)
|
||||
user_id = Column(Integer, ForeignKey('user.id'))
|
||||
|
||||
def __init__(self):
|
||||
pass
|
||||
|
||||
def __repr__(self):
|
||||
return '<Whislist %r>' % self.name
|
||||
|
||||
|
||||
class BookShelf(Base):
|
||||
__tablename__ = 'book_shelf_link'
|
||||
|
||||
id = Column(Integer, primary_key=True)
|
||||
book_id = Column(Integer)
|
||||
order = Column(Integer)
|
||||
shelf = Column(Integer, ForeignKey('shelf.id'))
|
||||
|
||||
def __repr__(self):
|
||||
@@ -154,19 +138,6 @@ class Downloads(Base):
|
||||
def __repr__(self):
|
||||
return '<Download %r' % self.book_id
|
||||
|
||||
|
||||
class Whish(Base):
|
||||
__tablename__ = 'whish'
|
||||
|
||||
id = Column(Integer, primary_key=True)
|
||||
title = Column(String)
|
||||
url = Column(String)
|
||||
wishlist = Column(Integer, ForeignKey('wishlist.id'))
|
||||
|
||||
def __repr__(self):
|
||||
return '<Whish %r>' % self.title
|
||||
|
||||
|
||||
class Settings(Base):
|
||||
__tablename__ = 'settings'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user