Subversion Repositories SmartDukaan

Rev

Rev 4806 | Rev 5055 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4806 Rev 4996
Line 198... Line 198...
198
    session.commit()
198
    session.commit()
199
 
199
 
200
def get_quick_links():
200
def get_quick_links():
201
    return QuickLink.query.all()
201
    return QuickLink.query.all()
202
 
202
 
-
 
203
def update_quicklink(id, url, text):
-
 
204
    quicklink = QuickLink.get_by(id = id)
-
 
205
    quicklink.url = url
-
 
206
    quicklink.text = text
-
 
207
    session.commit()
-
 
208
 
203
def close_session():
209
def close_session():
204
    if session.is_active:
210
    if session.is_active:
205
        print "session is active. closing it."
211
        print "session is active. closing it."
206
        session.close()
212
        session.close()
207
 
213