add javascript ajax example
This commit is contained in:
parent
d8bf589d48
commit
fce1885f76
21 changed files with 341 additions and 13 deletions
|
|
@ -65,12 +65,11 @@ Test
|
|||
|
||||
::
|
||||
|
||||
pip install pytest
|
||||
pip install '.[test]'
|
||||
pytest
|
||||
|
||||
Run with coverage report::
|
||||
|
||||
pip install pytest coverage
|
||||
coverage run -m pytest
|
||||
coverage report
|
||||
coverage html # open htmlcov/index.html in a browser
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ def register():
|
|||
elif db.execute(
|
||||
'SELECT id FROM user WHERE username = ?', (username,)
|
||||
).fetchone() is not None:
|
||||
error = 'User {} is already registered.'.format(username)
|
||||
error = 'User {0} is already registered.'.format(username)
|
||||
|
||||
if error is None:
|
||||
# the name is available, store it in the database and go to
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
license_file = LICENSE
|
||||
|
||||
[bdist_wheel]
|
||||
universal = False
|
||||
universal = True
|
||||
|
||||
[tool:pytest]
|
||||
testpaths = tests
|
||||
|
|
|
|||
|
|
@ -20,4 +20,10 @@ setup(
|
|||
install_requires=[
|
||||
'flask',
|
||||
],
|
||||
extras_require={
|
||||
'test': [
|
||||
'pytest',
|
||||
'coverage',
|
||||
],
|
||||
},
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue