Skip to content

Commit

Permalink
Merge pull request #156 from juanvmarquezl/master
Browse files Browse the repository at this point in the history
Useless library
  • Loading branch information
getcake authored Nov 28, 2022
2 parents 6b99292 + 79b4b60 commit 6d89169
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 14 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,6 @@ venv

.idea/
.vscode/

#venv files
Scripts/
6 changes: 3 additions & 3 deletions examples/example.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
from flask import Flask, render_template, request
from flask_googlemaps import GoogleMaps
from flask_googlemaps import Map, icons
from dynaconf import FlaskDynaconf
#from dynaconf import FlaskDynaconf

app = Flask(__name__, template_folder="templates")
FlaskDynaconf(app) # will read GOOGLEMAPS_KEY from .secrets.toml
#FlaskDynaconf(app) # will read GOOGLEMAPS_KEY from .secrets.toml


# you can set key as config
Expand Down Expand Up @@ -387,4 +387,4 @@ def clickpost():


if __name__ == "__main__":
app.run(debug=True, use_reloader=True)
app.run(port=5050, debug=True, use_reloader=True)
7 changes: 2 additions & 5 deletions examples/example_2.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
from flask import Flask, render_template
from flask_googlemaps import GoogleMaps, Map, icons
from dynaconf import FlaskDynaconf
#from dynaconf import FlaskDynaconf
#enter the api key below
api = ''
app = Flask(__name__)
GoogleMaps(app, key = api)
FlaskDynaconf(app)
#FlaskDynaconf(app)

import json

Expand Down Expand Up @@ -61,8 +61,5 @@ def map_created_in_view():
return render_template("example_2.html", dmap=dmap ,gmap = gmap, wmap = wmap,key = api)





if __name__ == "__main__":
app.run(port=5050, debug=True)
Binary file added examples/examples_requirements.txt
Binary file not shown.
4 changes: 1 addition & 3 deletions examples/simple.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
from flask import Flask, render_template
from flask_googlemaps import GoogleMaps, Map, icons
from dynaconf import FlaskDynaconf

app = Flask(__name__)
GoogleMaps(app)
FlaskDynaconf(app)


@app.route("/")
Expand All @@ -26,4 +24,4 @@ def map_created_in_view():


if __name__ == "__main__":
app.run(port=5050)
app.run(port=5050, debug=True)
2 changes: 0 additions & 2 deletions flask_googlemaps/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

from json import dumps
from typing import Optional, Dict, Any, List, Union, Tuple, Text
import requests as rq

import requests
from flask import Blueprint, Markup, g, render_template

Expand Down
2 changes: 1 addition & 1 deletion flask_googlemaps/icons.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def __getattr__(self, item):

dots = Icon(
base_url="//maps.google.com/mapfiles/ms/icons/{0}-dot.png",
options=["blue", "yellow", "green", "red", "pink", "purple", "red"],
options=["blue", "yellow", "green", "red", "pink", "purple", "orange"],
) # type: Icon

alpha = Icon(
Expand Down

0 comments on commit 6d89169

Please sign in to comment.