Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
flask-admin
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Python-Dev
flask-admin
Commits
f20fa3d9
Commit
f20fa3d9
authored
Nov 03, 2013
by
Petrus J.v.Rensburg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make 'simple' example deployable to Apache.
parent
532be52b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
__init__.py
examples/simple/__init__.py
+0
-0
simple.py
examples/simple/simple.py
+5
-5
No files found.
examples/simple/__init__.py
0 → 100644
View file @
f20fa3d9
examples/simple/simple.py
View file @
f20fa3d9
...
@@ -29,13 +29,13 @@ app = Flask(__name__, template_folder='templates')
...
@@ -29,13 +29,13 @@ app = Flask(__name__, template_folder='templates')
def
index
():
def
index
():
return
'<a href="/admin/">Click me to get to Admin!</a>'
return
'<a href="/admin/">Click me to get to Admin!</a>'
# Create admin interface
admin
=
admin
.
Admin
()
admin
.
add_view
(
MyAdminView
(
category
=
'Test'
))
admin
.
add_view
(
AnotherAdminView
(
category
=
'Test'
))
admin
.
init_app
(
app
)
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
# Create admin interface
admin
=
admin
.
Admin
()
admin
.
add_view
(
MyAdminView
(
category
=
'Test'
))
admin
.
add_view
(
AnotherAdminView
(
category
=
'Test'
))
admin
.
init_app
(
app
)
# Start app
# Start app
app
.
run
(
debug
=
True
)
app
.
run
(
debug
=
True
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment