Giter Club home page Giter Club logo

flask-user-starter-app's People

Contributors

lingthio avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

flask-user-starter-app's Issues

Discrepancy on template structure and README

The text in app/templates/README.md includes

The template files are organized into the following directories:
    common            # Common base template files and macros
    flask_user        # Flask-User template files (register, login, etc.)
    pages             # Template files for web pages

However there is only a common and main folder, and a main/register.html that I think, is never used.

redirect error in unit test run

Hello,

I did follow the instruction, I got the application running but I got redirect errors when signing in.

I also got these errors (see error.txt) when running the unit tests.

Any idea?

best
Matthias

error.txt

Error python manage.py init_db

Still not able to start project, though I can see db created with admin and user sample db. But upon launching it is status code 500?

Win 7 environment setup

Hi how to setup ENV_SETTINGS_FILE in Win 7? Thanks

In startup/create_app.py/create_app:

env_settings_file = os.environ.get('ENV_SETTINGS_FILE', 'env_settings_example.py')
app.config.from_pyfile(env_settings_file)

this needs to change to env_settings.py outside project directory as well?

Cannot create new user?

Have tried using the default
env_settings_example.py as well as using my own env_settings.py, but they all cannot register new users?

Have been able to sign in using default admin and user:

Test users:

But cannot create new user:

127.0.0.1 - - [07/Sep/2015 13:07:34] "GET /user/register HTTP/1.1" 200 -
127.0.0.1 - - [07/Sep/2015 13:08:10] "POST /user/register HTTP/1.1" 500 -
Traceback (most recent call last):
  File "/home/osboxes/anaconda/envs/py27/lib/python2.7/site-packages/flask/app.py", line 1836, in __call__
    return self.wsgi_app(environ, start_response)
  File "/home/osboxes/anaconda/envs/py27/lib/python2.7/site-packages/flask/app.py", line 1820, in wsgi_app
    response = self.make_response(self.handle_exception(e))
  File "/home/osboxes/anaconda/envs/py27/lib/python2.7/site-packages/flask/app.py", line 1403, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/home/osboxes/anaconda/envs/py27/lib/python2.7/site-packages/flask/app.py", line 1817, in wsgi_app
    response = self.full_dispatch_request()
  File "/home/osboxes/anaconda/envs/py27/lib/python2.7/site-packages/flask/app.py", line 1477, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/home/osboxes/anaconda/envs/py27/lib/python2.7/site-packages/flask/app.py", line 1381, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/home/osboxes/anaconda/envs/py27/lib/python2.7/site-packages/flask/app.py", line 1475, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/osboxes/anaconda/envs/py27/lib/python2.7/site-packages/flask/app.py", line 1461, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/home/osboxes/anaconda/envs/py27/lib/python2.7/site-packages/flask_user/views.py", line 423, in register
    _send_registered_email(user, user_email, require_email_confirmation)
  File "/home/osboxes/anaconda/envs/py27/lib/python2.7/site-packages/flask_user/views.py", line 662, in _send_registered_email
    emails.send_registered_email(user, user_email, confirm_email_link)
  File "/home/osboxes/anaconda/envs/py27/lib/python2.7/site-packages/flask_user/emails.py", line 148, in send_registered_email
    user_manager.send_email_function(email, subject, html_message, text_message)
  File "/home/osboxes/anaconda/envs/py27/lib/python2.7/site-packages/flask_user/emails.py", line 49, in send_email
    mail_engine.send(message)
  File "/home/osboxes/anaconda/envs/py27/lib/python2.7/site-packages/flask_mail.py", line 491, in send
    with self.connect() as connection:
  File "/home/osboxes/anaconda/envs/py27/lib/python2.7/site-packages/flask_mail.py", line 144, in __enter__
    self.host = self.configure_host()
  File "/home/osboxes/anaconda/envs/py27/lib/python2.7/site-packages/flask_mail.py", line 156, in configure_host
    host = smtplib.SMTP_SSL(self.mail.server, self.mail.port)
  File "/home/osboxes/anaconda/envs/py27/lib/python2.7/smtplib.py", line 796, in __init__
    SMTP.__init__(self, host, port, local_hostname, timeout)
  File "/home/osboxes/anaconda/envs/py27/lib/python2.7/smtplib.py", line 256, in __init__
    (code, msg) = self.connect(host, port)
  File "/home/osboxes/anaconda/envs/py27/lib/python2.7/smtplib.py", line 316, in connect
    self.sock = self._get_socket(host, port, self.timeout)
  File "/home/osboxes/anaconda/envs/py27/lib/python2.7/smtplib.py", line 801, in _get_socket
    new_socket = socket.create_connection((host, port), timeout)
  File "/home/osboxes/anaconda/envs/py27/lib/python2.7/socket.py", line 557, in create_connection
    for res in getaddrinfo(host, port, 0, SOCK_STREAM):
