Giter Site home page Giter Site logo

level09 / enferno Goto Github PK

View Code? Open in Web Editor NEW
470.0 470.0 74.0 8.38 MB

This collection of modern libraries and tools, built on top of the Flask framework, allows you to quickly create any website or web-based application (SAAS) with impressive speed.

Home Page: https://enferno.readthedocs.io/

License: MIT License

Python 5.79% CSS 84.10% HTML 7.92% Dockerfile 0.18% Jinja 2.02%
celery css docker flask hackathon postgresql python redis saas sqlalchemy sqlite vue vuetify webframework

enferno's People

Contributors

dependabot[bot] avatar level09 avatar mmss avatar ratherbland avatar smithellis 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar

enferno's Issues

Question on REST API generation

Does your framework also generates Rest API, such that if the front end (could be AngularJS or whatever) is calling for a list of

class Title(db.Document):
    title_list = ['Mr', 'Mrs', 'Ms', 'Prof', 'Dr', 'Eng']
    title = db.StringField(max_length=5, required=True)

    def __unicode__(self):
        return '%s' % self.title


class MaritalStatus(db.Document):
    marital_list = ['Married', 'Single', 'Divorced',
                'Widowed', 'Living Together', 'Separated', 'Other']
    marital = db.StringField(max_length=25, required=True)

    def __unicode__(self):
        return '%s' % self.marital

then returns a JSON response, if not then I would maybe use?:

https://github.com/closeio/flask-mongorest

Just need an API that reads from a database and present to user registration scenario in the form of dropdowns to choice from. Just don't want to duplicate if framework already has it. Thanks

installation questions

I am trying to install package. Getting some issues. It cannot find the files, but they are all there. What do you think is the issue?

Thanks

(venv)user@user-HP-Stream-Notebook-PC-11:/media/user/MICROSD/Linux/enferno/enferno$ flask install
Traceback (most recent call last):
File "/media/user/MICROSD/Linux/enferno/enferno/venv/bin/flask", line 11, in
sys.exit(main())
File "/media/user/MICROSD/Linux/enferno/enferno/venv/lib/python3.4/site-packages/flask/cli.py", line 478, in main
cli.main(args=args, prog_name=name)
File "/media/user/MICROSD/Linux/enferno/enferno/venv/lib/python3.4/site-packages/flask/cli.py", line 345, in main
return AppGroup.main(self, *args, **kwargs)
File "/media/user/MICROSD/Linux/enferno/enferno/venv/lib/python3.4/site-packages/click/core.py", line 696, in main
rv = self.invoke(ctx)
File "/media/user/MICROSD/Linux/enferno/enferno/venv/lib/python3.4/site-packages/click/core.py", line 1055, in invoke
cmd_name, cmd, args = self.resolve_command(ctx, args)
File "/media/user/MICROSD/Linux/enferno/enferno/venv/lib/python3.4/site-packages/click/core.py", line 1094, in resolve_command
cmd = self.get_command(ctx, cmd_name)
File "/media/user/MICROSD/Linux/enferno/enferno/venv/lib/python3.4/site-packages/flask/cli.py", line 316, in get_command
rv = info.load_app().cli.get_command(ctx, name)
File "/media/user/MICROSD/Linux/enferno/enferno/venv/lib/python3.4/site-packages/flask/cli.py", line 209, in load_app
rv = locate_app(self.app_import_path)
File "/media/user/MICROSD/Linux/enferno/enferno/venv/lib/python3.4/site-packages/flask/cli.py", line 89, in locate_app
import(module)
File "/media/user/MICROSD/Linux/enferno/enferno/enferno.py", line 7, in
from app import create_app
ImportError: No module named 'app'

(venv)user@user-HP-Stream-Notebook-PC-11:/media/user/MICROSD/Linux/enferno/enferno$ echo $PYTHONPATH
.

tree -L 1
.
├── app.py
├── commands.py
├── enferno.py
├── extensions.py
├── gulpfile.js
├── init.py
├── node_modules
├── package.json
├── public
├── pycache
├── README.rst
├── requirements.txt
├── script.py
├── settings.py
├── static
├── tasks.py
├── templates
├── user
└── venv

Getting 500 error while starting the app

Getting the below message at start. Not sure what I missed.

500
Sorry, something went wrong on our system. Don't panic, we are fixing it! Please try again later.

image

Trying in windows

Hey i am trying this on windows

In installation step
export FLASK_APP = run.py

i use
set FLASK_APP = run.py

but after that too
flask create_db is not working

please help, thank you

Blog posts for tutorial seem obsolete

