Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Edited views.py to fix import from forms.py #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Germano0
Copy link

Fixes bug

$ flask run
[...]

Error: While importing "run", an ImportError was raised:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/flask/cli.py", line 240, in locate_app
    __import__(module_name)
  File "/home/a/python-flask-crud-1/run.py", line 6, in <module>
    app = create_app(config_name)
  File "/home/a/python-flask-crud-1/app/__init__.py", line 32, in create_app
    from .auth import auth as auth_blueprint
  File "/home/a/python-flask-crud-1/app/auth/__init__.py", line 5, in <module>
    from . import views
  File "/home/a/python-flask-crud-1/app/auth/views.py", line 5, in <module>
    from forms import LoginForm, RegistrationForm
ModuleNotFoundError: No module named 'forms'

Fixes bug
```
$ flask run
[...]

Error: While importing "run", an ImportError was raised:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/flask/cli.py", line 240, in locate_app
    __import__(module_name)
  File "/home/a/python-flask-crud-1/run.py", line 6, in <module>
    app = create_app(config_name)
  File "/home/a/python-flask-crud-1/app/__init__.py", line 32, in create_app
    from .auth import auth as auth_blueprint
  File "/home/a/python-flask-crud-1/app/auth/__init__.py", line 5, in <module>
    from . import views
  File "/home/a/python-flask-crud-1/app/auth/views.py", line 5, in <module>
    from forms import LoginForm, RegistrationForm
ModuleNotFoundError: No module named 'forms'
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant