Skip to content

Commit

Permalink
adding static parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
mrf345 committed Jul 15, 2018
1 parent 0bfa96c commit 5bb2a44
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 107 deletions.
9 changes: 4 additions & 5 deletions flask_datepicker/__init__.py
@@ -1,13 +1,13 @@
from flask import Markup
from static_parameters import (
function_parameters, class_parameters
)
from os import path, name as osName
from random import choice
# Fixing file not found for py2
from sys import version_info
if version_info[0] == 2:
FileNotFoundError = IOError
from static_parameters import (
function_parameters, class_parameters
)

@class_parameters(function_parameters)
class datepicker(object):
Expand All @@ -16,7 +16,7 @@ def __init__(self, app=None, local=[], testing=False):
Initiating the extension and seting up important variables
@param: app flask application instance (default None).
@param: local contains Jquery UI local sourcecode files (default [])
((local:list))((testing:bool))
((testing:bool))
"""
self.testing = testing
self.app = app
Expand Down Expand Up @@ -54,7 +54,6 @@ def loader(self, theme=None, random_remember=False):
for Jquery UI (default True).
@param: random_remember to remember the random choice, unless you want
it to load new theme with each reload (default True).
((random_remember:bool))
"""
html = "" # html tags will end-up here
for i, n in enumerate(('js', 'css')):
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Expand Up @@ -13,9 +13,9 @@

setup(
name='Flask-Datepicker',
version='0.11',
version='0.12',
url='https://github.com/mrf345/flask_datepicker/',
download_url='https://github.com/mrf345/flask_datepicker/archive/0.11.tar.gz',
download_url='https://github.com/mrf345/flask_datepicker/archive/0.12.tar.gz',
license='MIT',
author='Mohamed Feddad',
author_email='mrf345@gmail.com',
Expand Down
84 changes: 0 additions & 84 deletions static_parameters/__init__.py

This file was deleted.

13 changes: 0 additions & 13 deletions static_parameters/all_functions.py

This file was deleted.

6 changes: 3 additions & 3 deletions test_fd.py
Expand Up @@ -39,7 +39,7 @@ def toMimic(data, static=False):


app = Flask(__name__)
eng = datepicker(app)
eng = datepicker(app, local=[])


@app.route('/loader')
Expand All @@ -65,13 +65,13 @@ def minMax(min, max):
src="https://code.jquery.com/jquery-3.3.1.min.js"
></script>
{{ datepicker.loader() }}
{{ datepicker.picker(minDate=10, maxDate=10) }}
{{ datepicker.picker(minDate='%s', maxDate='%s') }}
</head>
<body>
<input class='datepicker'>
</body>
</html>
"""
""" % (min, max)
)
)

Expand Down

0 comments on commit 5bb2a44

Please sign in to comment.