twintechlabs / flaskdash Goto Github PK
View Code? Open in Web Editor NEWFlask starter app featuring CoreUI and the FlaskUser module.
License: Other
Flask starter app featuring CoreUI and the FlaskUser module.
License: Other
Hi,
I found some problems with SQLAlchemy:
[AttributeError: module 'sqlalchemy' has no attribute '__all__']
I solved this problem by updating versions in requirements.txt as below:
# This file is used by pip to install required python packages
# Usage: pip install -r requirements.txt
# Flask Framework
Flask==2.2
# Flask Packages
Flask-Login==0.6.3
Flask-Migrate==2.0.2
Flask-Script==2.0.5
Flask-SQLAlchemy==3.0.2
Flask-BabelEx
Flask-User==1.0.2.2
Flask-WTF==1.0.0
email_validator
Werkzeug==2.2.0
flask-session
# Automated tests
pytest==3.0.5
pytest-cov==2.4.0
# Development tools
# Fabric3==1.13.1.post1
# tox==2.7.0
# Run
gunicorn
It did not seems to create any problems (for now).
Great work. :)
First Read This to understand the defect:
https://www.kalzumeus.com/2010/06/17/falsehoods-programmers-believe-about-names/
Changeset #15 fixes this by and includes the same basic details.
Thank you very much for the work on this project. Very nice! Question for you guys: Are you planning on upgrading the project to Flask-User 1.0?
In the README file you mention that [email protected] should be used, but the user does not exist, instead [email protected] is used.
There is any way to send pull requests?
In the local_settings.py, there is the recommendation to run:
python -c "import os; print str(os.urandom(24));"
to generate a secret key.
On my system (Ubuntu 18.04), this command throws an error in Python 3:
python3 -c "import os; print repr(os.urandom(24));"
File "<string>", line 1
import os; print repr(os.urandom(24));
^
Googling throws up various working alternatives. The one suggested in diamond-org/flask-diamond#24 looks pretty neat to me and works in both Python 2.7.15 and 3.6.7 on my system.
Based on the link above, the following line is much longer than the current suggestion in local_settings.py, but it works in Python 2 and 3:
python -c "from __future__ import print_function; import string; import random; print(''.join([random.choice(string.ascii_letters + string.digits + string.punctuation) for x in range(24)]));"
The "Edit" forms in this project (eg the User Profile form) have at the bottom two buttons, one labelled "submit" and the other "reset".
I expected the "reset" buttons to discard any edits and either refresh the "Edit" form with the original data, or return to the previous screen. Instead it seems to function exactly the same way as the "submit" button, ie it saves all edits.
Is it just me or is the form validation not working?
I can make form validation work on other pages and use a custom made form like {{ form.name(class='awesome_style') }} but every form that has to do with flask-user is not working; /user/sign-in, /user/forgot-password and /user/register in mind.
Is this common? Something I don't know about? .. but most important how do I make the form validation work on these flask-user pages?
When I try to init_db,
python manage.py init_db
I'm getting following error:
ImportError: cannot import name 'url_encode' from 'werkzeug' (/home/rhasoff/Documents/Flask/flaskdash/venv/lib/python3.7/site-packages/werkzeug/__init__.py)
I'm using python 3.7.5 and venv as virtual environment.
i downloaded and installed the other day. The web site came up OK, but the tests failed. I added a next='/' to the test login data, and that worked.
response = client.post(url_for('user.login'), follow_redirects=True,
data=dict(email='[email protected]', password='Password1', next='/'))
BTW, Flask-User has been yanked, so you need a specific version in requirements if you'll continue to use it
CoreUI 3.0.0 released.
https://github.com/coreui/coreui-free-bootstrap-admin-template/releases/tag/3.0.0
Pardon my ignorance here, but the form action on every page is ""
How/what is handling the form action and the passing of data to Flask?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.