I am just getting started with Enferno but the two blog posts on Medium (https://medium.com/project-enferno/insanely-fast-prototyping-with-flask-vue-tailwind-part-1-d67e58f7d312 & https://medium.com/@level09/insanely-fast-prototyping-with-flask-vue-tailwind-part-2-38f4b2fdde41) as well as the copy of these Medium posts that appears on the website (separate issue is that none of the images show up on your website like they do on Medium), references a file called app.vue that doesn't exist when following the steps to install Enferno by cloning this repository.

This makes the guides unusable as I am unsure if the app.vue should be App.vue, if the files should be in the components directory (the imports suggest that app.vue should be in base src directory) or how to tell Enferno to use app.vue instead of Welcome.vue (I am guessing that I need to modify src/index.js to use the app.vue but my attempts to do this have failed).

Overall, the information in the readme, and the blog posts make this very difficult, and not insanely fast for the first time Enferno user

Registration problem: SMTPAuthenticationError: (535, '5.7.0 Mailgun is not loving your login or password

Upon launching and going to the registration endpoint to create a new user, I can see in PyCharm Mongo Explorer a new collection created with email, and password(hasded), but browser returns exception and I cannot go any further:

Traceback (most recent call last):
  File "/home/osboxes/anaconda/envs/venv/lib/python2.7/site-packages/flask/app.py", line 1836, in __call__
    return self.wsgi_app(environ, start_response)
  File "/home/osboxes/anaconda/envs/venv/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/venv/lib/python2.7/site-packages/flask/app.py", line 1403, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/home/osboxes/anaconda/envs/venv/lib/python2.7/site-packages/flask/app.py", line 1817, in wsgi_app
    response = self.full_dispatch_request()
  File "/home/osboxes/anaconda/envs/venv/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/venv/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/venv/lib/python2.7/site-packages/flask/app.py", line 1475, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/osboxes/anaconda/envs/venv/lib/python2.7/site-packages/flask_debugtoolbar/__init__.py", line 125, in dispatch_request
    return view_func(**req.view_args)
  File "/home/osboxes/anaconda/envs/venv/lib/python2.7/site-packages/flask_security/decorators.py", line 205, in wrapper
    return f(*args, **kwargs)
  File "/home/osboxes/anaconda/envs/venv/lib/python2.7/site-packages/flask_security/views.py", line 117, in register
    user = register_user(**form.to_dict())
  File "/home/osboxes/anaconda/envs/venv/lib/python2.7/site-packages/flask_security/registerable.py", line 41, in register_user
    user=user, confirmation_link=confirmation_link)
  File "/home/osboxes/anaconda/envs/venv/lib/python2.7/site-packages/flask_security/utils.py", line 333, in send_mail
    mail.send(msg)
  File "/home/osboxes/anaconda/envs/venv/lib/python2.7/site-packages/flask_mail.py", line 491, in send
    with self.connect() as connection:
  File "/home/osboxes/anaconda/envs/venv/lib/python2.7/site-packages/flask_mail.py", line 144, in __enter__
    self.host = self.configure_host()
  File "/home/osboxes/anaconda/envs/venv/lib/python2.7/site-packages/flask_mail.py", line 165, in configure_host
    host.login(self.mail.username, self.mail.password)
  File "/home/osboxes/anaconda/envs/venv/lib/python2.7/smtplib.py", line 622, in login
    raise SMTPAuthenticationError(code, resp)
SMTPAuthenticationError: (535, '5.7.0 Mailgun is not loving your login or password')

But trying the already login details it does take me to User Account:

Welcome, [email protected]

Last login at: 2015-09-21 11:04:14.260000

Logout

or do I need to change settings.py? Not sure how to configure it:

    #flask mail settings - Mailgun
    MAIL_SERVER = 'smtp.mailgun.com'
    MAIL_PORT = 465
    MAIL_USE_SSL = True
    MAIL_USERNAME = 'user'
    MAIL_PASSWORD = 'pass'
    SECURITY_EMAIL_SENDER = '[email protected]'

create role / users table first

Note: using sql implementation.
When trying to run manage.py install python complains that the tables don't exist.
I think it's worth mentioning somewhere that you need to create the role / users tables. I used your shell (which is very handy) to do so:

> python manage.py shell
>>> from extensions import db
>>> db.init_app(app)
>>> db.create_all()

Thanks for making this project - super cool.

error when enabling email authentication

Hi! i was testing this framework, really looks amazing!

I have an issue, i was trying to enable email auth (validation by email) and got an error.

this is what i changed:

on settings.py:

  • **SECURITY_CONFIRMABLE = True** (from False to True)
    

Then i try to register (flask run on dev mode) and got this message:

jinja2.exceptions.UndefinedError: 'flask_security.forms.ConfirmRegisterForm object' has no attribute 'name'

I want to authenticate via email (send email token, click on it, and validate user mail )

do i need to make any more changes?

thanks

Interesting Issue when setting up a flask testing harness

I downloaded enferno to compare it to the way I set up my own flask apps, it's pretty similar, and pretty similar to what most people do I think. I made some tweaks which I may share with you later, however there's a problem when setting of a flask testing harness using the recommended method:

class TwinesTestCase(unittest.TestCase):

    def setUp(self):
        os.environ["FLASK_ENV"] = "test"
       cfg = Konfigure().config
       app = create_app(cfg)
       self.app = app.test_client()

   def tearDown(self):
      db = connect('test')
      db.drop_database('test')

One test case works fine, but on the second one I get the following:

AssertionError: A blueprint's name collision occurred between <flask.blueprints.Blueprint object at
0x7f751107bf50> and <flask.blueprints.Blueprint object at 0x7f751107b610>. Both share the same
name "user". Blueprints that are created on the fly need unique names."

It's because you have admin as a module level variable in extensions.py. So on the second test instantiation you get an error at line 35 in your app.py.

Your app factory doesn't let itself be instantiated multiple times (the point of the pattern). Creating admin in the register_extensions method fixes the immediate problem, though I'm not sure how some of the other extensions are affected by this same sort of thing.

You may want to revisit this.

celery setup with app factory pattern

I am having difficulties getting celery to work properly. Simple tasks run fine but when i want to use SQLAlchemy within a celery Task the application context is missing. I suspect this is due to a wrong setup of celery with the app factory pattern. Would be great if you could post a snippet of how you usually setup celery with enferno (since you mention this is one of the "built in features").
Thanks a lot!

./manage.py install error

cry for help.

File "/usr/local/lib/python2.7/site-packages/bcrypt/init.py", line 82, in hashpw
hashed = _bcrypt.ffi.new("unsigned char[]", 128)
AttributeError: 'module' object has no attribute 'ffi

mongodb 3.2
python 2.7

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.