show groups and its members on groups page in sidebar
This commit is contained in:
@@ -17,21 +17,10 @@ def new():
|
||||
bio = request.form['bio']
|
||||
user_id = g.user[0]
|
||||
db = get_db()
|
||||
error = None
|
||||
|
||||
if not name:
|
||||
error = 'Name is required.'
|
||||
|
||||
if error is None:
|
||||
db.execute(
|
||||
"INSERT INTO member (user_id, member_name, bio) VALUES (?, ?, ?)",
|
||||
(user_id, name, bio),
|
||||
|
||||
)
|
||||
db.commit()
|
||||
return redirect(url_for('home.full_list'))
|
||||
|
||||
return render_template('manage/new.html', error=error)
|
||||
|
||||
db.execute("INSERT INTO member (user_id, member_name, bio) VALUES (?, ?, ?)",(user_id, name, bio))
|
||||
db.commit()
|
||||
return redirect(url_for('home.full_list'))
|
||||
|
||||
return render_template('manage/new.html')
|
||||
|
||||
@@ -58,15 +47,6 @@ def edit(mid):
|
||||
db.execute("INSERT INTO icons (member_id, icon_location) VALUES (?, ?)", (mid, filename),)
|
||||
db.commit()
|
||||
|
||||
# this specific chunk here is checking whether icons in the myriad/static/icons folder have a link in the database
|
||||
# in case the database was rebuilt, or something else happened, it is a waste of storage keeping an unlinked image
|
||||
|
||||
|
||||
# and now for the same in reverse - clean the database of references to images that don't exist
|
||||
|
||||
|
||||
# the above cleanup operations should be a button in the manage sidebar but for now they are here.
|
||||
|
||||
if "c9" in request.form:
|
||||
c9 = request.form["c9"]
|
||||
c10 = request.form["c10"]
|
||||
@@ -76,10 +56,6 @@ def edit(mid):
|
||||
c14 = request.form["c14"]
|
||||
c15 = request.form["c15"]
|
||||
c16 = request.form["c16"]
|
||||
#c17 = request.form["c17"]
|
||||
#c18 = request.form["c18"]
|
||||
#c19 = request.form["c19"]
|
||||
#c20 = request.form["c20"]
|
||||
c21 = request.form["c21"]
|
||||
c22 = request.form["c22"]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user