TypeError: getaddrinfo() argument 1 must be string or None
127.0.0.1 - - [07/Sep/2015 13:08:10] "GET /user/register?__debugger__=yes&cmd=resource&f=style.css HTTP/1.1" 200 -
127.0.0.1 - - [07/Sep/2015 13:08:10] "GET /user/register?__debugger__=yes&cmd=resource&f=jquery.js HTTP/1.1" 200 -
127.0.0.1 - - [07/Sep/2015 13:08:10] "GET /user/register?__debugger__=yes&cmd=resource&f=debugger.js HTTP/1.1" 200 -
127.0.0.1 - - [07/Sep/2015 13:08:10] "GET /user/register?__debugger__=yes&cmd=resource&f=console.png HTTP/1.1" 200 -
127.0.0.1 - - [07/Sep/2015 13:08:10] "GET /user/register?__debugger__=yes&cmd=resource&f=source.png HTTP/1.1" 200 -

[META] Is this project maintained?

Thanks for the awesome framework and organizational scheme!

I would love to use this as a starting point for my app, but I see several longstanding issues here in the Github issue tracking system, and quite a few old pull requests.

Is this project considered a deprecated example?

error on db init with flask-wtf v < 0.14.3

when trying to initialise the db it gives the following error

ImportError: cannot import name 'url_encode' from 'werkzeug'

Werkzeug changed the url_encode function from werkzeug.url_encode to werkzeug.urls.url_encode.

Simple fix should be to bump flask-wtf to version 0.14.3

Issue in app/create_app.py

On a Linux machine, I get this error:

Traceback (most recent call last):
  File "manage.py", line 7, in <module>
    app = create_app()
  File "../Flask-User-starter-app/app/create_app.py", line 24, in create_app
    app.config.from_pyfile(env_settings_file)
  File "../lib/python3.4/site-packages/flask/config.py", line 129, in from_pyfile
    with open(filename) as config_file:
FileNotFoundError: [Errno 2] Unable to load configuration file (No such file or directory): '../Flask-User-starter-app/appenv_settings.py'

The issue is in create_app.py on line 21:

default_filename = app.root_path + 'env_settings.py'

Which can be fixed with:

default_filename = app.root_path + '/env_settings.py'

I have not opened a PR for this because it may break non-Linux installs by creating // for the file-path.

Please confirm, otherwise I will open a PR for it.

Typo in Readme

Edit ~/dev/my_app/app/env_settings.py.

Should be:

Edit ~/dev/my_app/app/local_settings.py

There isn't an env_settings.py file in the project and the user was just asked to copy to local_settings.py Maybe the intended is to reference local_settings.py and edit that?

Running reset_db.py

reset_db.py is in app/startup/ from there it is unable to resolve package dependencies. When I moved it to root directory it's fine.

OR am I doing something wrong?

Assign a user role when user registers to website with flask-user

I'm trying to assign a default user role to newly registered accounts. In the flask-user documentation this code is used to manually assign a user role to a new account:

user.roles.append(Role(name='Admin'))

But how can this be done automatically when the user registers?

TypeError When I open user_profile_page

File "/Users/Flask-User-starter-app-0.6/app/views/misc_views.py", line 40, in user_profile_page
form = UserProfileForm(request.form, current_user)
File "/usr/local/lib/python3.6/site-packages/wtforms/form.py", line 212, in call
return type.call(cls, *args, **kwargs)
TypeError: init() takes from 1 to 2 positional arguments but 3 were given

It's a nice Sample to learn flask. Great help to me , TKS!

Running a production server

i see you have gunicorn in the requirements.txt but i can't seem to able to run the application using gunicorn ? any help ?

No license to allow for re-use of this code/repository

The README for this project says: "This code base serves as a great starting point to write your next Flask application."

However, there's no mention of the license terms of this project, and each file is headed with:

# Copyright 2014 SolidBuilds.com. All rights reserved
#
# Authors: Ling Thio <[email protected]>

Could you clarify the terms for using or distributing this code? Are people even allowed to use this in the first place? And if we are, under what terms? Is this in the Public Domain? Creative Commons? MIT License? GPL?

Migrations and model mismatch

The migrations table names do not match the model table names, which make the app unable to find the tables even after running the migrations

Button styling

Could you help to get the buttons to style? I can add the btn class to others but not sure how to do it for the templated/macro'd submit buttons.

Enable/Disable user registration

In app/settings.py:

USER_ENABLE_REGISTRATION = True # Allow new users to register

changing to false has no effect.

The setting should be:
USER_ENABLE_REGISTER = True # Allow new users to register

AttributeError: 'bool' object has no attribute '__call__' when visiting localhost:5000

I followed the installation instructions and all of the requirements install successfully. I'm using the newest version of virtualenvwrapper. When I visit localhost:5000 I get the following error:

File "[path_to_project]/app/templates/layout.html", line 29, in block "body" 
{% if current_user.is_authenticated() %}
AttributeError: 'bool' object has no attribute '__call__'

I'm somewhat new to flask and to Python, apologies if this is not a problem with the application itself, but I am stumped as to how to fix it. I googled a couple of solutions and haven't found anything that works. Thank you!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.