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
3afac3de
Commit
3afac3de
authored
Jun 14, 2015
by
Petrus J.v.Rensburg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move config to a separate file for 'GeoAlchemy' example.
parent
015ea597
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
9 deletions
+11
-9
app.py
examples/geo-alchemy/app.py
+1
-9
config.py
examples/geo-alchemy/config.py
+10
-0
No files found.
examples/geo-alchemy/app.py
View file @
3afac3de
...
@@ -8,17 +8,9 @@ from flask_admin.contrib.geoa import ModelView
...
@@ -8,17 +8,9 @@ from flask_admin.contrib.geoa import ModelView
# Create application
# Create application
app
=
Flask
(
__name__
)
app
=
Flask
(
__name__
)
app
.
config
.
from_pyfile
(
'config.py'
)
# Create dummy secrey key so we can use sessions
app
.
config
[
'SECRET_KEY'
]
=
'123456790'
app
.
config
[
'SQLALCHEMY_DATABASE_URI'
]
=
'postgresql+psycopg2://flask_admin_geo:flask_admin_geo@localhost/flask_admin_geo'
app
.
config
[
'SQLALCHEMY_ECHO'
]
=
True
db
=
SQLAlchemy
(
app
)
db
=
SQLAlchemy
(
app
)
app
.
config
[
'MAPBOX_MAP_ID'
]
=
'...'
app
.
config
[
'MAPBOX_ACCESS_TOKEN'
]
=
'...'
class
Point
(
db
.
Model
):
class
Point
(
db
.
Model
):
id
=
db
.
Column
(
db
.
Integer
,
primary_key
=
True
)
id
=
db
.
Column
(
db
.
Integer
,
primary_key
=
True
)
...
...
examples/geo-alchemy/config.py
0 → 100644
View file @
3afac3de
# Create dummy secrey key so we can use sessions
SECRET_KEY
=
'123456790'
# database connection
SQLALCHEMY_DATABASE_URI
=
'postgresql+psycopg2://flask_admin_geo:flask_admin_geo@localhost/flask_admin_geo'
SQLALCHEMY_ECHO
=
True
# credentials for loading map tiles from mapbox
MAPBOX_MAP_ID
=
'...'
MAPBOX_ACCESS_TOKEN
=
'...'
\ No newline at end of file
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