Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add simple model and views for admin users
HTML views for listing, adding and removing admin users, and a boolean admin column on the db table. This will need a db migration. Currently anyone can use these views. Currently being an admin doesn't do anything.
- Loading branch information
Showing
3 changed files
with
71 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title>Admin Users</title> | ||
</head> | ||
<body> | ||
|
||
<form method="POST"> | ||
<input type="text" name="add"></input> | ||
<input type="submit" value="Add"></input> | ||
|
||
<ul> | ||
{% for user in admin_users %} | ||
<li> | ||
{{ user }} | ||
<button type="submit" name="remove" value="{{ user }}" | ||
formaction="{{ request.route_url('admin_user_delete') }}"> | ||
remove | ||
</button> | ||
</li> | ||
{% endfor %} | ||
</ul> | ||
</form> | ||
|
||
</body> | ||
</html> |